如何在 Calico 中卸载或删除策略演示

How to uninstall or remove policy-demo in Calico

calico 的新手,尝试使用 calico 保护 Kubernetes 集群。
我已经使用命令 curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl 安装了 kubectl 参考文档 here.

我尝试通过参考 here 使用 kubectl 命令安装 Calico Kubernetes NetworkPolicy : kubectl create ns policy-demo 创建命名空间

然后创建 nginx pod 和服务:

kubectl run --namespace=policy-demo nginx --replicas=2 --image=nginx

kubectl expose --namespace=policy-demo deployment nginx --port=80

现在,我想从系统中卸载并删除 policy-demo 和命名空间。
有没有蚂蚁方法可以做到这一点并使用命令从我的系统中删除它?
如何卸载和删除策略演示?

有一种简单的方法。
您只需要使用 kubectl delete ns policy-demo 来删除、清理并将使用 kubectl 命令从系统中删除 policy-demo 命名空间。
文档末尾已经提到了:https://docs.projectcalico.org/v2.6/getting-started/kubernetes/tutorials/simple-policy