Home > database >  add environment variable to kube-scheduler
add environment variable to kube-scheduler

Time:02-17

We're running K8s on EC2 instances. These have a volume limit of 25 per node. So we need to set the KUBE_MAX_PD_VOLS environment variable for the kube-scheduler. The thing is, I don't know how to set it. I can not add it to the pod definition as it's not allowed to edit this field. Additionally there's no deployment, stateful set or daemon set that defines the pods. So where the hack can I set it? The documentation of Kubernetes is not helpful in this case.

CodePudding user response:

Presumed your cluster is built with kubeadm, you specify this environment variable in the kube-scheduler static pod spec at /etc/kubernetes/manifests/kube-scheduler.yaml.

  • Related