To remove the Altinity Kubernetes Operator, both the Altinity Kubernetes Operator and the components in its installed namespace will have to be removed. The proper command is to uses the same
clickhouse-operator-install-bundle.yaml file that was used to install the Altinity Kubernetes Operator. For more details, see how to install and verify the Altinity Kubernetes Operator.
The following instructions are based on the standard installation instructions. For users who perform a custom installation, note that the any custom namespaces that the user wants to remove will have to be deleted separate from the Altinity Kubernetes Operator deletion.
For example, if the custom namespace
operator-test is created, then it would be removed with the command
kubectl delete namespaces operator-test.
IMPORTANT NOTICE 1
Never delete the operator or run the following command while there are live ClickHouse clusters managed by the operator:
kubectl delete --namespace "kube-system" -f https://github.com/Altinity/clickhouse-operator/raw/0.18.3/deploy/operator/clickhouse-operator-install-bundle.yaml
The command will hang due to the live clusters. If you then re-install the operator, those clusters will be deleted and the operator will not work correctly.
See Altinity/clickhouse-operator#830 for more details.
IMPORTANT NOTICE 2Please follow the instructions below. The uninstall command is geared to properly remove the Altinity Kubernetes Operator and its namespace. Deleting the namespace without properly removing the Altinity Kubernetes Operator can cause it to hang.
To remove the Altinity Kubernetes Operator from your Kubernetes environment from a standard install:
Verify the Altinity Kubernetes Operator is in the
kube-systemnamespace. The Altinity Kubernetes Operator and other pods will be displayed:
NAME READY STATUS RESTARTS AGE clickhouse-operator-857c69ffc6-2frgl 2/2 Running 0 5s coredns-78fcd69978-nthp2 1/1 Running 4 (23h ago) 51d etcd-minikube 1/1 Running 4 (23h ago) 51d kube-apiserver-minikube 1/1 Running 4 (23h ago) 51d kube-controller-manager-minikube 1/1 Running 4 (23h ago) 51d kube-proxy-lsggn 1/1 Running 4 (23h ago) 51d kube-scheduler-minikube 1/1 Running 4 (23h ago) 51d storage-provisioner 1/1 Running 9 (23h ago) 51d
kubectldelete command using the same YAML file used to install the Altinity Kubernetes Operator. By default the Altinity Kubernetes Operator is installed in the namespace
kube-system. If this was installed into a custom namespace, verify that it installed in the uninstall command. In this example, we specified an installation of the Altinity Kubernetes Operator version
0.18.3into the default
kube-systemnamespace. This produces output similar to the following:
kubectl delete -f https://github.com/Altinity/clickhouse-operator/raw/0.18.3/deploy/operator/clickhouse-operator-install-bundle.yaml
customresourcedefinition.apiextensions.k8s.io "clickhouseinstallations.clickhouse.altinity.com" deleted customresourcedefinition.apiextensions.k8s.io "clickhouseinstallationtemplates.clickhouse.altinity.com" deleted customresourcedefinition.apiextensions.k8s.io "clickhouseoperatorconfigurations.clickhouse.altinity.com" deleted serviceaccount "clickhouse-operator" deleted clusterrole.rbac.authorization.k8s.io "clickhouse-operator-kube-system" deleted clusterrolebinding.rbac.authorization.k8s.io "clickhouse-operator-kube-system" deleted configmap "etc-clickhouse-operator-files" deleted configmap "etc-clickhouse-operator-confd-files" deleted configmap "etc-clickhouse-operator-configd-files" deleted configmap "etc-clickhouse-operator-templatesd-files" deleted configmap "etc-clickhouse-operator-usersd-files" deleted deployment.apps "clickhouse-operator" deleted service "clickhouse-operator-metrics" deleted
To verify the Altinity Kubernetes Operator has been removed, use the
kubectl get namespacescommand:
kubectl get pods --namespace kube-system
NAME READY STATUS RESTARTS AGE coredns-78fcd69978-nthp2 1/1 Running 4 (23h ago) 51d etcd-minikube 1/1 Running 4 (23h ago) 51d kube-apiserver-minikube 1/1 Running 4 (23h ago) 51d kube-controller-manager-minikube 1/1 Running 4 (23h ago) 51d kube-proxy-lsggn 1/1 Running 4 (23h ago) 51d kube-scheduler-minikube 1/1 Running 4 (23h ago) 51d storage-provisioner 1/1 Running 9 (23h ago) 51d
Was this page helpful?
Glad to hear it!
Sorry to hear that. We'll track this issue and see how we can improve.