<p>What could be the reason of Deployment not being able to see config files?</p>
<p>This is a part from Deployment</p>
<pre><code>command: [&quot;bundle&quot;, &quot;exec&quot;, &quot;puma&quot;, &quot;-C&quot;, &quot;config/puma.rb&quot;]

already tried with ./config/.. and using args instead of command
</code></pre>
<p>I'm getting <code>Errno::ENOENT: No such file or directory @ rb_sysopen - config/puma.rb</code></p>
<p>Everything used to work fine with docker-compose</p>
<p><strong>When I keep the last line (CMD) from the Dockerfile below and omit the <code>command:</code> in Deployment, everything works fine</strong> but, to reuse the image for sidekiq, I need to provide config files.</p>
<p>Dockerfile</p>
<pre><code>FROM ruby:2.7.2

RUN apt-get update -qq &amp;&amp; apt-get install -y build-essential ca-certificates libpq-dev nodejs postgresql-client yarn vim -y

ENV APP_ROOT /var/www/app

RUN mkdir -p $APP_ROOT

WORKDIR $APP_ROOT

COPY Gemfile Gemfile
COPY Gemfile.lock Gemfile.lock
COPY public public/
RUN gem install bundler
RUN bundle install

# tried this
COPY config config/ 

COPY . .

EXPOSE 9292

# used to have this line but I want to reuse the image
# CMD [&quot;bundle&quot;, &quot;exec&quot;, &quot;puma&quot;, &quot;-C&quot;, &quot;config/puma.rb&quot;]
</code></pre>
<p><strong>error message</strong></p>
<pre><code>bundler: failed to load command: puma (/usr/local/bundle/bin/puma)
Errno::ENOENT: No such file or directory @ rb_sysopen - config/puma.rb
</code></pre>
<p><strong>upd</strong></p>
<p>It seems that the issue was related to wrong paths and misunderstanding of command and args fields. The following config worked for me. It also possible there were cache issues with docker(happened to me earlier)</p>
<pre><code>          command:
            - bundle
            - exec
            - puma
          args:
            - &quot;-C&quot;
            - &quot;config/puma.rb&quot;   
</code></pre>

kirqe
<p>For some reason providing commands inside of <code>values.yaml</code> doesn't seem to work properly.</p>
<p>But it works when commands are provided through template.</p>
<p>There's the following section in the <code>app/templates/deployment.yaml</code> of my app. Everything works fine now.</p>
<pre><code>      containers:     
        - name: {{ .Values.app.name }}
          image: {{ .Values.app.container.image }}        
          command: 
            - bundle
            - exec
            - puma
          args:
            - &quot;-C&quot;
            - &quot;config/puma.rb&quot;        
</code></pre>
<p>I have also found this k8s rails demo <a href="https://github.com/lewagon/rails-k8s-demo/blob/master/helm/templates/deployments/sidekiq.yaml" rel="nofollow noreferrer">https://github.com/lewagon/rails-k8s-demo/blob/master/helm/templates/deployments/sidekiq.yaml</a></p>
<p>As you can see the commans section is provided through <code>templates/../name.yaml</code> rather than <code>values.yaml</code></p>
