检查deployment状态 呈轮询式检查deployment的状态,如果检查到deployment的所有pod启动成功并就绪后后检查脚本则退出,状态码返回0; 如果检查超过默认次数(60)后还未成功则超时退出,返回状态码1. kubectl check -d deploy-name#指定deploy名称kubectl check -d deploy-name -c /root/.kube/config-test#指定 kubeconfig...
status: loadBalancer: {} 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 修改deployment文件 apiVersion: apps/v1 kind: Deployment metadata: annotations: kompose.cmd: ./kompose convert -f docker-compose.yaml --volumes hostPath kompos...
nodestatus.MachineInfo(string(kl.nodeName), kl.maxPods, kl.podsPerCore, kl.GetCachedMachineInfo, kl.containerManager.GetCapacity, kl.containerManager.GetDevicePluginResourceCapacity, kl.containerManager.GetNodeAllocatableReservation, kl.recordEvent), nodestatus.VersionInfo(kl.cadvisor.VersionInfo, kl.co...
kubectl delete -f nginx.yaml kubectl delete deployment <deployname> Deployment Commands rollout Therolloutcommand manages the rollout of a resource. Examples: To check the rollout status of a particular deployment: kubectl rollout status deployment/<deployname> ...
# Check the status of a deployment rollout kubectl rollout status deployment/[name]# View rollout history of a deployment kubectl rollout history deployment/[name] # View rollout history of a deployment# Scale a deployment to the specified number of replicas ...
# Check the status of a deployment rollout kubectl rollout status deployment/[name] # View rollout history of a deployment kubectl rollout history deployment/[name] # View rollout history of a deployment # Scale a deployment to the specified number of replicas ...
查看deployment的历史记录 kubectl rollout history deployment/abc 查看daemonset修订版3的详细信息 kubectl rollout history daemonset/abc --revision=3 查看deployment的状态 kubectl rollout status deployment/nginx 将deployment标记为暂停。#只要deployment在暂停中,使用deployment更新将不会生效。 kubectl rollout pause dep...
mysql-deployment 3、kubectl create 创建 [root@master ~]# kubectl create -f mysql-deployment.yaml deployment "mysql" created #使用get参数查看pod详细信息[root@master ~]# kubectl get pods NAME READY STATUS RESTARTS AGE mysql-3013141301-2000x 1/1 Running 0 12s ...
# Restart a workload (e.g. deployment, stateful set, daemon set)kubectl rollout restart-n[namespace][workload-kind]/[workload-name]# Triggers a re-creation of all pods for this workload, adhering to the workload configuration# Check the status of a deployment rolloutkubectl rolloutstatusd...
[root@master cgroup]# kubectlgetdeployment NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE nginx11101m 注:使用docker.io/nginx镜像 ,--port=暴露容器端口 9000 ,设置副本数1 注: 如果docker.io/nginx镜像没有,那么node1和node2会自动在dockerhub上下载。也可以改成自己的私有仓库地址:--image=192.168.10.5:...