KubernetesでReplicaSetの詳細を確認する方法を紹介します。
以下のようにkubectlの「describe」コマンドを使用します。
1 |
kubectl describe replicaset レプリカセット名 |
試してみます。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
root@controlplane:~# kubectl describe replicaset nginx-6799fc88d8 Name: nginx-6799fc88d8 Namespace: default Selector: app=nginx,pod-template-hash=6799fc88d8 Labels: app=nginx pod-template-hash=6799fc88d8 Annotations: deployment.kubernetes.io/desired-replicas: 2 deployment.kubernetes.io/max-replicas: 3 deployment.kubernetes.io/revision: 1 Controlled By: Deployment/nginx Replicas: 2 current / 2 desired Pods Status: 2 Running / 0 Waiting / 0 Succeeded / 0 Failed Pod Template: Labels: app=nginx pod-template-hash=6799fc88d8 Containers: nginx: Image: nginx Port: <none> Host Port: <none> Environment: <none> Mounts: <none> Volumes: <none> Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal SuccessfulCreate 119s replicaset-controller Created pod: nginx-6799fc88d8-nnvbw Normal SuccessfulCreate 119s replicaset-controller Created pod: nginx-6799fc88d8-t792n root@controlplane:~# |