0

new to calico, trying to secure Kubernetes cluster using calico.
I have installed kubectl using command curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl referring the docs here.

I tried to install Calico Kubernetes NetworkPolicy using kubectl commands by refereeing here : kubectl create ns policy-demo creating namespace

This is then followed by creating nginx pod and services:

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

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

Now, I want to uninstall and remove the policy-demo and namespace from the system.
Is there is ant way I can do it and remove this from my system using command?
How can I uninstall and remove the policy-demo?

1 Answers1

1

There is a simple way of doing it.
You just need to use kubectl delete ns policy-demo to remove, clean and will delete the policy-demo namespace from the system using kubectl command.
It is already mentioned here in the end of the document: https://docs.projectcalico.org/v2.6/getting-started/kubernetes/tutorials/simple-policy

Anirban Sen Chowdhary
  • 8,233
  • 6
  • 39
  • 81