1
votes

I am running kubernetes inside 'Docker Desktop' on Mac OS High Sierra.

enter image description here

Is it possible to change the flags given to the kubernetes api-server with this setup?

I can see that the api-server is running.

enter image description here

I am able to exec into the api-server container. When I kill the api-server so I could run it with my desired flags, the container is immediately killed.

enter image description here

2

2 Answers

2
votes

Try this to find the name of apiserver deployment:

kubectl -n kube-system get deploy | grep apiserver

Grab the name of deployment and edit its configuration:

kubectl -n kube-system edit deploy APISERVER_DEPLOY_NAME

When you do that the editor will open and from there you can change apiserver command line flags. After editing you should save and close editor, then your changes will be applied.

2
votes

I there is no a deployment for kube-apiserver since those pods are static so they are created and managed by kubelet.

The way to change kube-api's parameters is like @hanx mentioned:

  1. ssh into the master node (not a container);
  2. update the file under - /etc/kubernetes/manifests/;
  3. restart kubelet - systemctl restart kubelet;