步骤
Service
kubectl get services -n feature-1 | grep xxx
xxx-cloud-xxx-xxx-service ClusterIP 172.21.7.9 <none> 8080/TCP,9999/TCP 5d23h
Deployment
kubectl get deployments xxx-cloud-xxx-xxx-service -n feature-1
NAME READY UP-TO-DATE AVAILABLE AGE
xxx-cloud-xxx-xxx-service 1/1 1 1 5d23h
重启Deployment
kubectl rollout restart deployment xxx-cloud-xxx-xxx-service -n feature-1
查看Deployment重启状态
kubectl rollout status deployment xxx-cloud-xxx-xxx-service -n feature-1
参考:
- How to Restart Kubernetes Pods With Kubectl
- Deployments
文章来源地址https://www.toymoban.com/news/detail-516021.html
文章来源:https://www.toymoban.com/news/detail-516021.html
到了这里,关于k8s重启服务(kubectl)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!