Monday, 16 September 2019

kubernetes secret



to verify you have setup your envs, you have to log into your pod and run commands:

  • get your pods:   kubectl get pods
  • kubectl exec -it yourpodname -- /bin/bash
  • if you got below error :
OCI runtime exec failed: exec failed: container_linux.go:345: starting container process caused "exec: \"/bin/bh\": stat /bin/bh: no such file or directory": unknown
command terminated with exit code 126
  • and if you are using docker openjdk:8-jre-alpine, then just try : 
  • kubectl exec -it yourpodname -- /bin/sh 
  •     according to this, it has sh not bash.
  • then run : printenv 
  • it will print out all envs

short version:

kubectl exec -it yourpodname -- /bin/sh

1 comment: