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

4/18/2017

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.

-- Bojan Radulovic
kops
kubernetes
terraform

2 Answers

1/6/2019

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.

-- Mozafar Gholami
Source: StackOverflow

11/30/2017

You could change the /etc/sysconfig/kubelet file. In the config, append / change the flags you need. Then restart the kubelet service using $ systemctl restart kubelet

-- Abhishek
Source: StackOverflow