title: kubernetes: exec: /bin/sh: no such file or directory
body: <p>I have a pod that is running in Kubernetes. And is working as expected. But I am unable to exec into the container. I tried that, but it throws an error:</p>
  <pre><code>kubectl exec -it pod/druid-operator-64d9877cbc-q8x7d /bin/sh
  
  error: Internal error occurred: error executing command in container: failed to exec in container: failed to start exec &quot;ddddddsss&quot;: OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: &quot;echo&quot;: executable file not found in $PATH: unknown
  </code></pre>
  <p>I ran an inspect on the docker and I do see a CMD</p>
  <pre><code>[
      {
          &quot;Id&quot;: &quot;sha256:fffff&quot;,
          &quot;RepoTags&quot;: [
              &quot;docker.aa.com/druid-operator:0.0.4&quot;,
              &quot;druid-operator:latest&quot;
          ],
          &quot;RepoDigests&quot;: [
              &quot;docker.aa.com/druid-operator-main@sha256:bbbb&quot;
          ],
          &quot;Parent&quot;: &quot;sha256:cccc&quot;,
          &quot;Comment&quot;: &quot;&quot;,
          &quot;Created&quot;: &quot;2021-08-02T17:57:44.6184552Z&quot;,
          &quot;Container&quot;: &quot;dddd&quot;,
          &quot;ContainerConfig&quot;: {
              &quot;Hostname&quot;: &quot;8775ee493624&quot;,
              &quot;Domainname&quot;: &quot;&quot;,
              &quot;User&quot;: &quot;nonroot:nonroot&quot;,
              &quot;AttachStdin&quot;: false,
              &quot;AttachStdout&quot;: false,
              &quot;AttachStderr&quot;: false,
              &quot;Tty&quot;: false,
              &quot;OpenStdin&quot;: false,
              &quot;StdinOnce&quot;: false,
              &quot;Env&quot;: [
                  &quot;PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&quot;,
                  &quot;SSL_CERT_FILE=/etc/ssl/certs/certificates.crt&quot;
              ],
              &quot;Cmd&quot;: [
                  &quot;/bin/sh&quot;,
                  &quot;-c&quot;,
                  &quot;#(nop) &quot;,
                  &quot;ENTRYPOINT [\&quot;/manager\&quot;]&quot;
              ],
  </code></pre>
  <p>Here is a sample of my Docker file</p>
  <pre><code>FROM docker.aaa.com/cpbuild/go:latest as builder
  
  WORKDIR /workspace
  
  # Install Kubebuilder
  ARG OS_ARCH=amd64
  ARG KUBEBUILDER_VERSION=2.3.1
  RUN curl -L -O &quot;https://github.com/kubernetes-sigs/kubebuilder/releases/download/v${KUBEBUILDER_VERSION}/kubebuilder_${KUBEBUILDER_VERSION}_linux_${OS_ARCH}.tar.gz&quot;
  RUN tar -zxvf kubebuilder_${KUBEBUILDER_VERSION}_linux_${OS_ARCH}.tar.gz
  RUN mv kubebuilder_${KUBEBUILDER_VERSION}_linux_${OS_ARCH} kubebuilder &amp;&amp; mv kubebuilder /usr/local/
  RUN export PATH=$PATH:/usr/local/kubebuilder/bin
  
  COPY . .
  
  # Build
  RUN go mod download
  RUN go fmt ./...
  RUN go vet ./...
  RUN go test ./...
  RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go
  
  # Use distroless as minimal base image to package the manager binary
  # Refer to https://github.com/GoogleContainerTools/distroless for more details
  
  FROM docker.aaa.com/distroless/static:nonroot
  WORKDIR /
  COPY --from=builder /workspace/manager .
  USER nonroot:nonroot
  
  ENTRYPOINT [&quot;/manager&quot;]
  </code></pre>
  <p>Let me know what I am missing. Or if any other data points are needed, I can share. Thanks in advance</p>