I created my cluster through kubeadm. Before the creation of the cluster I set an environment variable ~/.bashsrc. The variable I set is NO_PROXY. When the cluster is created this variable gets picked up and is applied to all pods.

I now want to add another entry to the NO_PROXY but I know that this update won't be picked up automatically by the cluster.

What is the best way to update the environment variables of a kubernetes cluster?

1 Answer 1


Environment vars at the time of kubeadm init are not deployed to all pods. There are no pods at that time anyway, you have just created a kubemaster.

When you want to put NO_PROXY into pods/deployments you have to do that the usual way with env on the container.

    - name: NODE_NAME
          fieldPath: spec.nodeName     
  • It's populated to various pods such as the kube-apiserver pod. I had to install cert manager using helm. I was facing a proxy issue, to fix it I had to take down the cluster, change the environment variable, and then start the cluster again. Then initialize the cluster again. There surely has to be a better way. Jun 3, 2021 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.