Score:0

Kubernetes component status reports etcd as unhealthy

cn flag

I have a 3 node kube control network setup with etcd, kube-apiserver, kube-control-manager and kube-scheduler running. When I check the status of the components it says etcd is unhealthy, but etcd reports that is healthy

> kubectl get componentstatus --kubeconfig .kube/admin.kubeconfig

Warning: v1 ComponentStatus is deprecated in v1.19+
NAME                 STATUS      MESSAGE                                  ERROR
etcd-0               Unhealthy   HTTP probe failed with statuscode: 404
etcd-2               Unhealthy   HTTP probe failed with statuscode: 404
etcd-1               Unhealthy   HTTP probe failed with statuscode: 404
scheduler            Healthy     ok
controller-manager   Healthy     ok

And when I check the status of etcd I get the below result

> etcdctl endpoint health --write-out=table
+------------------------+--------+------------+-------+
|        ENDPOINT        | HEALTH |    TOOK    | ERROR |
+------------------------+--------+------------+-------+
| http://10.0.1.164:2379 |   true | 2.867446ms |       |
|  http://10.0.1.62:2379 |   true | 3.305321ms |       |
| http://10.0.1.176:2379 |   true | 6.970254ms |       |
+------------------------+--------+------------+-------+

I am also able to put and retrieve items from etcd, the endpoints provided to kube-apiserver are also correct. How do I debug an issue like this?

Score:0
kp flag

The status of etcd is healthy and working fine but when you are checking its component status its says etcd is unhealthy this is due to kubectl get componentstatus API object is no longer supported and it is in plan to deprecate it. This is a known issue unfortunately it is not going to be fixed as the feature is planned to be deprecated. Also, see this source for a reason.

Component status API is Still in enhancement mode, refer to this Git link and waiting for official confirmation to get removed.

As you are able to retrieve items from etcd, the endpoints provided to kube-apiserver are also correct, then ignore this error and proceed further.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.