Uninstall Pluggable Components from KubeSphere 3.2.0

    Note

    The methods of uninstalling certain pluggable components on KubeSphere 3.2.0 are different from the methods on KubeSphere v3.0.0. For more information about the uninstallation methods on KubeSphere v3.0.0, see Uninstall Pluggable Components from KubeSphere.

    You have to change the value of the field from true to false in ks-installer of the CRD ClusterConfiguration before you uninstall any pluggable components except Service Topology and Pod IP Pools.

    Use either of the following methods to change the value of the field enabled:

    • Run the following command to edit ks-installer:

    • Log in to the KubeSphere web console as admin, click Platform in the upper-left corner and select Cluster Management, and then go to CRDs to search for ClusterConfiguration. For more information, see .

    Note

    After the value is changed, you need to wait until the updating process is complete before you continue with any further operations.

    Uninstall KubeSphere App Store

    Change the value of openpitrix.store.enabled from true to false in ks-installer of the CRD ClusterConfiguration.

    Uninstall KubeSphere DevOps

    1. To uninstall DevOps:

      1. helm uninstall -n kubesphere-devops-system devops
      2. kubectl patch -n kubesphere-system cc ks-installer --type=json -p='[{"op": "remove", "path": "/status/devops"}]'
      3. kubectl patch -n kubesphere-system cc ks-installer --type=json -p='[{"op": "replace", "path": "/spec/devops/enabled", "value": false}]'
    2. To delete DevOps resources:

      1. # Remove all resources related with DevOps
      2. for ns in $(kubectl get ns -ojsonpath='{.items..metadata.name}'); do
      3. for devops_res in $(kubectl get $devops_crd -n $ns -oname); do
      4. kubectl patch $devops_res -n $ns -p '{"metadata":{"finalizers":[]}}' --type=merge
      5. done
      6. done
      7. done
      8. # Remove all DevOps CRDs
      9. kubectl get crd -o=jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}' | grep "devops.kubesphere.io" | xargs -I crd_name kubectl delete crd crd_name
      10. # Remove DevOps namespace
      11. kubectl delete namespace kubesphere-devops-system

    Uninstall KubeSphere Logging

    1. Change the value of logging.enabled from true to false in of the CRD ClusterConfiguration.

      1. kubectl delete inputs.logging.kubesphere.io -n kubesphere-logging-system tail

      Note

      After running this command, you can still view the container recent logs provided by Kubernetes by default. However, the container history logs will be cleared and you cannot browse them any more.

    2. To uninstall Logging system including Elasticsearch:

      Warning

      This operation may cause anomalies in Auditing, Events, and Service Mesh.

    3. Run the following command:

      1. kubectl delete deployment logsidecar-injector-deploy -n kubesphere-logging-system
      2. kubectl delete ns kubesphere-logging-system
    1. Change the value of events.enabled from true to false in ks-installer of the CRD ClusterConfiguration.

    2. Run the following command:

      1. helm delete ks-events -n kubesphere-logging-system

    Uninstall KubeSphere Alerting

    1. Change the value of alerting.enabled from true to false in ks-installer of the CRD ClusterConfiguration.

    Uninstall KubeSphere Auditing

    1. Run the following commands:

    Uninstall KubeSphere Service Mesh

    1. Change the value of servicemesh.enabled from true to false in ks-installer of the CRD ClusterConfiguration.

    2. Run the following commands:

      1. curl -L https://istio.io/downloadIstio | sh -
      2. istioctl x uninstall --purge
      3. kubectl -n istio-system delete kiali kiali
      4. helm -n istio-system delete kiali-operator
      5. kubectl -n istio-system delete jaeger jaeger
      6. helm -n istio-system delete jaeger-operator

    For the component NetworkPolicy, disabling it does not require uninstalling the component as its controller is now inside ks-controller-manager. If you want to remove it from the KubeSphere console, change the value of network.networkpolicy.enabled from true to false in ks-installer of the CRD ClusterConfiguration.

    Uninstall Metrics Server

    1. Change the value of metrics_server.enabled from true to false in ks-installer of the CRD ClusterConfiguration.

    2. Run the following commands:

      1. kubectl delete apiservice v1beta1.metrics.k8s.io
      2. kubectl -n kube-system delete service metrics-server
      3. kubectl -n kube-system delete deployment metrics-server

    Uninstall Service Topology

    1. Change the value of network.topology.type from weave-scope to none in ks-installer of the CRD ClusterConfiguration.

    2. Run the following command:

      1. kubectl delete ns weave

    Uninstall Pod IP Pools

    Change the value of network.ippool.type from calico to none in ks-installer of the CRD ClusterConfiguration.

    1. Run the following commands:

      Note