I'm trying to get kubelet config.yaml file on my broken production cluster with no luck. The command I am using is:
kubeadm alpha phase kubelet config write-to-disk --config=/var/lib/kubelet/config.yaml
This returns the following error:
no InitConfiguration or ClusterConfiguration kind was found in the YAML file
Could somebody please help me resolve this? Thanks.
You basically need to print the config prior (The one that contains the InitConfiguration
and the ClusterConfiguration
:
$ kubeadm config print-default > cluster.yaml
Then:
$ kubeadm alpha phase kubelet config write-to-disk --config=cluster.yaml