I am trying to add some extra flags to my kubernetes controller manager and I am updating the flags in the /etc/kubernetes/manifests/kube-controller-manager.yaml file. But the changes that I am adding are not taking effect. The kubelet is detecting changes to the file and is restarting the pods but once restarted they come back with the old flags.
Any ideas?
The reason behind that is the container is started with the old flags, when you pass new flags and
kube-controller-managerpod is restarted(pod restart doesn't mean container restart) but thekube-controller-manager containeris still using old flags.Check it using following command:
Once you update the flags in
/etc/kubernetes/manifests/kube-controller-manager.yamlfile, restart the docker container of kube-controller-manager and changes will take effect. You can use following command to restart the kube-controller-manager container:Hope this helps.