欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

kubectl命令

程序员文章站 2024-03-11 16:32:31
...
  1. 从容器中拷贝文件

kubectl cp -n namespace pod_name:app/test.txt ./test.txt

  1. 查看pod详情

kubectl describe pods -n namespace

  1. 删除节点

#先停止服务

systemctl stop docker

systemctl stop kubelet

kubectl delete node node_name

  1. 删除pod

kubectl delete pod pod_name -n namespace

强制删除

kubectl delete pod pod_name -n namespace --grace-period=0 --force

  1. 回滚

kubectl rollout history deployment/grafana -n kubesphere-monitoring-system

kubectl rollout history deployment/grafana --revision=83 -n kubesphere-monitoring-system

kubectl rollout undo deployment/grafana --to-revision=1 -n kubesphere-monitoring-system

相关标签: kubectl