I have a kubernetes deployment which uses secrets for environment variables. So the pod has env variables which are using the secret.
Now I updated my deployment manifest json and the secret json to remove some of the variables, but when I apply these files, I get CreateContainerConfigError for the pod, and in its description I see:
Couldn't find key FOO in Secret mynamespace/secret-mypod
I've deleted this key from my secret json and from the deployment manifest json. Why am I still getting this error?
I understand that I can delete the deployment and apply it to get it to work, but I don't want to do that.
What is the right way to handle this scenario?