1、开启代理

kubectl proxy --port=8001 

 2、 删除pod 资源
curl 127.0.0.1:8001/api/v1/namespaces/default/pods/nginx-78dc966569-d2bnh -XDELETE

或者

curl --cacert /etc/kubernetes/pki/ca.crt --cert /etc/kubernetes/pki/apiserver-kubelet-client.crt --key /etc/kubernetes/pki/apiserver-kubelet-client.key -k https://192.168.1.10:6443/api/v1/namespaces/default/pods/nginx-78dc966569-d2bnh -XDELETE

posted on 2024-07-19 10:12  MhaiM  阅读(12)  评论(0编辑  收藏  举报