Uninstalling Knative

    To uninstall a YAML-based Knative installation:

    Uninstall any Serving extensions you have installed by performing the steps in the following relevant tab:

    HPA autoscaling

    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:

    TLS with cert-manager

    1. Uninstall the component that integrates Knative with cert-manager:
    1. Optional: if you no longer need cert-manager, uninstall it by following the steps in the cert-manager documentation.

    TLS via HTTP01

    Uninstall the net-http01 controller by running:

    1. kubectl delete -f https://github.com/knative/net-http01/releases/download/v0.26.0/release.yaml

    TLS wildcard support

    Uninstall the components needed to provision wildcard certificates in each namespace by running:

    1. kubectl delete -f https://github.com/knative/serving/releases/download/v0.26.0/serving-nscert.yaml

    Uninstalling a networking layer

    Follow the relevant procedure to uninstall the networking layer you installed:

    Ambassador

    The following commands uninstall Ambassador and enable its Knative integration.

    1. Uninstall Ambassador by running:
    1. kubectl delete --namespace ambassador \
    2. -f https://getambassador.io/yaml/ambassador/ambassador-crds.yaml \
    3. -f https://getambassador.io/yaml/ambassador/ambassador-rbac.yaml \
    1. Delete the Ambassador namespace:
    1. kubectl delete namespace ambassador

    Contour

    The following commands uninstall Contour and enable its Knative integration.

    1. Uninstall the Knative Contour controller by running:

      1. kubectl delete -f https://github.com/knative/net-contour/releases/download/v0.26.0/net-contour.yaml
    2. Uninstall Contour:

      1. kubectl delete -f https://github.com/knative/net-contour/releases/download/v0.26.0/contour.yaml

    Istio

    The following commands uninstall Istio and enable its Knative integration.

    1. Uninstall the Knative Istio controller by running:

      1. kubectl delete -f https://github.com/knative/net-istio/releases/download/v0.26.0/net-istio.yaml
    2. Optional: if you no longer need Istio, uninstall it by running:

    Uninstall the Knative Kourier controller by running:

    1. kubectl delete -f https://github.com/knative/net-kourier/releases/download/v0.26.0/kourier.yaml

    Uninstalling the Serving component

    1. Uninstall the Serving core components by running:

    2. Uninstall the required custom resources by running:

      1. kubectl delete -f https://storage.googleapis.com/knative-nightly/serving/latest/serving-crds.yaml

    Uninstall any Eventing extensions you have installed by following the relevant procedure:

    Apache Kafka Sink

    1. Uninstall the Kafka Sink data plane:
    1. kubectl delete -f https://github.com/knative-sandbox/eventing-kafka-broker/releases/download/v0.26.0/eventing-kafka-sink.yaml
    1. Uninstall the Kafka controller:
    1. kubectl delete -f https://github.com/knative-sandbox/eventing-kafka-broker/releases/download/v0.26.0/eventing-kafka-controller.yaml

    Sugar Controller

    Uninstall the Eventing Sugar Controller by running:

    1. kubectl delete -f https://github.com/knative/eventing/releases/download/v0.26.0/eventing-sugar-controller.yaml

    GitHub Source

    Uninstall a single-tenant GitHub source by running:

    1. kubectl delete -f https://github.com/knative-sandbox/eventing-github/releases/download/v0.26.0/github.yaml

    Uninstall a multi-tenant GitHub source by running:

    1. kubectl delete -f https://github.com/knative-sandbox/eventing-github/releases/download/v0.26.0/mt-github.yaml

    Apache Kafka Source

    Uninstall the Apache Kafka source by running:

      GCP Sources

      Uninstall the GCP sources by running:

      1. kubectl delete -f https://github.com/google/knative-gcp/releases/download/v0.26.0/cloud-run-events.yaml

      Apache CouchDB Source

      Uninstall the Apache CouchDB source by running:

      1. kubectl delete -f https://github.com/knative-sandbox/eventing-couchdb/releases/download/v0.26.0/couchdb.yaml

      VMware Sources and Bindings

      Uninstall the VMware sources and bindings by running:

      1. kubectl delete -f https://github.com/vmware-tanzu/sources-for-knative/releases/download/v0.26.0/release.yaml

      Uninstalling an optional Broker (Eventing) layer

      Uninstall a Broker (Eventing) layer, if you installed one:

      Apache Kafka Broker

      1. Uninstall the Kafka controller by running the following command:

      MT-Channel-based

      Uninstall the broker by running:

      1. kubectl delete -f https://github.com/knative/eventing/releases/download/v0.26.0/mt-channel-broker.yaml

      Uninstalling optional channel (messaging) layers

      Uninstall each channel layer you have installed:

      Apache Kafka Channel

      Uninstall the Apache Kafka Channel by running:

      1. curl -L "https://github.com/knative-sandbox/eventing-kafka/releases/download/v0.26.0/channel-consolidated.yaml" \
      2. | sed 's/REPLACE_WITH_CLUSTER_URL/my-cluster-kafka-bootstrap.kafka:9092/' \
      3. | kubectl delete -f -

      Google Cloud Pub/Sub Channel

      Uninstall the Google Cloud Pub/Sub Channel by running:

      1. kubectl delete -f https://github.com/google/knative-gcp/releases/download/v0.26.0/cloud-run-events.yaml

      In-Memory (standalone)

      Uninstall the in-memory channel implementation by running:

      1. kubectl delete -f https://github.com/knative/eventing/releases/download/v0.26.0/in-memory-channel.yaml

      NATS Channel

      1. Uninstall the NATS Streaming channel by running:

        1. kubectl delete -f https://github.com/knative-sandbox/eventing-natss/releases/download/v0.26.0/eventing-natss.yaml
      2. Uninstall NATS Streaming for Kubernetes. For more information, see the repository in GitHub.

      1. Uninstall the Eventing core components by running:

        1. kubectl delete -f https://storage.googleapis.com/knative-nightly/eventing/latest/eventing-core.yaml
      2. Uninstall the required custom resources by running:

        1. 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 these procedures:

      Removing the Knative Serving component

      Remove the Knative Serving CR:

      1. kubectl delete KnativeServing knative-serving -n knative-serving

      Removing Knative Eventing component

      Remove the Knative Eventing CR:

      1. 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.

      If you have installed Knative using the Release page, remove the operator using the following command: