bash and bin/sh returning different env values in Kubernetes pod

186 Views Asked by At

I have a pod and a config map in my Minikube cluster.

The pod reads all env variables directly from the config map. using this syntax:

  envFrom:
    - configMapRef:
        name: db-config

Problem is: when I enter the pod using kubectl exec -it -- bash and enter env command, I see my configmap keys as expected. but when I do kubectl exec -it -- bin/sh and then env, I don't see the config-map values!

I read a few questions about difference of bash and bin/sh but couldn't find the relation with env.

0

There are 0 best solutions below