Create an nginx pod and set an env value as 'var1=val1'. Check the env value existence within the pod - Casey-lab-95/cka GitHub Wiki

kubectl run nginx --image=nginx --restart=Never --env=var1=val1

then

kubectl exec -it nginx -- env

or

kubectl exec -it nginx -- sh -c 'echo $var1'

or

kubectl describe po nginx | grep val1

or

kubectl run nginx --restart=Never --image=nginx --env=var1=val1 -it --rm -- envCreate an nginx pod and set an env value as 'var1=val1'. Check the env value existence within the pod