K8s 常用命令

查看default命名空間下的所有pod:

kubectl get po -o wide

查看xxx命名空間下的所有pod:

kubectl get po -n xxx -o wide

查看服務:

kubectl get svc -o wide

命令行強制刪除pod:

kubectl delete pod podName --force --grace-period=0

根據配置文件刪除pod:

kubectl delete -f eureka.yml

刪除xxx命名空間下的pod:

kubectl delete pod podName -n xxx
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章