kubernetes – Extremely strange behavior of kubectl exec for deployment/ vs
I am getting results that are really surprising me, and the docs aren’t helping me understand.
I have a deployment configured via kustomize.
There is currently 1 pod in the deployment.
I am getting different results for the following 2 commands, which I wouldn’t expect.
kubectl exec deployment/name -- sha256sum
vs
kubectl exec -- sha256sum
I checked the ReplicaSets for the deployment. There are multiple ReplicaSets, but there is only one with a non-zero number of pods.
I suspect that kubernetes is somehow finding a non-gced container that in some sense still belongs to the deployment. This is incredibly non-intuitive, as that container doesn’t show up anywhere that I can see. I only can reason about its existence because of this strange action at a distance.
Happy to share more details if you think they’ll be relevant, but I seem to have distilled it down to its essence.
Read more here: Source link
