Disconnecting from Altinity.Cloud Anywhere
Even if you disconnect from Altinity.Cloud Anywhere altogether, your ClickHouse cluster can continue running in your Kubernetes environment. In this section we’ll show you how to do that.
Disconnecting your environment from Altinity.Cloud Anywhere
You can disconnect Altinity Cloud Manager from your Kubernetes environment and the ClickHouse clusters running inside it. This does not delete your running ClickHouse clusters, it merely disconnects them from the Altinity Cloud Manager. Your ClickHouse clusters continue running as usual.
This command disconnects your ClickHouse cluster:
altinitycloud-connect kubernetes-disconnect | kubectl delete -f -
After this command completes, Altinity.Cloud Anywhere will no longer be able to see or connect to your Kubernetes environment.
Deleting managed ClickHouse environments in Kubernetes
If you want to delete the ClickHouse clusters in your environment, enter these two commands in the order shown below.
kubectl -n altinity-cloud-managed-clickhouse delete chi --all
altinitycloud-connect kubernetes | kubectl delete -f -
The first command deletes every ClickHouse installation (chi
) that
Altinity.Cloud Anywhere created. Those are in the
altinity-cloud-managed-clickhouse
namespace. With the ClickHouse
clusters deleted, the second command deletes the two Altinity
namespaces and any remaining resources they contain.
WARNING: If you delete the namespaces before deleting the ClickHouse
installations (chi
), the operation will hang due to missing
finalizers on chi
resources.
Should this occur, use the kubectl edit
command on each ClickHouse
installation and remove the finalizer manually from the resource
specification. Here is an example:
kubectl -n altinity-cloud-managed-clickhouse edit clickhouseinstallations.clickhouse.altinity.com/maddie-ch
You can now delete the finalizer from the resource:
# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: clickhouse.altinity.com/v1
kind: ClickHouseInstallation
metadata:
creationTimestamp: "2023-08-29T17:03:58Z"
finalizers:
- finalizer.clickhouseinstallation.altinity.com
generation: 3
name: maddie-ch
. . .