Kubernetes volumeMount folder and file permissions?Kubernetes config file from host to container?Kubernetes equivalent of env-file in DockerKubectl apply for a deployment with revHistoryLimit 0 does not delete the old replica set, here is my deploment templateMinikube/Kubernetes mountPath is not accessibleHow to start a pod in command line without deployment in kubernetes?How to map one single file into kubernetes pod using hostPath?Kubernetes doesn't allow to mount file to containerHow to mount a volume with a windows container in kubernetes?Share nfs volume between kubernetes clustersAccess stateful headless kubernetes externally?kubernetes deployment with args

Duck, duck, gone!

Everyone Gets a Window Seat

Digital Bananas

Why has Speaker Pelosi been so hesitant to impeach President Trump?

What's the correct way to determine turn order in this situation?

How can I find places to store/land a private airplane?

Can a passenger predict that an airline or a tour operator is about to go bankrupt?

Where does the image of a data connector as a sharp metal spike originate from?

Magento 2 Country Name not get translated when using countryFactory

Parent asking for money after I moved out

Sending mail to the Professor for PhD, after seeing his tweet

Why does it seem the best way to make a living is to invest in real estate?

Disable all sound permanently

How are proofs normally constructed in a write up, in one line or split up into multiple lines?

How is this situation not a checkmate?

How do French and other Romance language speakers cope with the movable do system?

Notation clarity question for a conglomerate of accidentals

How to identify whether a publisher is genuine or not?

How do we know Nemesis is not a black hole (or neutron star)?

Booting Ubuntu from USB drive on MSI motherboard -- EVERYTHING fails

As a team leader is it appropriate to bring in fundraiser candy?

Isn't the detector always measuring, and thus always collapsing the state?

Does Bank Manager's discretion still exist in Mortgage Lending

What is the difference between increasing volume and increasing gain?



Kubernetes volumeMount folder and file permissions?


Kubernetes config file from host to container?Kubernetes equivalent of env-file in DockerKubectl apply for a deployment with revHistoryLimit 0 does not delete the old replica set, here is my deploment templateMinikube/Kubernetes mountPath is not accessibleHow to start a pod in command line without deployment in kubernetes?How to map one single file into kubernetes pod using hostPath?Kubernetes doesn't allow to mount file to containerHow to mount a volume with a windows container in kubernetes?Share nfs volume between kubernetes clustersAccess stateful headless kubernetes externally?kubernetes deployment with args






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









0















Trying to mount config files from a hostPath to a kubernetes container. This works using minikube and VirtualBox shared folder, but I am unable to make this work on Linux.



I making use of AWS EKS and the following architecture https://aws.amazon.com/quickstart/architecture/amazon-eks/. I think my problem is that the files need to live on each of the EKS Node instances.



Here is the architecture diagram:
enter image description here



Below is the Deployment file.



apiVersion: apps/v1
kind: Deployment
metadata:
name: openhim-core-deployment
spec:
replicas: 1
selector:
matchLabels:
component: openhim-core
template:
metadata:
labels:
component: openhim-core
spec:
volumes:
- name: core-config
hostPath:
path: /var/config/openhim-core
containers:
- name: openhim-core
image: jembi/openhim-core:5.rc
ports:
- containerPort: 8080
- containerPort: 5000
- containerPort: 5001
volumeMounts:
- name: core-config
mountPath: /usr/src/app/config
env:
- name: NODE_ENV
value: development









share|improve this question





















  • 1





    can you please add output of kubectl logs pod_name and result of ls -l /var/config/openhim-core?

    – aurelius
    Mar 29 at 10:12











  • Thanks in advance. I've added the outputs. I ran chmod 777 -R /var/config/

    – Anton Swanevelder
    Mar 30 at 11:57











  • Think my issue is due to the multi-availability zones of AWS EKS.

    – Anton Swanevelder
    Apr 1 at 11:02

















0















Trying to mount config files from a hostPath to a kubernetes container. This works using minikube and VirtualBox shared folder, but I am unable to make this work on Linux.



I making use of AWS EKS and the following architecture https://aws.amazon.com/quickstart/architecture/amazon-eks/. I think my problem is that the files need to live on each of the EKS Node instances.



Here is the architecture diagram:
enter image description here



Below is the Deployment file.



apiVersion: apps/v1
kind: Deployment
metadata:
name: openhim-core-deployment
spec:
replicas: 1
selector:
matchLabels:
component: openhim-core
template:
metadata:
labels:
component: openhim-core
spec:
volumes:
- name: core-config
hostPath:
path: /var/config/openhim-core
containers:
- name: openhim-core
image: jembi/openhim-core:5.rc
ports:
- containerPort: 8080
- containerPort: 5000
- containerPort: 5001
volumeMounts:
- name: core-config
mountPath: /usr/src/app/config
env:
- name: NODE_ENV
value: development









share|improve this question





















  • 1





    can you please add output of kubectl logs pod_name and result of ls -l /var/config/openhim-core?

    – aurelius
    Mar 29 at 10:12











  • Thanks in advance. I've added the outputs. I ran chmod 777 -R /var/config/

    – Anton Swanevelder
    Mar 30 at 11:57











  • Think my issue is due to the multi-availability zones of AWS EKS.

    – Anton Swanevelder
    Apr 1 at 11:02













0












0








0








Trying to mount config files from a hostPath to a kubernetes container. This works using minikube and VirtualBox shared folder, but I am unable to make this work on Linux.



I making use of AWS EKS and the following architecture https://aws.amazon.com/quickstart/architecture/amazon-eks/. I think my problem is that the files need to live on each of the EKS Node instances.



Here is the architecture diagram:
enter image description here



Below is the Deployment file.



apiVersion: apps/v1
kind: Deployment
metadata:
name: openhim-core-deployment
spec:
replicas: 1
selector:
matchLabels:
component: openhim-core
template:
metadata:
labels:
component: openhim-core
spec:
volumes:
- name: core-config
hostPath:
path: /var/config/openhim-core
containers:
- name: openhim-core
image: jembi/openhim-core:5.rc
ports:
- containerPort: 8080
- containerPort: 5000
- containerPort: 5001
volumeMounts:
- name: core-config
mountPath: /usr/src/app/config
env:
- name: NODE_ENV
value: development









share|improve this question
















Trying to mount config files from a hostPath to a kubernetes container. This works using minikube and VirtualBox shared folder, but I am unable to make this work on Linux.



I making use of AWS EKS and the following architecture https://aws.amazon.com/quickstart/architecture/amazon-eks/. I think my problem is that the files need to live on each of the EKS Node instances.



Here is the architecture diagram:
enter image description here



Below is the Deployment file.



apiVersion: apps/v1
kind: Deployment
metadata:
name: openhim-core-deployment
spec:
replicas: 1
selector:
matchLabels:
component: openhim-core
template:
metadata:
labels:
component: openhim-core
spec:
volumes:
- name: core-config
hostPath:
path: /var/config/openhim-core
containers:
- name: openhim-core
image: jembi/openhim-core:5.rc
ports:
- containerPort: 8080
- containerPort: 5000
- containerPort: 5001
volumeMounts:
- name: core-config
mountPath: /usr/src/app/config
env:
- name: NODE_ENV
value: development






kubernetes amazon-eks






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 2 at 11:49







Anton Swanevelder

















asked Mar 28 at 21:16









Anton SwanevelderAnton Swanevelder

1761 silver badge16 bronze badges




1761 silver badge16 bronze badges










  • 1





    can you please add output of kubectl logs pod_name and result of ls -l /var/config/openhim-core?

    – aurelius
    Mar 29 at 10:12











  • Thanks in advance. I've added the outputs. I ran chmod 777 -R /var/config/

    – Anton Swanevelder
    Mar 30 at 11:57











  • Think my issue is due to the multi-availability zones of AWS EKS.

    – Anton Swanevelder
    Apr 1 at 11:02












  • 1





    can you please add output of kubectl logs pod_name and result of ls -l /var/config/openhim-core?

    – aurelius
    Mar 29 at 10:12











  • Thanks in advance. I've added the outputs. I ran chmod 777 -R /var/config/

    – Anton Swanevelder
    Mar 30 at 11:57











  • Think my issue is due to the multi-availability zones of AWS EKS.

    – Anton Swanevelder
    Apr 1 at 11:02







1




1





can you please add output of kubectl logs pod_name and result of ls -l /var/config/openhim-core?

– aurelius
Mar 29 at 10:12





can you please add output of kubectl logs pod_name and result of ls -l /var/config/openhim-core?

– aurelius
Mar 29 at 10:12













Thanks in advance. I've added the outputs. I ran chmod 777 -R /var/config/

– Anton Swanevelder
Mar 30 at 11:57





Thanks in advance. I've added the outputs. I ran chmod 777 -R /var/config/

– Anton Swanevelder
Mar 30 at 11:57













Think my issue is due to the multi-availability zones of AWS EKS.

– Anton Swanevelder
Apr 1 at 11:02





Think my issue is due to the multi-availability zones of AWS EKS.

– Anton Swanevelder
Apr 1 at 11:02












1 Answer
1






active

oldest

votes


















1
















After much pain I found that I am trying to place the configuration on the Linux Bastion host where I have access to kubectl but in fact this configuration will have to be on each of the EC2 instances in every availability zone.



The solution for me was to make use of a initContainer.



apiVersion: apps/v1
kind: Deployment
metadata:
name: openhim-core-deployment
spec:
replicas: 1
selector:
matchLabels:
component: openhim-core
template:
metadata:
labels:
component: openhim-core
spec:
volumes:
- name: core-config
hostPath:
path: /var/config/openhim-core
containers:
- name: openhim-core
image: jembi/openhim-core:5
ports:
- containerPort: 8080
- containerPort: 5000
- containerPort: 5001
volumeMounts:
- name: core-config
mountPath: /usr/src/app/config
env:
- name: NODE_ENV
value: development
initContainers:
- name: install
image: busybox
command:
- wget
- "-O"
- "/usr/src/app/config/development.json"
- https://s3.eu-central-1.amazonaws.com/../development.json
volumeMounts:
- name: core-config
mountPath: "/usr/src/app/config"
volumes:
- name: core-config
emptyDir:





share|improve this answer


























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );














    draft saved

    draft discarded
















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55406963%2fkubernetes-volumemount-folder-and-file-permissions%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1
















    After much pain I found that I am trying to place the configuration on the Linux Bastion host where I have access to kubectl but in fact this configuration will have to be on each of the EC2 instances in every availability zone.



    The solution for me was to make use of a initContainer.



    apiVersion: apps/v1
    kind: Deployment
    metadata:
    name: openhim-core-deployment
    spec:
    replicas: 1
    selector:
    matchLabels:
    component: openhim-core
    template:
    metadata:
    labels:
    component: openhim-core
    spec:
    volumes:
    - name: core-config
    hostPath:
    path: /var/config/openhim-core
    containers:
    - name: openhim-core
    image: jembi/openhim-core:5
    ports:
    - containerPort: 8080
    - containerPort: 5000
    - containerPort: 5001
    volumeMounts:
    - name: core-config
    mountPath: /usr/src/app/config
    env:
    - name: NODE_ENV
    value: development
    initContainers:
    - name: install
    image: busybox
    command:
    - wget
    - "-O"
    - "/usr/src/app/config/development.json"
    - https://s3.eu-central-1.amazonaws.com/../development.json
    volumeMounts:
    - name: core-config
    mountPath: "/usr/src/app/config"
    volumes:
    - name: core-config
    emptyDir:





    share|improve this answer





























      1
















      After much pain I found that I am trying to place the configuration on the Linux Bastion host where I have access to kubectl but in fact this configuration will have to be on each of the EC2 instances in every availability zone.



      The solution for me was to make use of a initContainer.



      apiVersion: apps/v1
      kind: Deployment
      metadata:
      name: openhim-core-deployment
      spec:
      replicas: 1
      selector:
      matchLabels:
      component: openhim-core
      template:
      metadata:
      labels:
      component: openhim-core
      spec:
      volumes:
      - name: core-config
      hostPath:
      path: /var/config/openhim-core
      containers:
      - name: openhim-core
      image: jembi/openhim-core:5
      ports:
      - containerPort: 8080
      - containerPort: 5000
      - containerPort: 5001
      volumeMounts:
      - name: core-config
      mountPath: /usr/src/app/config
      env:
      - name: NODE_ENV
      value: development
      initContainers:
      - name: install
      image: busybox
      command:
      - wget
      - "-O"
      - "/usr/src/app/config/development.json"
      - https://s3.eu-central-1.amazonaws.com/../development.json
      volumeMounts:
      - name: core-config
      mountPath: "/usr/src/app/config"
      volumes:
      - name: core-config
      emptyDir:





      share|improve this answer



























        1














        1










        1









        After much pain I found that I am trying to place the configuration on the Linux Bastion host where I have access to kubectl but in fact this configuration will have to be on each of the EC2 instances in every availability zone.



        The solution for me was to make use of a initContainer.



        apiVersion: apps/v1
        kind: Deployment
        metadata:
        name: openhim-core-deployment
        spec:
        replicas: 1
        selector:
        matchLabels:
        component: openhim-core
        template:
        metadata:
        labels:
        component: openhim-core
        spec:
        volumes:
        - name: core-config
        hostPath:
        path: /var/config/openhim-core
        containers:
        - name: openhim-core
        image: jembi/openhim-core:5
        ports:
        - containerPort: 8080
        - containerPort: 5000
        - containerPort: 5001
        volumeMounts:
        - name: core-config
        mountPath: /usr/src/app/config
        env:
        - name: NODE_ENV
        value: development
        initContainers:
        - name: install
        image: busybox
        command:
        - wget
        - "-O"
        - "/usr/src/app/config/development.json"
        - https://s3.eu-central-1.amazonaws.com/../development.json
        volumeMounts:
        - name: core-config
        mountPath: "/usr/src/app/config"
        volumes:
        - name: core-config
        emptyDir:





        share|improve this answer













        After much pain I found that I am trying to place the configuration on the Linux Bastion host where I have access to kubectl but in fact this configuration will have to be on each of the EC2 instances in every availability zone.



        The solution for me was to make use of a initContainer.



        apiVersion: apps/v1
        kind: Deployment
        metadata:
        name: openhim-core-deployment
        spec:
        replicas: 1
        selector:
        matchLabels:
        component: openhim-core
        template:
        metadata:
        labels:
        component: openhim-core
        spec:
        volumes:
        - name: core-config
        hostPath:
        path: /var/config/openhim-core
        containers:
        - name: openhim-core
        image: jembi/openhim-core:5
        ports:
        - containerPort: 8080
        - containerPort: 5000
        - containerPort: 5001
        volumeMounts:
        - name: core-config
        mountPath: /usr/src/app/config
        env:
        - name: NODE_ENV
        value: development
        initContainers:
        - name: install
        image: busybox
        command:
        - wget
        - "-O"
        - "/usr/src/app/config/development.json"
        - https://s3.eu-central-1.amazonaws.com/../development.json
        volumeMounts:
        - name: core-config
        mountPath: "/usr/src/app/config"
        volumes:
        - name: core-config
        emptyDir:






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Apr 2 at 11:52









        Anton SwanevelderAnton Swanevelder

        1761 silver badge16 bronze badges




        1761 silver badge16 bronze badges

































            draft saved

            draft discarded















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55406963%2fkubernetes-volumemount-folder-and-file-permissions%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

            은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현