kubectl get componentstatus

1 개요[ | ]

kubectl get cs
kubectl get componentstatus
kubectl get componentstatuses
  • k8s 1.19에서 deprecated

2 Healthy[ | ]

root@localhost:~# kubectl get componentstatus
Warning: v1 ComponentStatus is deprecated in v1.19+
NAME                 STATUS    MESSAGE             ERROR
controller-manager   Healthy   ok
etcd-1               Healthy   {"health":"true"}
etcd-0               Healthy   {"health":"true"}
scheduler            Healthy   ok

3 Unhealthy[ | ]

$ kubectl get cs
NAME                 STATUS      MESSAGE                                                               ERROR
scheduler            Unhealthy   Get http://127.0.0.1:10251/healthz: dial tcp 127.0.0.1:10251: connection refused                          
controller-manager   Unhealthy   Get http://127.0.0.1:10252/healthz: dial tcp 127.0.0.1:10252: connection refused
$ kubectl get cs
NAME                 STATUS      MESSAGE                                                               ERROR
controller-manager   Unhealthy   Get http://127.0.0.1:10252/healthz: dial tcp 127.0.0.1:10252: getsockopt: connection refused
scheduler            Unhealthy   Get http://127.0.0.1:10251/healthz: dial tcp 127.0.0.1:10251: getsockopt: connection refused
etcd-0               Healthy     {"health": "true"}
root@localhost:~# kubectl get componentstatus
Warning: v1 ComponentStatus is deprecated in v1.19+
NAME                 STATUS      MESSAGE
scheduler            Unhealthy   Get http://127.0.0.1:10251/healthz: dial tcp 12
controller-manager   Unhealthy   Get http://127.0.0.1:10252/healthz: dial tcp 12
etcd-0               Healthy     {"health":"true"}
etcd-2               Healthy     {"health":"true"}
etcd-1               Healthy     {"health":"true"}
$ kubectl get componentstatuses
NAME                 STATUS      MESSAGE                                                               ERROR
scheduler            Healthy     ok                                                                    
controller-manager   Healthy     ok                                                                    
etcd-0               Unhealthy   Get https://172.16.4.205:2379/health: remote error: bad certificate   
etcd-1               Unhealthy   Get https://172.16.4.54:2379/health: remote error: bad certificate    
etcd-2               Unhealthy   Get https://172.16.4.206:2379/health: remote error: bad certificate

4 yaml[ | ]

$ kubectl get cs
Warning: v1 ComponentStatus is deprecated in v1.19+
NAME                 STATUS    MESSAGE             ERROR
controller-manager   Healthy   ok
etcd-0               Healthy   {"health":"true"}
etcd-1               Healthy   {"health":"true"}
scheduler            Healthy   ok
$ kubectl get cs -oyaml
Warning: v1 ComponentStatus is deprecated in v1.19+
apiVersion: v1
items:
- apiVersion: v1
  conditions:
  - message: ok
    status: "True"
    type: Healthy
  kind: ComponentStatus
  metadata:
    creationTimestamp: null
    name: controller-manager
    selfLink: /api/v1/componentstatuses/controller-manager
- apiVersion: v1
  conditions:
  - message: ok
    status: "True"
    type: Healthy
  kind: ComponentStatus
  metadata:
    creationTimestamp: null
    name: scheduler
    selfLink: /api/v1/componentstatuses/scheduler
- apiVersion: v1
  conditions:
  - message: '{"health":"true"}'
    status: "True"
    type: Healthy
  kind: ComponentStatus
  metadata:
    creationTimestamp: null
    name: etcd-1
    selfLink: /api/v1/componentstatuses/etcd-1
- apiVersion: v1
  conditions:
  - message: '{"health":"true"}'
    status: "True"
    type: Healthy
  kind: ComponentStatus
  metadata:
    creationTimestamp: null
    name: etcd-0
    selfLink: /api/v1/componentstatuses/etcd-0
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""

5 같이 보기[ | ]

6 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}