赞
踩
1.deployement是部署任务,可以部署pod,job等,而当我们删除容器后会自动拉起一个pod,就是deployment创建的任务来完成的。
- root@ubuntu:/home/ubuntu/Desktop# kubectl get pods
- NAME READY STATUS RESTARTS AGE
- nginx-deployment-6595874d85-xmbv8 1/1 Running 0 3d
- root@ubuntu:/home/ubuntu/Desktop# kubectl describe pods nginx-deployment-6595874d85-xmbv8
- Name: nginx-deployment-6595874d85-xmbv8
- Namespace: default
- Priority: 0
- Node: node1/192.168.20.58
- Start Time: Fri, 20 May 2022 00:53:59 -0700
- Labels: app=nginx
- pod-template-hash=6595874d85
- Annotations: <none>
- Status: Running
- IP: 10.244.1.16
- IPs:
- IP: 10.244.1.16
- Controlled By: ReplicaSet/nginx-deployment-6595874d85
- Containers:
- nginx:
- Container ID: containerd://222162022319cedb2b7d84edc80eccd9dccc2071689a06cc66686fff81d167bc
- Image: nginx:1.14.2
- Image ID: docker.io/library/nginx@sha256:f7988fb6c02e0ce69257d9bd9cf37ae20a60f1df7563c3a2a6abe24160306b8d
- Port: 80/TCP
- Host Port: 0/TCP
- State: Running
- Started: Sun, 22 May 2022 23:59:13 -0700
- Ready: True
- Restart Count: 0
- Environment: <none>
- Mounts:
- /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-pxp9t (ro)
- Conditions:
- Type Status
- Initialized True
- Ready True
- ContainersReady True
- PodScheduled True
- Volumes:
- kube-api-access-pxp9t:
- Type: Projected (a volume that contains injected data from multiple sources)
- TokenExpirationSeconds: 3607
- ConfigMapName: kube-root-ca.crt
- ConfigMapOptional: <nil>
- DownwardAPI: true
- QoS Class: BestEffort
- Node-Selectors: <none>
- Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
- node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
- Events: <none>
- root@ubuntu:/home/ubuntu/Desktop# kubectl get deployment
- NAME READY UP-TO-DATE AVAILABLE AGE
- nginx-deployment 1/1 1 1 3d
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。