user674669
user674669

Reputation: 12352

Change flags to kubernetes api-server running inside Docker for Mac

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

Upvotes: 1

Views: 3779

Answers (3)

Alex
Alex

Reputation: 81

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/; As soon as you save the file, the changes will take effect.

Upvotes: 2

Vasilii Angapov
Vasilii Angapov

Reputation: 9012

Try this to find the name of kube-apiserver pod name:

kubectl -n kube-system get pods | grep apiserver

Grab the name of the pod and edit its configuration:

kubectl -n kube-system edit pod APISERVER_POD_NAME

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

Upvotes: 3

Pourya Sadri
Pourya Sadri

Reputation: 5

You do not need to kill the api-server to modify desired flags. api-server is a pod as @alex mentioned.

just modify api-server manifest file and save it for the changes to take effect.

Upvotes: 0

Related Questions