Restart Kubernetes API server with different options

后端 未结 2 393
盖世英雄少女心
盖世英雄少女心 2021-01-04 04:54

I\'m pretty new to Kubernetes and clusters so this might be very simple.

I set up a Kubernetes cluster with 5 nodes using kubeadm following this guide.

相关标签:
2条回答
  • 2021-01-04 05:09

    I just found this for a similar use case and the API server was crashing after adding an Option with a file path.

    I was able to solve it and maybe this helps others as well:

    As described in https://kubernetes.io/docs/reference/setup-tools/kubeadm/implementation-details/#constants-and-well-known-values-and-paths the files in /etc/kubernetes/manifests are static pod definitions. Therefore container rules apply.

    So if you add an option with a file path, make sure you make it available to the pod with a hostPath volume.

    0 讨论(0)
  • 2021-01-04 05:15

    in /etc/kubernetes/manifests is a file called kube-apiserver.json. This is a JSON file and contains all the option you can set. I've appended the --basic-auth-file=SOMEFILE and rebooted the system (right after the change of the file kubectl wasn't working anymore and the API was shutdown)

    After a reboot the whole system was working again.

    Update

    I didn't manage to run the dashboard using this. What I did in the end was installing the dashboard on the cluster. copying the keys from the master node (/etc/kubernetes/admin.conf) to my laptop and did kubectl proxy to proxy the traffic of the dashboard to my local machine. Now I can access it on my laptop through 127.0.0.1:8001/ui

    0 讨论(0)
提交回复
热议问题