8.1 KiB
| title | keywords | description | linkTitle | Weight |
|---|---|---|---|---|
| Uninstall Pluggable Components from KubeSphere v3.2.0 | Installer, uninstall, KubeSphere, Kubernetes | Learn how to uninstall each pluggable component in KubeSphere v3.2.0. | Uninstall Pluggable Components from KubeSphere v3.2.0 | 6940 |
After you enable the pluggable components of KubeSphere, you can also uninstall them by performing the following steps. Please back up any necessary data before you uninstall these components.
{{< notice note >}}
The methods of uninstalling certain pluggable components on KubeSphere v3.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.
{{</ notice >}}
Prerequisites
You have to change the value of the field enabled 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:kubectl -n kubesphere-system edit clusterconfiguration 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 forClusterConfiguration. For more information, see Enable Pluggable Components.
{{< notice note >}}
After the value is changed, you need to wait until the updating process is complete before you continue with any further operations.
{{</ notice >}}
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
-
Change the value of
devops.enabledfromtruetofalseinks-installerof the CRDClusterConfiguration. -
Run the command mentioned in Prerequisites and then delete the code under
status.devopsinks-installerof the CRDClusterConfiguration. -
Run the following commands:
helm -n kubesphere-devops-system delete ks-jenkins helm -n kubesphere-devops-system delete uc# Delete DevOps projects for devopsproject in `kubectl get devopsprojects -o jsonpath="{.items[*].metadata.name}"` do kubectl patch devopsprojects $devopsproject -p '{"metadata":{"finalizers":null}}' --type=merge done for pip in `kubectl get pipeline -A -o jsonpath="{.items[*].metadata.name}"` do kubectl patch pipeline $pip -n `kubectl get pipeline -A | grep $pip | awk '{print $1}'` -p '{"metadata":{"finalizers":null}}' --type=merge done for s2ibinaries in `kubectl get s2ibinaries -A -o jsonpath="{.items[*].metadata.name}"` do kubectl patch s2ibinaries $s2ibinaries -n `kubectl get s2ibinaries -A | grep $s2ibinaries | awk '{print $1}'` -p '{"metadata":{"finalizers":null}}' --type=merge done for s2ibuilders in `kubectl get s2ibuilders -A -o jsonpath="{.items[*].metadata.name}"` do kubectl patch s2ibuilders $s2ibuilders -n `kubectl get s2ibuilders -A | grep $s2ibuilders | awk '{print $1}'` -p '{"metadata":{"finalizers":null}}' --type=merge done for s2ibuildertemplates in `kubectl get s2ibuildertemplates -A -o jsonpath="{.items[*].metadata.name}"` do kubectl patch s2ibuildertemplates $s2ibuildertemplates -n `kubectl get s2ibuildertemplates -A | grep $s2ibuildertemplates | awk '{print $1}'` -p '{"metadata":{"finalizers":null}}' --type=merge done for s2iruns in `kubectl get s2iruns -A -o jsonpath="{.items[*].metadata.name}"` do kubectl patch s2iruns $s2iruns -n `kubectl get s2iruns -A | grep $s2iruns | awk '{print $1}'` -p '{"metadata":{"finalizers":null}}' --type=merge done kubectl delete devopsprojects --all 2>/dev/nullkubectl delete ns kubesphere-devops-system
Uninstall KubeSphere Logging
-
Change the value of
logging.enabledfromtruetofalseinks-installerof the CRDClusterConfiguration. -
To disable only log collection:
delete inputs.logging.kubesphere.io -n kubesphere-logging-system tail{{< notice 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.
{{</ notice >}}
-
To uninstall Logging system including Elasticsearch:
kubectl delete crd fluentbitconfigs.logging.kubesphere.io kubectl delete crd fluentbits.logging.kubesphere.io kubectl delete crd inputs.logging.kubesphere.io kubectl delete crd outputs.logging.kubesphere.io kubectl delete crd parsers.logging.kubesphere.io kubectl delete deployments.apps -n kubesphere-logging-system fluentbit-operator helm uninstall elasticsearch-logging --namespace kubesphere-logging-system{{< notice note >}}
This operation may cause anomalies in Auditing, Events, and Service Mesh.
{{</ notice >}}
Uninstall KubeSphere Events
-
Change the value of
events.enabledfromtruetofalseinks-installerof the CRDClusterConfiguration. -
Run the following command:
helm delete ks-events -n kubesphere-logging-system
Uninstall KubeSphere Alerting
-
Change the value of
alerting.enabledfromtruetofalseinks-installerof the CRDClusterConfiguration. -
Run the following command:
kubectl -n kubesphere-monitoring-system delete thanosruler kubesphere{{< notice note >}}
Notification is installed in KubeSphere v3.2.0 by default, so you do not need to uninstall it.
{{</ notice >}}
Uninstall KubeSphere Auditing
-
Change the value of
auditing.enabledfromtruetofalseinks-installerof the CRDClusterConfiguration. -
Run the following commands:
helm uninstall kube-auditing -n kubesphere-logging-system kubectl delete crd awh kubectl delete crd ar
Uninstall KubeSphere Service Mesh
-
Change the value of
servicemesh.enabledfromtruetofalseinks-installerof the CRDClusterConfiguration. -
Run the following commands:
curl -L https://istio.io/downloadIstio | sh - istioctl x uninstall --purge kubectl -n istio-system delete kiali kiali helm -n istio-system delete kiali-operator kubectl -n istio-system delete jaeger jaeger helm -n istio-system delete jaeger-operator
Uninstall Network Policies
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
-
Change the value of
metrics_server.enabledfromtruetofalseinks-installerof the CRDClusterConfiguration. -
Run the following commands:
kubectl delete apiservice v1beta1.metrics.k8s.io kubectl -n kube-system delete service metrics-server kubectl -n kube-system delete deployment metrics-server
Uninstall Service Topology
-
Change the value of
network.topology.typefromweave-scopetononeinks-installerof the CRDClusterConfiguration. -
Run the following command:
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.
Uninstall KubeEdge
-
Change the value of
kubeedge.enabledfromtruetofalseinks-installerof the CRDClusterConfiguration. -
Run the following commands:
helm uninstall kubeedge -n kubeedge kubectl delete ns kubeedge{{< notice note >}}
After the uninstallation, you will not be able to add edge nodes to your cluster.
{{</ notice >}}