Uninstalling Knative
To uninstall an Operator-based Knative installation, follow the Uninstall an Operator-based Knative Installation procedure below. To uninstall a YAML-based Knative installation, follow the Uninstall a YAML-based Knative Installation procedure below.
Uninstalling a YAML-based Knative installation
To uninstall a YAML-based Knative installation:
Uninstalling optional Serving extensions
Uninstall any Serving extensions you have installed by following the relevant steps below:
Knative also supports the use of the Kubernetes Horizontal Pod Autoscaler (HPA) for driving autoscaling decisions. The following command will uninstall the components needed to support HPA-class autoscaling:
kubectl delete -f https://github.com/knative/serving/releases/download/v0.23.0/serving-hpa.yaml
Uninstall the component that integrates Knative with cert-manager:
kubectl delete -f https://github.com/knative/net-certmanager/releases/download/v0.23.0/release.yaml
Optional: if you no longer need cert-manager, uninstall it by following the steps in the cert-manager documentation.
Uninstall the net-http01
controller by running:
kubectl delete -f https://github.com/knative/net-http01/releases/download/v0.23.0/release.yaml
Uninstall the components needed to provision wildcard certificates in each namespace by running:
kubectl delete -f https://github.com/knative/serving/releases/download/v0.23.0/serving-nscert.yaml
To uninstall the DomainMapping
components run:
kubectl delete -f https://github.com/knative/serving/releases/download/v0.23.0/serving-domainmapping.yaml
kubectl delete -f https://github.com/knative/serving/releases/download/v0.23.0/serving-domainmapping-crds.yaml
Uninstalling a networking layer
Follow the relevant procedure to uninstall the networking layer you installed:
The following commands uninstall Ambassador and enable its Knative integration.
Uninstall Ambassador by running:
kubectl delete --namespace ambassador \
-f https://getambassador.io/yaml/ambassador/ambassador-crds.yaml \
-f https://getambassador.io/yaml/ambassador/ambassador-rbac.yaml \
-f https://getambassador.io/yaml/ambassador/ambassador-service.yaml
Delete the Ambassador namespace:
kubectl delete namespace ambassador
The following commands uninstall Contour and enable its Knative integration.
Uninstall the Knative Contour controller by running:
kubectl delete -f https://github.com/knative/net-contour/releases/download/v0.23.0/net-contour.yaml
Uninstall Contour:
kubectl delete -f https://github.com/knative/net-contour/releases/download/v0.23.0/contour.yaml
Uninstall Gloo and the Knative integration by running:
glooctl uninstall knative
The following commands uninstall Istio and enable its Knative integration.
Uninstall the Knative Istio controller by running:
kubectl delete -f https://github.com/knative/net-istio/releases/download/v0.23.0/net-istio.yaml
Optional: if you no longer need Istio, uninstall it by running:
kubectl delete -f https://github.com/knative/net-istio/releases/download/v0.23.0/istio.yaml
Uninstall Kong Ingress Controller by running:
kubectl delete -f https://raw.githubusercontent.com/Kong/kubernetes-ingress-controller/0.9.x/deploy/single/all-in-one-dbless.yaml
Uninstall the Knative Kourier controller by running:
kubectl delete -f https://github.com/knative/net-kourier/releases/download/v0.23.0/kourier.yaml
Uninstalling the Serving component
Uninstall the Serving core components by running:
kubectl delete -f https://storage.googleapis.com/knative-nightly/serving/latest/serving-core.yaml
Uninstall the required custom resources by running:
kubectl delete -f https://storage.googleapis.com/knative-nightly/serving/latest/serving-crds.yaml
Uninstalling optional Eventing extensions
Uninstall any Eventing extensions you have installed by following the relevant procedure below:
- Apache Kafka Sink
- Sugar Controller
- GitHub Source
- Apache Camel-K Source
- Apache Kafka Source
- GCP Sources
- Apache CouchDB Source
- VMware Sources and Bindings
Uninstall the Kafka Sink data plane:
kubectl delete -f https://github.com/knative-sandbox/eventing-kafka-broker/releases/download/v0.23.0/eventing-kafka-sink.yaml
Uninstall the Kafka controller:
kubectl delete -f https://github.com/knative-sandbox/eventing-kafka-broker/releases/download/v0.23.0/eventing-kafka-controller.yaml
Uninstall the Eventing Sugar Controller by running:
kubectl delete -f https://github.com/knative/eventing/releases/download/v0.23.0/eventing-sugar-controller.yaml
Uninstall a single-tenant GitHub source by running:
kubectl delete -f https://github.com/knative-sandbox/eventing-github/releases/download/v0.23.0/github.yaml
Uninstall a multi-tenant GitHub source by running:
kubectl delete -f https://github.com/knative-sandbox/eventing-github/releases/download/v0.23.0/mt-github.yaml
Uninstall the Apache Camel-K Source by running:
kubectl delete -f https://github.com/knative-sandbox/eventing-camel/releases/download/v0.23.0/camel.yaml
Uninstall the Apache Kafka source by running:
kubectl delete -f https://github.com/knative-sandbox/eventing-kafka/releases/download/v0.23.0/source.yaml
Uninstall the GCP sources by running:
kubectl delete -f https://github.com/google/knative-gcp/releases/download/v0.23.0/cloud-run-events.yaml
Uninstall the Apache CouchDB source by running:
kubectl delete -f https://github.com/knative-sandbox/eventing-couchdb/releases/download/v0.23.0/couchdb.yaml
Uninstall the VMware sources and bindings by running:
kubectl delete -f https://github.com/vmware-tanzu/sources-for-knative/releases/download/v0.23.0/release.yaml
Uninstalling an optional Broker (Eventing) layer
Uninstall a Broker (Eventing) layer, if you installed one:
Uninstall the Kafka Broker data plane by running the following command:
kubectl delete -f https://github.com/knative-sandbox/eventing-kafka-broker/releases/download/v0.23.0/eventing-kafka-broker.yaml
Uninstall the Kafka controller by running the following command:
kubectl delete -f https://github.com/knative-sandbox/eventing-kafka-broker/releases/download/v0.23.0/eventing-kafka-controller.yaml
Uninstall the broker by running:
kubectl delete -f https://github.com/knative/eventing/releases/download/v0.23.0/mt-channel-broker.yaml
Uninstalling optional channel (messaging) layers
Uninstall each channel layer you have installed:
Uninstall the Apache Kafka Channel by running:
curl -L "https://github.com/knative-sandbox/eventing-kafka/releases/download/v0.23.0/channel-consolidated.yaml" \
| sed 's/REPLACE_WITH_CLUSTER_URL/my-cluster-kafka-bootstrap.kafka:9092/' \
| kubectl delete -f -
Uninstall the Google Cloud Pub/Sub Channel by running:
kubectl delete -f https://github.com/google/knative-gcp/releases/download/v0.23.0/cloud-run-events.yaml
Uninstall the in-memory channel implementation by running:
kubectl delete -f https://github.com/knative/eventing/releases/download/v0.23.0/in-memory-channel.yaml
Uninstall the NATS Streaming channel by running:
kubectl delete -f https://github.com/knative-sandbox/eventing-natss/releases/download/v0.23.0/300-natss-channel.yaml
Uninstall NATS Streaming for Kubernetes. For more information, see the eventing-natss repository in GitHub.
Uninstalling the Eventing component
Uninstall the Eventing core components by running:
kubectl delete -f https://storage.googleapis.com/knative-nightly/eventing/latest/eventing-core.yaml
Uninstall the required custom resources by running:
kubectl delete -f https://storage.googleapis.com/knative-nightly/eventing/latest/eventing-crds.yaml
Uninstall an Operator-based Knative installation
To uninstall an Operator-based Knative installation, follow the procedures below.
Removing the Knative Serving component
Remove the Knative Serving CR:
kubectl delete KnativeServing knative-serving -n knative-serving
Removing Knative Eventing component
Remove the Knative Eventing CR:
kubectl delete KnativeEventing knative-eventing -n knative-eventing
Knative operator prevents unsafe removal of Knative resources. Even if the Knative Serving and Knative Eventing CRs are successfully removed, all the CRDs in Knative are still kept in the cluster. All your resources relying on Knative CRDs can still work.
Removing the Knative Operator:
If you have installed Knative using the Release page, remove the operator using the following command:
kubectl delete -f https://github.com/knative/operator/releases/download/v0.23.0/operator.yaml
If you have installed Knative from source, uninstall it using the following command while in the root directory for the source:
ko delete -f config/