KubernetesでDeploymentの詳細を確認する方法を紹介します。
以下のようにkubectlの「describe」コマンドを使用します。
1 |
kubectl describe deployment デプロイメント名 |
試してみます。
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 30 31 32 33 34 |
root@controlplane:~# kubectl describe deployment nginx-deployment Name: nginx-deployment Namespace: default CreationTimestamp: Sun, 06 Feb 2022 11:04:33 +0000 Labels: app=nginx-deployment Annotations: deployment.kubernetes.io/revision: 1 Selector: app=nginx-deployment Replicas: 2 desired | 2 updated | 2 total | 2 available | 0 unavailable StrategyType: RollingUpdate MinReadySeconds: 0 RollingUpdateStrategy: 25% max unavailable, 25% max surge Pod Template: Labels: app=nginx-deployment Containers: nginx: Image: nginx Port: <none> Host Port: <none> Environment: <none> Mounts: <none> Volumes: <none> Conditions: Type Status Reason ---- ------ ------ Available True MinimumReplicasAvailable Progressing True NewReplicaSetAvailable OldReplicaSets: <none> NewReplicaSet: nginx-deployment-84cd76b964 (2/2 replicas created) Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal ScalingReplicaSet 2m59s deployment-controller Scaled up replica set nginx-deployment-84cd76b964 to 2 root@controlplane:~# |