Kubernetes: could not find file in command property file












0














I use CentOs 7.4 virtual machine which has 32Gb memory.



I have docker composer, it has following configurations:



version: "2"
services:
shiny-cas-server:
image: shiny-cas
command: puma -C config/puma.rb
volumes:
- ./cas-server/logs:/app/logs
- ./cas-server/config:/app/config
- ./cas-server/public:/app/public


With above docker level configuartions, I make kubernetes configuration:



cas-server-depl.yaml:



apiVersion: extensions/v1beta1   
kind: Deployment
metadata:
name: cas-server-depl
spec:
replicas: 1
template:
metadata:
labels:
app: cas-server-pod
spec:
containers:
- name: cas-server-pod
image: shiny-cas
imagePullPolicy: Never
command: ["puma -C /cas-server/config/puma.rb"]
ports:
- containerPort: 100
volumeMounts:
- mountPath: /app/logs
name: cas-server-logs
- mountPath: /app/config
name: cas-server-config
- mountPath: /app/public
name: cas-server-public
volumes:
- name: cas-server-logs
hostPath:
path: /cas-server/logs
- name: cas-server-config
hostPath:
path: /cas-server/config
- name: cas-server-public
hostPath:
path: /cas-server/public


In virtual machine, I copy ./cas-server directory to /cas-server, and changed chown and chgrp as my login name k8s, when I do sudo kubectl apply -f cas-server-depl.yaml, it has following response:



[k8s@k8s config]$ sudo kubectl get po
NAME READY STATUS RESTARTS AGE
cas-server-depl-7f849bf94c-srg77 0/1 RunContainerError 1 5s


Then I use following command to see why:



[k8s@k8s config]$ sudo kubectl describe po cas-server-depl-7988d6b447-ffff5
Name: cas-server-depl-7988d6b447-ffff5
Namespace: default
Priority: 0

IP: 100.68.142.72
Controlled By: ReplicaSet/cas-server-depl-7988d6b447
Containers:
cas-server-pod:

Command:
puma -C /cas-server/config/puma.rb
State: Waiting
Reason: CrashLoopBackOff
Last State: Terminated
Reason: ContainerCannotRun
Message: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: "puma -C /cas-server/config/puma.rb": stat puma -C /cas-server/config/puma.rb: no such file or directory": unknown
Exit Code: 128
...
Ready: False
Restart Count: 2
Environment: <none>
Mounts:
/app/config from cas-server-config (rw)
/app/logs from cas-server-logs (rw)
/app/public from cas-server-public (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-mrkdx (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
cas-server-logs:
Type: HostPath (bare host directory volume)
Path: /cas-server/logs
HostPathType:

HostPathType:
default-token-mrkdx:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-mrkdx
Optional: false


Normal Created 15s (x3 over 29s) kubelet, k8s.xxx.com.cn Created container
Warning Failed 15s (x3 over 28s) kubelet, k8s.xxx.com.cn Error: failed to start container "cas-server-pod": Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: "puma -C /cas-server/config/puma.rb": stat puma -C /cas-server/config/puma.rb: no such file or directory": unknown
Warning BackOff 1s (x3 over 26s) kubelet, k8s.shinyinfo.com.cn Back-off restarting failed container


It says:



Message:      OCI runtime create failed: container_linux.go:348: starting container process caused "exec: "puma -C /cas-server/config/puma.rb": stat puma -C /cas-server/config/puma.rb: no such file or directory": unknown


I tried /app/config/puma.rb and config/puma.rb in command, both have same error message. which directory I shall write? I could see puma.rb do exists.



My cas-server-svc.yaml is pasted as reference:



apiVersion: v1
kind: Service
metadata:
name: cas-server-svc
labels:
name: cas-server-svc
spec:
selector:
app: cas-server-pod
type: NodePort
ports:
- port: 100
nodePort: 31101
name: tcp









share|improve this question



























    0














    I use CentOs 7.4 virtual machine which has 32Gb memory.



    I have docker composer, it has following configurations:



    version: "2"
    services:
    shiny-cas-server:
    image: shiny-cas
    command: puma -C config/puma.rb
    volumes:
    - ./cas-server/logs:/app/logs
    - ./cas-server/config:/app/config
    - ./cas-server/public:/app/public


    With above docker level configuartions, I make kubernetes configuration:



    cas-server-depl.yaml:



    apiVersion: extensions/v1beta1   
    kind: Deployment
    metadata:
    name: cas-server-depl
    spec:
    replicas: 1
    template:
    metadata:
    labels:
    app: cas-server-pod
    spec:
    containers:
    - name: cas-server-pod
    image: shiny-cas
    imagePullPolicy: Never
    command: ["puma -C /cas-server/config/puma.rb"]
    ports:
    - containerPort: 100
    volumeMounts:
    - mountPath: /app/logs
    name: cas-server-logs
    - mountPath: /app/config
    name: cas-server-config
    - mountPath: /app/public
    name: cas-server-public
    volumes:
    - name: cas-server-logs
    hostPath:
    path: /cas-server/logs
    - name: cas-server-config
    hostPath:
    path: /cas-server/config
    - name: cas-server-public
    hostPath:
    path: /cas-server/public


    In virtual machine, I copy ./cas-server directory to /cas-server, and changed chown and chgrp as my login name k8s, when I do sudo kubectl apply -f cas-server-depl.yaml, it has following response:



    [k8s@k8s config]$ sudo kubectl get po
    NAME READY STATUS RESTARTS AGE
    cas-server-depl-7f849bf94c-srg77 0/1 RunContainerError 1 5s


    Then I use following command to see why:



    [k8s@k8s config]$ sudo kubectl describe po cas-server-depl-7988d6b447-ffff5
    Name: cas-server-depl-7988d6b447-ffff5
    Namespace: default
    Priority: 0

    IP: 100.68.142.72
    Controlled By: ReplicaSet/cas-server-depl-7988d6b447
    Containers:
    cas-server-pod:

    Command:
    puma -C /cas-server/config/puma.rb
    State: Waiting
    Reason: CrashLoopBackOff
    Last State: Terminated
    Reason: ContainerCannotRun
    Message: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: "puma -C /cas-server/config/puma.rb": stat puma -C /cas-server/config/puma.rb: no such file or directory": unknown
    Exit Code: 128
    ...
    Ready: False
    Restart Count: 2
    Environment: <none>
    Mounts:
    /app/config from cas-server-config (rw)
    /app/logs from cas-server-logs (rw)
    /app/public from cas-server-public (rw)
    /var/run/secrets/kubernetes.io/serviceaccount from default-token-mrkdx (ro)
    Conditions:
    Type Status
    Initialized True
    Ready False
    ContainersReady False
    PodScheduled True
    Volumes:
    cas-server-logs:
    Type: HostPath (bare host directory volume)
    Path: /cas-server/logs
    HostPathType:

    HostPathType:
    default-token-mrkdx:
    Type: Secret (a volume populated by a Secret)
    SecretName: default-token-mrkdx
    Optional: false


    Normal Created 15s (x3 over 29s) kubelet, k8s.xxx.com.cn Created container
    Warning Failed 15s (x3 over 28s) kubelet, k8s.xxx.com.cn Error: failed to start container "cas-server-pod": Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: "puma -C /cas-server/config/puma.rb": stat puma -C /cas-server/config/puma.rb: no such file or directory": unknown
    Warning BackOff 1s (x3 over 26s) kubelet, k8s.shinyinfo.com.cn Back-off restarting failed container


    It says:



    Message:      OCI runtime create failed: container_linux.go:348: starting container process caused "exec: "puma -C /cas-server/config/puma.rb": stat puma -C /cas-server/config/puma.rb: no such file or directory": unknown


    I tried /app/config/puma.rb and config/puma.rb in command, both have same error message. which directory I shall write? I could see puma.rb do exists.



    My cas-server-svc.yaml is pasted as reference:



    apiVersion: v1
    kind: Service
    metadata:
    name: cas-server-svc
    labels:
    name: cas-server-svc
    spec:
    selector:
    app: cas-server-pod
    type: NodePort
    ports:
    - port: 100
    nodePort: 31101
    name: tcp









    share|improve this question

























      0












      0








      0







      I use CentOs 7.4 virtual machine which has 32Gb memory.



      I have docker composer, it has following configurations:



      version: "2"
      services:
      shiny-cas-server:
      image: shiny-cas
      command: puma -C config/puma.rb
      volumes:
      - ./cas-server/logs:/app/logs
      - ./cas-server/config:/app/config
      - ./cas-server/public:/app/public


      With above docker level configuartions, I make kubernetes configuration:



      cas-server-depl.yaml:



      apiVersion: extensions/v1beta1   
      kind: Deployment
      metadata:
      name: cas-server-depl
      spec:
      replicas: 1
      template:
      metadata:
      labels:
      app: cas-server-pod
      spec:
      containers:
      - name: cas-server-pod
      image: shiny-cas
      imagePullPolicy: Never
      command: ["puma -C /cas-server/config/puma.rb"]
      ports:
      - containerPort: 100
      volumeMounts:
      - mountPath: /app/logs
      name: cas-server-logs
      - mountPath: /app/config
      name: cas-server-config
      - mountPath: /app/public
      name: cas-server-public
      volumes:
      - name: cas-server-logs
      hostPath:
      path: /cas-server/logs
      - name: cas-server-config
      hostPath:
      path: /cas-server/config
      - name: cas-server-public
      hostPath:
      path: /cas-server/public


      In virtual machine, I copy ./cas-server directory to /cas-server, and changed chown and chgrp as my login name k8s, when I do sudo kubectl apply -f cas-server-depl.yaml, it has following response:



      [k8s@k8s config]$ sudo kubectl get po
      NAME READY STATUS RESTARTS AGE
      cas-server-depl-7f849bf94c-srg77 0/1 RunContainerError 1 5s


      Then I use following command to see why:



      [k8s@k8s config]$ sudo kubectl describe po cas-server-depl-7988d6b447-ffff5
      Name: cas-server-depl-7988d6b447-ffff5
      Namespace: default
      Priority: 0

      IP: 100.68.142.72
      Controlled By: ReplicaSet/cas-server-depl-7988d6b447
      Containers:
      cas-server-pod:

      Command:
      puma -C /cas-server/config/puma.rb
      State: Waiting
      Reason: CrashLoopBackOff
      Last State: Terminated
      Reason: ContainerCannotRun
      Message: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: "puma -C /cas-server/config/puma.rb": stat puma -C /cas-server/config/puma.rb: no such file or directory": unknown
      Exit Code: 128
      ...
      Ready: False
      Restart Count: 2
      Environment: <none>
      Mounts:
      /app/config from cas-server-config (rw)
      /app/logs from cas-server-logs (rw)
      /app/public from cas-server-public (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-mrkdx (ro)
      Conditions:
      Type Status
      Initialized True
      Ready False
      ContainersReady False
      PodScheduled True
      Volumes:
      cas-server-logs:
      Type: HostPath (bare host directory volume)
      Path: /cas-server/logs
      HostPathType:

      HostPathType:
      default-token-mrkdx:
      Type: Secret (a volume populated by a Secret)
      SecretName: default-token-mrkdx
      Optional: false


      Normal Created 15s (x3 over 29s) kubelet, k8s.xxx.com.cn Created container
      Warning Failed 15s (x3 over 28s) kubelet, k8s.xxx.com.cn Error: failed to start container "cas-server-pod": Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: "puma -C /cas-server/config/puma.rb": stat puma -C /cas-server/config/puma.rb: no such file or directory": unknown
      Warning BackOff 1s (x3 over 26s) kubelet, k8s.shinyinfo.com.cn Back-off restarting failed container


      It says:



      Message:      OCI runtime create failed: container_linux.go:348: starting container process caused "exec: "puma -C /cas-server/config/puma.rb": stat puma -C /cas-server/config/puma.rb: no such file or directory": unknown


      I tried /app/config/puma.rb and config/puma.rb in command, both have same error message. which directory I shall write? I could see puma.rb do exists.



      My cas-server-svc.yaml is pasted as reference:



      apiVersion: v1
      kind: Service
      metadata:
      name: cas-server-svc
      labels:
      name: cas-server-svc
      spec:
      selector:
      app: cas-server-pod
      type: NodePort
      ports:
      - port: 100
      nodePort: 31101
      name: tcp









      share|improve this question













      I use CentOs 7.4 virtual machine which has 32Gb memory.



      I have docker composer, it has following configurations:



      version: "2"
      services:
      shiny-cas-server:
      image: shiny-cas
      command: puma -C config/puma.rb
      volumes:
      - ./cas-server/logs:/app/logs
      - ./cas-server/config:/app/config
      - ./cas-server/public:/app/public


      With above docker level configuartions, I make kubernetes configuration:



      cas-server-depl.yaml:



      apiVersion: extensions/v1beta1   
      kind: Deployment
      metadata:
      name: cas-server-depl
      spec:
      replicas: 1
      template:
      metadata:
      labels:
      app: cas-server-pod
      spec:
      containers:
      - name: cas-server-pod
      image: shiny-cas
      imagePullPolicy: Never
      command: ["puma -C /cas-server/config/puma.rb"]
      ports:
      - containerPort: 100
      volumeMounts:
      - mountPath: /app/logs
      name: cas-server-logs
      - mountPath: /app/config
      name: cas-server-config
      - mountPath: /app/public
      name: cas-server-public
      volumes:
      - name: cas-server-logs
      hostPath:
      path: /cas-server/logs
      - name: cas-server-config
      hostPath:
      path: /cas-server/config
      - name: cas-server-public
      hostPath:
      path: /cas-server/public


      In virtual machine, I copy ./cas-server directory to /cas-server, and changed chown and chgrp as my login name k8s, when I do sudo kubectl apply -f cas-server-depl.yaml, it has following response:



      [k8s@k8s config]$ sudo kubectl get po
      NAME READY STATUS RESTARTS AGE
      cas-server-depl-7f849bf94c-srg77 0/1 RunContainerError 1 5s


      Then I use following command to see why:



      [k8s@k8s config]$ sudo kubectl describe po cas-server-depl-7988d6b447-ffff5
      Name: cas-server-depl-7988d6b447-ffff5
      Namespace: default
      Priority: 0

      IP: 100.68.142.72
      Controlled By: ReplicaSet/cas-server-depl-7988d6b447
      Containers:
      cas-server-pod:

      Command:
      puma -C /cas-server/config/puma.rb
      State: Waiting
      Reason: CrashLoopBackOff
      Last State: Terminated
      Reason: ContainerCannotRun
      Message: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: "puma -C /cas-server/config/puma.rb": stat puma -C /cas-server/config/puma.rb: no such file or directory": unknown
      Exit Code: 128
      ...
      Ready: False
      Restart Count: 2
      Environment: <none>
      Mounts:
      /app/config from cas-server-config (rw)
      /app/logs from cas-server-logs (rw)
      /app/public from cas-server-public (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-mrkdx (ro)
      Conditions:
      Type Status
      Initialized True
      Ready False
      ContainersReady False
      PodScheduled True
      Volumes:
      cas-server-logs:
      Type: HostPath (bare host directory volume)
      Path: /cas-server/logs
      HostPathType:

      HostPathType:
      default-token-mrkdx:
      Type: Secret (a volume populated by a Secret)
      SecretName: default-token-mrkdx
      Optional: false


      Normal Created 15s (x3 over 29s) kubelet, k8s.xxx.com.cn Created container
      Warning Failed 15s (x3 over 28s) kubelet, k8s.xxx.com.cn Error: failed to start container "cas-server-pod": Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: "puma -C /cas-server/config/puma.rb": stat puma -C /cas-server/config/puma.rb: no such file or directory": unknown
      Warning BackOff 1s (x3 over 26s) kubelet, k8s.shinyinfo.com.cn Back-off restarting failed container


      It says:



      Message:      OCI runtime create failed: container_linux.go:348: starting container process caused "exec: "puma -C /cas-server/config/puma.rb": stat puma -C /cas-server/config/puma.rb: no such file or directory": unknown


      I tried /app/config/puma.rb and config/puma.rb in command, both have same error message. which directory I shall write? I could see puma.rb do exists.



      My cas-server-svc.yaml is pasted as reference:



      apiVersion: v1
      kind: Service
      metadata:
      name: cas-server-svc
      labels:
      name: cas-server-svc
      spec:
      selector:
      app: cas-server-pod
      type: NodePort
      ports:
      - port: 100
      nodePort: 31101
      name: tcp






      docker kubernetes






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 23 '18 at 8:18









      user84592

      1,70442754




      1,70442754
























          3 Answers
          3






          active

          oldest

          votes


















          2














          When you say



          command: ["puma -C /cas-server/config/puma.rb"]


          You are telling Kubernetes to tell Docker to look for a single executable named puma -C ..., where what you think are the command-line options are actually part of the filename. You need to split out the arguments into separate elements in the YAML list syntax, something like



          command: ["puma", "-C", "/cas-server/config/puma.rb"]


          or



          command:
          - puma
          - -C
          - /cas-server/config/puma.rb





          share|improve this answer





























            1














            Path should be /app/config/puma.rb instead of /cas-server/config/puma.rb, since you mounted cas-server-config in /app/config/. Also make sure /cas-server/config/puma.rb file exist in host path.



            spec:                        
            containers:
            - name: cas-server-pod
            image: shiny-cas
            imagePullPolicy: Never
            command: ["puma -C /app/config/puma.rb"]
            ports:
            - containerPort: 100
            volumeMounts:
            - mountPath: /app/logs
            name: cas-server-logs
            - mountPath: /app/config
            name: cas-server-config
            - mountPath: /app/public
            name: cas-server-public
            volumes:
            - name: cas-server-logs
            hostPath:
            path: /cas-server/logs
            - name: cas-server-config
            hostPath:
            path: /cas-server/config
            - name: cas-server-public
            hostPath:
            path: /cas-server/public





            share|improve this answer





























              0














              @David Maze, @nightfury1204 Thanks both your answer. Each answered the part of the question.



              Path shall be /app/config, command line is as follows:



              command: ["/bin/sh"]
              args: ["-c","puma -C /app/config/puma.rb"]


              What's more, one shall also notice /app/config access rights to login user.






              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/3.0/"u003ecc by-sa 3.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%2f53442906%2fkubernetes-could-not-find-file-in-command-property-file%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                2














                When you say



                command: ["puma -C /cas-server/config/puma.rb"]


                You are telling Kubernetes to tell Docker to look for a single executable named puma -C ..., where what you think are the command-line options are actually part of the filename. You need to split out the arguments into separate elements in the YAML list syntax, something like



                command: ["puma", "-C", "/cas-server/config/puma.rb"]


                or



                command:
                - puma
                - -C
                - /cas-server/config/puma.rb





                share|improve this answer


























                  2














                  When you say



                  command: ["puma -C /cas-server/config/puma.rb"]


                  You are telling Kubernetes to tell Docker to look for a single executable named puma -C ..., where what you think are the command-line options are actually part of the filename. You need to split out the arguments into separate elements in the YAML list syntax, something like



                  command: ["puma", "-C", "/cas-server/config/puma.rb"]


                  or



                  command:
                  - puma
                  - -C
                  - /cas-server/config/puma.rb





                  share|improve this answer
























                    2












                    2








                    2






                    When you say



                    command: ["puma -C /cas-server/config/puma.rb"]


                    You are telling Kubernetes to tell Docker to look for a single executable named puma -C ..., where what you think are the command-line options are actually part of the filename. You need to split out the arguments into separate elements in the YAML list syntax, something like



                    command: ["puma", "-C", "/cas-server/config/puma.rb"]


                    or



                    command:
                    - puma
                    - -C
                    - /cas-server/config/puma.rb





                    share|improve this answer












                    When you say



                    command: ["puma -C /cas-server/config/puma.rb"]


                    You are telling Kubernetes to tell Docker to look for a single executable named puma -C ..., where what you think are the command-line options are actually part of the filename. You need to split out the arguments into separate elements in the YAML list syntax, something like



                    command: ["puma", "-C", "/cas-server/config/puma.rb"]


                    or



                    command:
                    - puma
                    - -C
                    - /cas-server/config/puma.rb






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Nov 23 '18 at 13:13









                    David Maze

                    10.8k2922




                    10.8k2922

























                        1














                        Path should be /app/config/puma.rb instead of /cas-server/config/puma.rb, since you mounted cas-server-config in /app/config/. Also make sure /cas-server/config/puma.rb file exist in host path.



                        spec:                        
                        containers:
                        - name: cas-server-pod
                        image: shiny-cas
                        imagePullPolicy: Never
                        command: ["puma -C /app/config/puma.rb"]
                        ports:
                        - containerPort: 100
                        volumeMounts:
                        - mountPath: /app/logs
                        name: cas-server-logs
                        - mountPath: /app/config
                        name: cas-server-config
                        - mountPath: /app/public
                        name: cas-server-public
                        volumes:
                        - name: cas-server-logs
                        hostPath:
                        path: /cas-server/logs
                        - name: cas-server-config
                        hostPath:
                        path: /cas-server/config
                        - name: cas-server-public
                        hostPath:
                        path: /cas-server/public





                        share|improve this answer


























                          1














                          Path should be /app/config/puma.rb instead of /cas-server/config/puma.rb, since you mounted cas-server-config in /app/config/. Also make sure /cas-server/config/puma.rb file exist in host path.



                          spec:                        
                          containers:
                          - name: cas-server-pod
                          image: shiny-cas
                          imagePullPolicy: Never
                          command: ["puma -C /app/config/puma.rb"]
                          ports:
                          - containerPort: 100
                          volumeMounts:
                          - mountPath: /app/logs
                          name: cas-server-logs
                          - mountPath: /app/config
                          name: cas-server-config
                          - mountPath: /app/public
                          name: cas-server-public
                          volumes:
                          - name: cas-server-logs
                          hostPath:
                          path: /cas-server/logs
                          - name: cas-server-config
                          hostPath:
                          path: /cas-server/config
                          - name: cas-server-public
                          hostPath:
                          path: /cas-server/public





                          share|improve this answer
























                            1












                            1








                            1






                            Path should be /app/config/puma.rb instead of /cas-server/config/puma.rb, since you mounted cas-server-config in /app/config/. Also make sure /cas-server/config/puma.rb file exist in host path.



                            spec:                        
                            containers:
                            - name: cas-server-pod
                            image: shiny-cas
                            imagePullPolicy: Never
                            command: ["puma -C /app/config/puma.rb"]
                            ports:
                            - containerPort: 100
                            volumeMounts:
                            - mountPath: /app/logs
                            name: cas-server-logs
                            - mountPath: /app/config
                            name: cas-server-config
                            - mountPath: /app/public
                            name: cas-server-public
                            volumes:
                            - name: cas-server-logs
                            hostPath:
                            path: /cas-server/logs
                            - name: cas-server-config
                            hostPath:
                            path: /cas-server/config
                            - name: cas-server-public
                            hostPath:
                            path: /cas-server/public





                            share|improve this answer












                            Path should be /app/config/puma.rb instead of /cas-server/config/puma.rb, since you mounted cas-server-config in /app/config/. Also make sure /cas-server/config/puma.rb file exist in host path.



                            spec:                        
                            containers:
                            - name: cas-server-pod
                            image: shiny-cas
                            imagePullPolicy: Never
                            command: ["puma -C /app/config/puma.rb"]
                            ports:
                            - containerPort: 100
                            volumeMounts:
                            - mountPath: /app/logs
                            name: cas-server-logs
                            - mountPath: /app/config
                            name: cas-server-config
                            - mountPath: /app/public
                            name: cas-server-public
                            volumes:
                            - name: cas-server-logs
                            hostPath:
                            path: /cas-server/logs
                            - name: cas-server-config
                            hostPath:
                            path: /cas-server/config
                            - name: cas-server-public
                            hostPath:
                            path: /cas-server/public






                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Nov 23 '18 at 8:41









                            nightfury1204

                            1,43048




                            1,43048























                                0














                                @David Maze, @nightfury1204 Thanks both your answer. Each answered the part of the question.



                                Path shall be /app/config, command line is as follows:



                                command: ["/bin/sh"]
                                args: ["-c","puma -C /app/config/puma.rb"]


                                What's more, one shall also notice /app/config access rights to login user.






                                share|improve this answer


























                                  0














                                  @David Maze, @nightfury1204 Thanks both your answer. Each answered the part of the question.



                                  Path shall be /app/config, command line is as follows:



                                  command: ["/bin/sh"]
                                  args: ["-c","puma -C /app/config/puma.rb"]


                                  What's more, one shall also notice /app/config access rights to login user.






                                  share|improve this answer
























                                    0












                                    0








                                    0






                                    @David Maze, @nightfury1204 Thanks both your answer. Each answered the part of the question.



                                    Path shall be /app/config, command line is as follows:



                                    command: ["/bin/sh"]
                                    args: ["-c","puma -C /app/config/puma.rb"]


                                    What's more, one shall also notice /app/config access rights to login user.






                                    share|improve this answer












                                    @David Maze, @nightfury1204 Thanks both your answer. Each answered the part of the question.



                                    Path shall be /app/config, command line is as follows:



                                    command: ["/bin/sh"]
                                    args: ["-c","puma -C /app/config/puma.rb"]


                                    What's more, one shall also notice /app/config access rights to login user.







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Nov 26 '18 at 2:38









                                    user84592

                                    1,70442754




                                    1,70442754






























                                        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.





                                        Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                        Please pay close attention to the following guidance:


                                        • 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%2f53442906%2fkubernetes-could-not-find-file-in-command-property-file%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

                                        What visual should I use to simply compare current year value vs last year in Power BI desktop

                                        Alexandru Averescu

                                        Trompette piccolo