Unable to run shell commands in gke pod using yaml file

2/1/2018

If I put this command in the yaml file:

command: [ "/bin/sh", "-c", "env" ]

it says crashloopbackoff. I am using FROM java:openjdk-8-jre-alpine (inside the image). What could be the error?

Basically I am not able to run any command inside the yaml file but which I open pod with the help of kubectl exec -it ... /bin/sh I am able to run shell commands.

I want to use configmap. But envFrom is not valid in GKE pods. Is there any alternative?

-- Ram
kubernetes

0 Answers