I installed istio using these commands:
VERSION = 1.0.5
GCP = gcloud
K8S = kubectl
@$(K8S) apply -f istio-$(VERSION)/install/kubernetes/helm/istio/templates/crds.yaml
@$(K8S) apply -f istio-$(VERSION)/install/kubernetes/istio-demo-auth.yaml
@$(K8S) get pods -n istio-system
@$(K8S) label namespace default istio-injection=enabled
@$(K8S) get svc istio-ingressgateway -n istio-system
Now, how do I completely uninstall it including all containers/ingress/egress etc (everthing installed by istio-demo-auth.yaml?
Thanks.
5 Deleting a Service or Deployment. Objects can be deleted easily within Kubernetes so that your environment can be cleaned. Use the kubectl delete command to remove an object.
The istioctl command saves the IstioOperator CR that was used to install Istio in a copy of the CR named installed-state. You can inspect this CR if you lose track of what is installed in a cluster. The installed-state CR is also used to perform checks in some istioctl commands and should therefore not be removed.
istioctl install automatically prunes any resources that should be removed when the configuration changes (e.g. if you remove a gateway). This does not happen when you use istio manifest generate with kubectl and these resources must be removed manually.
Using the operator is not recommended for new installations. While the operator will continue to be supported, new feature requests will not be prioritized. The Istio operator provides an installation path without needing the istioctl binary.
If you used istioctl
, it's pretty easy:
istioctl x uninstall --purge
Of course, it would be easier if that command were listed in istioctl --help
...
Reference: https://istio.io/latest/docs/setup/install/istioctl/#uninstall-istio
Based on their documentation here, you can generate all specs as yml
file then pipe it to simple kubectl's delete
operation
istioctl manifest generate <your original installation options> | kubectl delete -f -
here's an example:
istioctl manifest generate --set profile=default | kubectl delete -f -
A drawback of this approach though is to remember all options you have used when you installed istio which might be quite hard to remember especially if you enabled specific components.
If you have installed istio
using helm's chart, you can uninstall it easily
First, list all installed charts:
helm list -n istio-system
NAME NAMESPACE REVISION UPDATED STATUS
istiod istio-system 1 2020-03-07 15:01:56.141094 -0500 EST deployed
and then delete/uninstall the chart using the following syntax:
helm delete -n istio-system --purge istio-system
helm delete -n istio-system --purge istio-init
...
Check their website for more information on how to do this.
If you already installed istio
using istioctl
or helm
in its own separate namespace
, you can easily delete completely that namespace
which will in turn delete all resources created inside it.
kubectl delete namespace istio-system
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With