kubectl describe pods

Jmnote (토론 | 기여)님의 2018년 10월 9일 (화) 21:52 판

1 개요

kubectl describe pods

2 예시 1

$ kubectl get pods
NAME                                   READY     STATUS    RESTARTS  AGE
kubernetes-bootcamp-5dbf48f7d4-pwr7b   1/1       Running   0  21s
$ kubectl describe pods
Name:           kubernetes-bootcamp-5dbf48f7d4-pwr7b
Namespace:      default
Node:           host01/172.17.0.39
Start Time:     Fri, 20 Apr 2018 11:44:49 +0000
Labels:         pod-template-hash=1869049380
                run=kubernetes-bootcamp
Annotations:    <none>
Status:         Running
IP:             172.18.0.4
Controlled By:  ReplicaSet/kubernetes-bootcamp-5dbf48f7d4
Containers:
  kubernetes-bootcamp:
    Container ID:   docker://3ba4e641e99361cc7db31fe510276f989be74fc3d3a72ea46fe2f703543cef01
    Image:          gcr.io/google-samples/kubernetes-bootcamp:v1
    Image ID:       docker-pullable://jocatalin/kubernetes-bootcamp@sha256:0d6b8ee63bb57c5f5b6156f446b3bc3b3c143d233037f3a2f00e279c8fcc64af
    Port:           8080/TCP
    State:          Running
      Started:      Fri, 20 Apr 2018 11:44:50 +0000
    Ready:          True
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-9zhsg (ro)
Conditions:
  Type           Status
  Initialized    True
  Ready          True
  PodScheduled   True
Volumes:
  default-token-9zhsg:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-9zhsg
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     <none>
Events:
  Type     Reason                 Age                From    Message
  ----     ------                 ----               ----    -------
  Warning  FailedScheduling       22s (x4 over 25s)  default-scheduler  0/1 nodes are available: 1 NodeNotReady.
  Normal   Scheduled              18s                default-scheduler  Successfully assigned kubernetes-bootcamp-5dbf48f7d4-pwr7b to host01
  Normal   SuccessfulMountVolume  17s                kubelet, host01    MountVolume.SetUp succeeded for volume "default-token-9zhsg"
  Normal   Pulled                 17s                kubelet, host01    Container image "gcr.io/google-samples/kubernetes-bootcamp:v1" already present on machine
  Normal   Created                17s                kubelet, host01    Created container
  Normal   Started                17s                kubelet, host01    Started container

3 예시 2

$ kubectl get pods
NAME                                   READY     STATUS    RESTARTS   AGE
kubernetes-bootcamp-5dbf48f7d4-6j9l8   1/1       Running   0          2m
kubernetes-bootcamp-5dbf48f7d4-8dw6t   1/1       Running   0          2m
kubernetes-bootcamp-5dbf48f7d4-hn9l4   1/1       Running   0          2m
kubernetes-bootcamp-5dbf48f7d4-mhb2l   1/1       Running   0          2m
$ kubectl describe pods
Name:           kubernetes-bootcamp-5dbf48f7d4-6j9l8
Namespace:      default
Node:           host01/172.17.0.35
Start Time:     Mon, 23 Apr 2018 01:02:49 +0000
Labels:         pod-template-hash=1869049380
                run=kubernetes-bootcamp
Annotations:    <none>
Status:         Running
IP:             172.18.0.5
Controlled By:  ReplicaSet/kubernetes-bootcamp-5dbf48f7d4
Containers:
  kubernetes-bootcamp:
    Container ID:   docker://574b146b3adce406d1044d728f3861c2ec0b10bf7e864007a97a2befd2bd3599
    Image:          gcr.io/google-samples/kubernetes-bootcamp:v1
    Image ID:       docker-pullable://jocatalin/kubernetes-bootcamp@sha256:0d6b8ee63bb57c5f5b6156f446b3bc3b3c143d233037f3a2f00e279c8fcc64af
    Port:           8080/TCP
    State:          Running
      Started:      Mon, 23 Apr 2018 01:02:51 +0000
    Ready:          True
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-2799w (ro)
Conditions:
  Type           Status
  Initialized    True
  Ready          True
  PodScheduled   True
Volumes:
  default-token-2799w:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-2799w
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     <none>
Events:
  Type     Reason                 Age                From               Message
  ----     ------                 ----               ----               -------
  Warning  FailedScheduling       40s (x4 over 43s)  default-scheduler  0/1 nodes are available: 1 NodeNotReady.
  Normal   Scheduled              36s                default-scheduler  Successfully assigned kubernetes-bootcamp-5dbf48f7d4-6j9l8 to host01
  Normal   SuccessfulMountVolume  35s                kubelet, host01    MountVolume.SetUp succeeded for volume "default-token-2799w"
  Normal   Pulled                 35s                kubelet, host01    Container image "gcr.io/google-samples/kubernetes-bootcamp:v1" already present on machine
  Normal   Created                35s                kubelet, host01    Created container
  Normal   Started                34s                kubelet, host01    Started container


Name:           kubernetes-bootcamp-5dbf48f7d4-8dw6t
Namespace:      default
Node:           host01/172.17.0.35
Start Time:     Mon, 23 Apr 2018 01:02:49 +0000
Labels:         pod-template-hash=1869049380
                run=kubernetes-bootcamp
Annotations:    <none>
Status:         Running
IP:             172.18.0.4
Controlled By:  ReplicaSet/kubernetes-bootcamp-5dbf48f7d4
Containers:
  kubernetes-bootcamp:
    Container ID:   docker://44b9feea57b8ba3fb3ee30358065f2f1960a834a775965e431dbcb09ecec0850
    Image:          gcr.io/google-samples/kubernetes-bootcamp:v1
    Image ID:       docker-pullable://jocatalin/kubernetes-bootcamp@sha256:0d6b8ee63bb57c5f5b6156f446b3bc3b3c143d233037f3a2f00e279c8fcc64af
    Port:           8080/TCP
    State:          Running
      Started:      Mon, 23 Apr 2018 01:02:50 +0000
    Ready:          True
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-2799w (ro)
Conditions:
  Type           Status
  Initialized    True
  Ready          True
  PodScheduled   True
Volumes:
  default-token-2799w:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-2799w
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     <none>
Events:
  Type     Reason                 Age                From               Message
  ----     ------                 ----               ----               -------
  Warning  FailedScheduling       40s (x4 over 43s)  default-scheduler  0/1 nodes are available: 1 NodeNotReady.
  Normal   Scheduled              36s                default-scheduler  Successfully assigned kubernetes-bootcamp-5dbf48f7d4-8dw6t to host01
  Normal   SuccessfulMountVolume  36s                kubelet, host01    MountVolume.SetUp succeeded for volume "default-token-2799w"
  Normal   Pulled                 35s                kubelet, host01    Container image "gcr.io/google-samples/kubernetes-bootcamp:v1" already present on machine
  Normal   Created                35s                kubelet, host01    Created container
  Normal   Started                35s                kubelet, host01    Started container


Name:           kubernetes-bootcamp-5dbf48f7d4-hn9l4
Namespace:      default
Node:           host01/172.17.0.35
Start Time:     Mon, 23 Apr 2018 01:02:49 +0000
Labels:         pod-template-hash=1869049380
                run=kubernetes-bootcamp
Annotations:    <none>
Status:         Running
IP:             172.18.0.7
Controlled By:  ReplicaSet/kubernetes-bootcamp-5dbf48f7d4
Containers:
  kubernetes-bootcamp:
    Container ID:   docker://0396ace80b7989bf5451327529ccd919f54b94e6f0027b99d87188d800eb2eef
    Image:          gcr.io/google-samples/kubernetes-bootcamp:v1
    Image ID:       docker-pullable://jocatalin/kubernetes-bootcamp@sha256:0d6b8ee63bb57c5f5b6156f446b3bc3b3c143d233037f3a2f00e279c8fcc64af
    Port:           8080/TCP
    State:          Running
      Started:      Mon, 23 Apr 2018 01:02:53 +0000
    Ready:          True
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-2799w (ro)
Conditions:
  Type           Status
  Initialized    True
  Ready          True
  PodScheduled   True
Volumes:
  default-token-2799w:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-2799w
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     <none>
Events:
  Type     Reason                 Age                From               Message
  ----     ------                 ----               ----               -------
  Warning  FailedScheduling       40s (x4 over 43s)  default-scheduler  0/1 nodes are available: 1 NodeNotReady.
  Normal   Scheduled              36s                default-scheduler  Successfully assigned kubernetes-bootcamp-5dbf48f7d4-hn9l4 to host01
  Normal   SuccessfulMountVolume  34s                kubelet, host01    MountVolume.SetUp succeeded for volume "default-token-2799w"
  Normal   Pulled                 33s                kubelet, host01    Container image "gcr.io/google-samples/kubernetes-bootcamp:v1" already present on machine
  Normal   Created                33s                kubelet, host01    Created container
  Normal   Started                32s                kubelet, host01    Started container


Name:           kubernetes-bootcamp-5dbf48f7d4-mhb2l
Namespace:      default
Node:           host01/172.17.0.35
Start Time:     Mon, 23 Apr 2018 01:02:49 +0000
Labels:         pod-template-hash=1869049380
                run=kubernetes-bootcamp
Annotations:    <none>
Status:         Running
IP:             172.18.0.6
Controlled By:  ReplicaSet/kubernetes-bootcamp-5dbf48f7d4
Containers:
  kubernetes-bootcamp:
    Container ID:   docker://924a90d5502a54553bfe97da7dd4a50ab3d5797302687112fe2037937dc27de2
    Image:          gcr.io/google-samples/kubernetes-bootcamp:v1
    Image ID:       docker-pullable://jocatalin/kubernetes-bootcamp@sha256:0d6b8ee63bb57c5f5b6156f446b3bc3b3c143d233037f3a2f00e279c8fcc64af
    Port:           8080/TCP
    State:          Running
      Started:      Mon, 23 Apr 2018 01:02:51 +0000
    Ready:          True
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-2799w (ro)
Conditions:
  Type           Status
  Initialized    True
  Ready          True
  PodScheduled   True
Volumes:
  default-token-2799w:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-2799w
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     <none>
Events:
  Type     Reason                 Age                From               Message
  ----     ------                 ----               ----               -------
  Warning  FailedScheduling       40s (x4 over 43s)  default-scheduler  0/1 nodes are available: 1 NodeNotReady.
  Normal   Scheduled              36s                default-scheduler  Successfully assigned kubernetes-bootcamp-5dbf48f7d4-mhb2l to host01
  Normal   SuccessfulMountVolume  35s                kubelet, host01    MountVolume.SetUp succeeded for volume "default-token-2799w"
  Normal   Pulled                 34s                kubelet, host01    Container image "gcr.io/google-samples/kubernetes-bootcamp:v1" already present on machine
  Normal   Created                34s                kubelet, host01    Created container
  Normal   Started                34s                kubelet, host01    Started container

4 같이 보기

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