"kubectl get no" command is not showing master nodes

I created k8s cluster with juju charms. After deployment, when checked with command “kubectl get no” only worker nodes are visible but not showing any master nodes. Can you please help me out to solve this issue.

Hi @getrati99, could you please provide the output from juju status?

Is this question related to one that you asked a few weeks ago?

Hi, Actually previous question was on worker node count details. At that time also I am not getting master node details with specified command. Now, worker node count issue has been solved. but still I am not getting master node counts with same command.

FYR I have 3-masters and 3-worker nodes. 3-worker nodes are showing with kubectl get no but not getting any master node details. Please guide me what may be the issues…

Hey @getrati99,

I have checked out the charmed kubernetes master code and it looks like kubelet is not deployed onto the master nodes. This would be the reason why they don’t show up in a kubectl get nodes command.

Because the kubectl command is working it tells me the api servers are running fine. You can submit a bug at https://bugs.launchpad.net/charmed-kubernetes to get this looked into. It would definitely be a nice feature to have for users that want to deploy monitoring daemon sets to these nodes through kubernetes.


1 Like

thank you very much tlm for your valuable info

Hi tlm, can I get some idea to fix the bug and to overcome this issue…

Perhaps starting installing kubelet on the k8s master node might help?

$ juju ssh kubernetes-master/0 'snap install kubelet'

Any advice from the @k8s-charmers team?

Unfortunately this won’t work snap install kubelet as it will need to be setup with all the options to talk to the api server and have it’s scheduling disabled.

My two cents for the @k8s-charmers would be great to see this as it means workloads can be deployed to the master nodes for monitoring like prometheus node exporter.

It is not currently on our roadmap to add kubelet to kubernetes-master. We would like to add it - we see a lot of benefit to having masters participate as Kubernetes nodes - but other work is higher priority at the moment.

1 Like

Thanks for taking the time to respond.

Do you have a workaround for anyone who would like to do this themselves rather than wait for the functionality to be added to the charm?

I don’t have any workarounds to suggest, sorry.