Skip to content

卸载 Knative

To uninstall an Operator-based Knative installation, see the following Uninstall an Operator-based Knative Installation procedure. To uninstall a YAML-based Knative installation, see the following Uninstall a YAML-based Knative Installation procedure.

卸载基于yaml的Knative安装

To uninstall a YAML-based Knative installation:

正在卸载可选服务扩展

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

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://storage.googleapis.com/knative-nightly/serving/latest/serving-hpa.yaml
  1. Uninstall the component that integrates Knative with cert-manager:

    kubectl delete -f https://storage.googleapis.com/knative-nightly/net-certmanager/latest/release.yaml
    
  2. 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://storage.googleapis.com/knative-nightly/net-http01/latest/release.yaml

卸载网络层

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

The following commands uninstall Contour and enable its Knative integration.

  1. Uninstall the Knative Contour controller by running:

    kubectl delete -f https://storage.googleapis.com/knative-nightly/net-contour/latest/net-contour.yaml
    
  2. Uninstall Contour:

    kubectl delete -f https://storage.googleapis.com/knative-nightly/net-contour/latest/contour.yaml
    

The following commands uninstall Istio and enable its Knative integration.

  1. Uninstall the Knative Istio controller by running:

    kubectl delete -f https://storage.googleapis.com/knative-nightly/net-istio/latest/net-istio.yaml
    
  2. Optional: if you no longer need Istio, uninstall it by running:

    kubectl delete -f https://storage.googleapis.com/knative-nightly/net-istio/latest/istio.yaml
    

Uninstall the Knative Kourier controller by running:

kubectl delete -f https://storage.googleapis.com/knative-nightly/net-kourier/latest/kourier.yaml

卸载服务组件

  1. Uninstall the Serving core components by running:

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

    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:

  1. Uninstall the Kafka Sink data plane:

    kubectl delete -f https://storage.googleapis.com/knative-nightly/eventing-kafka-broker/latest/eventing-kafka-sink.yaml
    
  2. Uninstall the Kafka controller:

    kubectl delete -f https://storage.googleapis.com/knative-nightly/eventing-kafka-broker/latest/eventing-kafka-controller.yaml
    

Uninstall the Eventing Sugar Controller by running:

kubectl delete -f https://storage.googleapis.com/knative-nightly/eventing/latest/eventing-sugar-controller.yaml

Uninstall a single-tenant GitHub source by running:

kubectl delete -f https://storage.googleapis.com/knative-nightly/eventing-github/latest/github.yaml

Uninstall a multi-tenant GitHub source by running:

kubectl delete -f https://storage.googleapis.com/knative-nightly/eventing-github/latest/mt-github.yaml

Uninstall the Apache Kafka source by running:

kubectl delete -f https://storage.googleapis.com/knative-nightly/eventing-kafka-broker/latest/eventing-kafka-source.yaml

Uninstall the GCP sources by running:

kubectl delete -f https://storage.googleapis.com/knative-nightly/knative-gcp/latest/cloud-run-events.yaml

Uninstall the Apache CouchDB source by running:

kubectl delete -f https://storage.googleapis.com/knative-nightly/eventing-couchdb/latest/couchdb.yaml

Uninstall the VMware sources and bindings by running:

kubectl delete -f https://storage.googleapis.com/knative-nightly/sources-for-knative/latest/release.yaml

卸载一个可选的Broker (event)层

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

  1. Uninstall the Kafka Broker data plane by running the following command:

    kubectl delete -f https://storage.googleapis.com/knative-nightly/eventing-kafka-broker/latest/eventing-kafka-broker.yaml
    
  2. Uninstall the Kafka controller by running the following command:

    kubectl delete -f https://storage.googleapis.com/knative-nightly/eventing-kafka-broker/latest/eventing-kafka-controller.yaml
    

Uninstall the broker by running:

kubectl delete -f https://storage.googleapis.com/knative-nightly/eventing/latest/mt-channel-broker.yaml

卸载可选通道(消息传递)层

Uninstall each channel layer you have installed:

Uninstall the Apache Kafka Channel by running:

kubectl delete -f https://storage.googleapis.com/knative-nightly/eventing-kafka-broker/latest/eventing-kafka-channel.yaml

Uninstall the Google Cloud Pub/Sub Channel by running:

kubectl delete -f https://storage.googleapis.com/knative-nightly/knative-gcp/latest/cloud-run-events.yaml

Uninstall the in-memory channel implementation by running:

kubectl delete -f https://storage.googleapis.com/knative-nightly/eventing/latest/in-memory-channel.yaml
  1. Uninstall the NATS Streaming channel by running:

    kubectl delete -f https://storage.googleapis.com/knative-nightly/eventing-natss/latest/eventing-natss.yaml
    
  2. Uninstall NATS Streaming for Kubernetes. For more information, see the eventing-natss repository in GitHub.

卸载事件组件

  1. Uninstall the Eventing core components by running:

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

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

卸载基于operator的Knative安装

To uninstall an Operator-based Knative installation, follow these procedures:

删除Knative服务组件

Remove the Knative Serving CR:

kubectl delete KnativeServing knative-serving -n knative-serving

删除Knative事件组件

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.

删除Knative操作符

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

kubectl delete -f https://storage.googleapis.com/knative-nightly/operator/latest/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/
Back to top

We use analytics and cookies to understand site traffic. Information about your use of our site is shared with Google for that purpose. Learn more.

× OK