"Kubectl get componentstatus"의 두 판 사이의 차이

 
(같은 사용자의 중간 판 4개는 보이지 않습니다)
4번째 줄: 4번째 줄:
;kubectl get componentstatus
;kubectl get componentstatus
;kubectl get componentstatuses
;kubectl get componentstatuses
* deprecated
* k8s 1.19에서 deprecated


==Healthy==
<syntaxhighlight lang='console'>
<syntaxhighlight lang='console'>
root@localhost:~# kubectl get componentstatus
root@localhost:~# kubectl get componentstatus
14번째 줄: 15번째 줄:
etcd-0              Healthy  {"health":"true"}
etcd-0              Healthy  {"health":"true"}
scheduler            Healthy  ok
scheduler            Healthy  ok
</syntaxhighlight>
==Unhealthy ==
<syntaxhighlight lang='console'>
$ 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                         
</syntaxhighlight>
<syntaxhighlight lang='console'>
$ 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"}
</syntaxhighlight>
</syntaxhighlight>
<syntaxhighlight lang='console'>
<syntaxhighlight lang='console'>
24번째 줄: 40번째 줄:
etcd-2              Healthy    {"health":"true"}
etcd-2              Healthy    {"health":"true"}
etcd-1              Healthy    {"health":"true"}
etcd-1              Healthy    {"health":"true"}
</syntaxhighlight>
<syntaxhighlight lang='console'>
$ 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
</syntaxhighlight>
==yaml==
<syntaxhighlight lang='console'>
$ 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
</syntaxhighlight>
<syntaxhighlight lang='console'>
$ 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: ""
</syntaxhighlight>
</syntaxhighlight>


==같이 보기==
==같이 보기==
* [[kubectl get]]
* [[kubectl get]]
* [[kubectl get --raw]]
* [[kubectl get leases]]
* [[kubectl api-resources]]
* [[kubectl api-resources]]
==참고==
* https://github.com/kubernetes/kubernetes/issues/35773


[[분류: kubectl]]
[[분류: kubectl]]
[[분류: deprecated]]
[[분류: deprecated]]

2022년 7월 4일 (월) 22:16 기준 최신판

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 }}