title: Running java app in kubernetes container is not working
body: <p>I am trying to deploy and run the java application in kubernetes POD for which I am getting below error. 
  But when I run it as a docker container it is running fine.</p>
  
  <p>Here is the Dockerfile -</p>
  
  <pre><code>FROM openjdk:8-jre-alpine
  ENV artifact mysessionmanager-1.0.0-SNAPSHOT.jar
  WORKDIR /root/apps
  COPY . /root/apps
  EXPOSE 8080
  ENTRYPOINT ["sh", "-c"]
  CMD ["java -jar ${artifact}"]
  
  docker build -t mysessionmanager .
  docker tag mysessionmanager xxxx/mysessionmanager:v1
  docker push xxxx/mysessionmanager
  kubectl run mysessionmanager --image=xxxx/mysessionmanager:v1 --port=8080
  kubectl expose deployment --type=NodePort --port=80 --target-port=8080 --name=mysessionmanager  
  </code></pre>
  
  <p><code>kubectl get deployments</code> showing my deployment Available status as 0</p>
  
  <p><code>kubectl get pods</code> showing my POD's status as CrashLoopBackOff</p>
  
  <p><code>kubectl get logs mysessionmanager-5654545f8-mvt5x</code> shows nothing</p>
  
  <pre><code>kubectl describe pod mysessionmanager-5654545f8-mvt5x
  
  Reason: CrashLoopBackOff
  Last State: Terminated
  Reason: ContainerCannotRun
  Message: OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"java -jar mysessionmanager-1.0.0-SNAPSHOT.jar\": executable file not found in $PATH": unknown
  </code></pre>
  
  <p>But when I directly run the docker image using below command it works fine.</p>
  
  <pre><code>docker run -it mysessionmanager
  </code></pre>
  
  <p>Appreciate any help. Thanks</p>