https://rancher.com/ logo
Title
c

calm-france-2744

09/07/2022, 12:01 AM
From a worker node, how can I check if the worker successfully connected to the cluster and is in a ready state? The worker nodes don't seem to have kubectl configured, otherwise I could use it to get the node's status. Just checking the systemd service status doesn't seem to tell me if the node successfully connected to the cluster, just if the service is running. Any ideas other than searching the systemd journal for log messages?
c

creamy-pencil-82913

09/07/2022, 12:34 AM
If the service is running, it's connected. If it cant connect to any server, the service will exit and be restarted continuously by systemd until it can get a connection.
So, just a basic service uptime/restart counter check should suffice for gross health checking
If you need something more granular than that, the kubelet has a poorly documented API that you could probably query
c

calm-france-2744

09/07/2022, 12:37 AM
Awesome, it sounds like just checking the systemd service status will actually work for me then!