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.1/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-77b54889b4-mlzqc 2/2 Running 0 5s coredns-78fcd69978-nthp2 1/1 Running 2 (107m ago) 23d etcd-minikube 1/1 Running 2 (107m ago) 23d kube-apiserver-minikube 1/1 Running 2 (107m ago) 23d kube-controller-manager-minikube 1/1 Running 2 (107m ago) 23d kube-proxy-lsggn 1/1 Running 2 (107m ago) 23d kube-scheduler-minikube 1/1 Running 2 (107m ago) 23d storage-provisioner 1/1 Running 5 (106m ago) 23d
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.1into the default
kube-systemnamespace. This produces output similar to the following:
kubectl delete -f https://github.com/Altinity/clickhouse-operator/raw/0.18.1/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 2 (107m ago) 23d etcd-minikube 1/1 Running 2 (107m ago) 23d kube-apiserver-minikube 1/1 Running 2 (107m ago) 23d kube-controller-manager-minikube 1/1 Running 2 (107m ago) 23d kube-proxy-lsggn 1/1 Running 2 (107m ago) 23d kube-scheduler-minikube 1/1 Running 2 (107m ago) 23d storage-provisioner 1/1 Running 5 (106m ago) 23d
Was this page helpful?
Glad to hear it!
Sorry to hear that. We'll track this issue and see how we can improve.