0

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?

George
  • 113
  • 1
  • 2
  • 7

1 Answers1

0

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.

Hemanth Kumar
  • 314
  • 2
  • 7
  • @George : I hope the above information clarifies your queries. Could you please let me know if you have any additional queries and I am happy to assist further. [What should I do when someone answers my question?](https://stackoverflow.com/help/someone-answers) – Hemanth Kumar Jul 07 '23 at 03:56