c icon indicating copy to clipboard operation
c copied to clipboard

Is there an api to get node status?

Open yess1987 opened this issue 3 years ago • 7 comments

We need to use the c library to get the node status, is there a solution?

yess1987 avatar Aug 19 '22 08:08 yess1987

Is this OK ?

https://github.com/kubernetes-client/c/blob/master/kubernetes/docs/CoreV1API.md#CoreV1API_readNodeStatus

ityuhui avatar Aug 19 '22 08:08 ityuhui

let me try and wait for my good news

yess1987 avatar Aug 19 '22 08:08 yess1987

We need to use the c library to get the role of etcd , is there a solution?

yess1987 avatar Aug 19 '22 08:08 yess1987

Can you describe in detail about "the role of etcd" ?

e.g. Is the etcd a built-in component of Kubernetes (for API Server to save cluster information) or something you deploy it for your workload ?

And is this what you want ? kubectl exec etcd-kind-control-plane -n kube-system -- etcdctl role list

ityuhui avatar Aug 19 '22 09:08 ityuhui

I need to know which node is the leader in k8s, so consider using the leader in etcd

yess1987 avatar Aug 19 '22 11:08 yess1987

Can you find a solution for your requirement via kubectl?

The C client library only communicates with the Kubernetes API server, which behaves like client-go/kubectl.

ityuhui avatar Aug 23 '22 01:08 ityuhui

You shouldn't need to look at etcd, you can look at the labels on the node to determine where the api server is, specifically the node-role.kubernetes.io/control-plane should be present on any nodes that contain the Kubernetes control plane.

brendandburns avatar Aug 23 '22 21:08 brendandburns

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Nov 21 '22 21:11 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Dec 21 '22 22:12 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-triage-robot avatar Jan 20 '23 23:01 k8s-triage-robot

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Jan 20 '23 23:01 k8s-ci-robot