Search code examples
kubernetesterraformkops

How to restart kubelet on master to change flag options and how to apply that in terraform


Kops created a cluster as well as terraform scripts.

How to restart kubelet and provide new flags for garbage collection(manual approach) and how to apply them to terraform?

Problem occurs when I manually kill the kubelet process on master and it keeps getting restarted immediately.


Solution

  • Add desired kubelet flags to /etc/default/kubelet file the file looks like this after adding flags:
    KUBELET_EXTRA_ARGS=--max-pods=20 --port=10255 [ExtarFlags]
    restart kubelet service sudo service kubelet restart.