9

I am running a local Kubernetes cluster through Docker Desktop on Windows. I'm attempting to modify my kube-apiserver config, and all of the information I've found has said to modify /etc/kubernetes/manifests/kube-apiserver.yaml on the master. I haven't been able to find this file, and am not sure what the proper way is to do this. Is there a different process because the cluster is through Docker Desktop?

Chris B.
  • 455
  • 7
  • 19

1 Answers1

8

Is there a different process because the cluster is through Docker Desktop?

You can get access to the kubeapi-server.yaml with a Kubernetes that is running on Docker Desktop but in a "hacky" way. I've included the explanation below.

For setups that require such reconfigurations, I encourage you to use different solution like for example minikube.

Minikube has a feature that allows you to pass the additional options for the Kubernetes components. You can read more about --extra-config ExtraOption by following this documentation:


As for the reconfiguration of kube-apiserver.yaml with Docker Desktop

You need to run following command:

docker run -it --privileged --pid=host debian nsenter -t 1 -m -u -n -i sh

Above command will allow you to run:

vi /etc/kubernetes/manifests/kube-apiserver.yaml

This lets you edit the API server configuration. The Pod running kubeapi-server will be restarted with new parameters.

You can check below StackOverflow answers for more reference:

Christopher Peisert
  • 21,862
  • 3
  • 86
  • 117
Dawid Kruk
  • 8,982
  • 2
  • 22
  • 45