kubernetes-client / c

Official C client library for Kubernetes
Apache License 2.0
141 stars 45 forks source link

How to get node status (include "Ready" or "Notready") like using "kubectl get nodes” wiht “C api” ? #143

Closed wcamellia closed 1 year ago

ityuhui commented 1 year ago

You can check out the API list at https://github.com/kubernetes-client/c/blob/master/kubernetes/README.md#documentation-for-api-endpoints

I think https://github.com/kubernetes-client/c/blob/master/kubernetes/docs/CoreV1API.md#CoreV1API_listNode is what you want.

wcamellia commented 1 year ago

You can check out the API list at https://github.com/kubernetes-client/c/blob/master/kubernetes/README.md#documentation-for-api-endpoints

I think https://github.com/kubernetes-client/c/blob/master/kubernetes/docs/CoreV1API.md#CoreV1API_listNode is what you want.

Thank you very much for your answer and patience!

wcamellia commented 1 year ago

sorry , I do not find the "Ready" or "Notready" in "https://github.com/kubernetes-client/c/blob/master/kubernetes/docs/CoreV1API.md#CoreV1API_listNode“ , I only find the ”condition“ in ”v1_node_t“ structure ,I only want the ”Ready“ or ”Notready“ like using command ”kubectl get nodes “

ityuhui commented 1 year ago

I think "Ready" comes from the type of condition:

Status: True
Type: Ready
Message: kubelet is posting ready status
wcamellia commented 1 year ago

I think "Ready" comes from the type of condition:

Status: True
Type: Ready
Message: kubelet is posting ready status

Thank you very much !

wcamellia commented 1 year ago

thanks for ityuhui