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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章