Deleting an Environment

Deleting (or maybe just disconnecting) your Altinity.Cloud Environment

If for whatever reason you don’t need an environment anymore, you can delete it. (Instructions below.) However…

Disconnecting your environment

It’s much easier to simply disconnect your ClickHouse clusters from Altinity.Cloud. (It’s also easy to reconnect it later.) If you use kubectl to scale the cloud-connect pods in the altinity-cloud-system namespace to zero, the ACM won’t be able to connect to your ClickHouse cluster. Your ClickHouse cluster and the applications that use it will be unaffected; they’ll simply be disconnected from Altinity.

To start, we’ll look at the ACM Environment view:

A connected environment

Figure 1 - A connected environment

The indicator appears next to the environment name, letting us know our environment is connected to Altinity.Cloud. At the bottom of the display we can see the nodes in the environment, the types of those nodes, their zones, etc.

Now we’ll go to the command line and look at the deployments in the altinity-cloud-system namespace:

> kubectl get deployments -n altinity-cloud-system

NAME                 READY   UP-TO-DATE   AVAILABLE   AGE
cloud-connect        1/1     1            1           34m
crtd                 1/1     1            1           34m
edge-proxy           3/3     3            3           33m
grafana              1/1     1            1           34m
kube-state-metrics   1/1     1            1           34m
statuscheck          1/1     1            1           34m

And we’ll scale the cloud-connect pods to zero:

> kubectl scale deployment cloud-connect --replicas=0 -n altinity-cloud-system

deployment.apps/cloud-connect scaled

Looking at our deployments, cloud-connect has been scaled to zero, as we’d expect:

> kubectl get deployments -n altinity-cloud-system

NAME                 READY   UP-TO-DATE   AVAILABLE   AGE
cloud-connect        0/0     0            0           39m
crtd                 1/1     1            1           38m
edge-proxy           3/3     3            3           38m
grafana              1/1     1            1           38m
kube-state-metrics   1/1     1            1           38m
statuscheck          1/1     1            1           38m

Pretty soon we’ll get a notification that the environment has been disconnected:

A disconnected environment

Figure 2 - A disconnected environment

Three things have changed:

  • There’s a notification at the top of the panel that the environment has been disconnected
  • The button appears next to the environment name
  • The list of nodes at the bottom of the display is empty.

At this point, Altinity has no access to your environment or the ClickHouse clusters in it.

Reconnecting, of course, is simple:

> kubectl scale deployment cloud-connect --replicas=1 -n altinity-cloud-system

deployment.apps/cloud-connect scaled

Shortly after rescaling the deployment, you’ll get a notification that the environment has been reconnected:

Environment is reconnected

Figure 3 - Notification of a reconnected environment

This technique makes it easy to disconnect and reconnect your environment without disturbing your ClickHouse clusters and the applications that use them.

Deleting your environment

If you’re sure you’re ready to delete your Altinity.Cloud environment, go to the list of environments, click the vertical dots icon next to your environment name and select Delete from the menu:

The Delete Environment menu

Figure 4 - The Delete Environment menu

There are three ways to delete an environment:

Deleting everything in your environment

This option includes any Kubernetes or cloud resources Altinity.Cloud might have created. The simplest case is an environment that doesn’t have any ClickHouse clusters:

Deleting an Altinity.Cloud environment with no ClickHouse clusters

Figure 5 - Deleting an Altinity.Cloud environment with no ClickHouse clusters

The “Do not de-provision cloud resources” slider only appears if you’re running Altinity.Cloud in your environment (BYOC).

Typing in the name of your environment and clicking DELETE deletes the Altinity.Cloud environment and its associated Kubernetes or cloud resources. The two sliders feel like a double negative (“No, don’t not delete my resources), but the choices in Figure 5 delete your environment’s underlying resources.

If your environment has ClickHouse clusters, you should delete them by hand before deleting your Altinity.Cloud environment. However, you can click the Delete Clusters slider and have the ACM delete your ClickHouse clusters along with the resources that host them. These choices delete everything:

Deleting an Altinity.Cloud BYOC environment with ClickHouse clusters

Figure 6 - Deleting an Altinity.Cloud environment and its ClickHouse clusters

Delete the environment, but leave your ClickHouse clusters undisturbed

It’s possible that you’ve decided you want to delete the environment entirely, but keep your ClickHouse clusters running. You can permanently delete Altinity.Cloud’s access to your ClickHouse clusters without deleting your ClickHouse clusters and their data.

If this is how you want to delete your environment, tell the ACM not to delete the Kubernetes and cloud resources it created or your ClickHouse clusters:

Deleting an Altinity.Cloud environment, but nothing else

Figure 7 - Deleting the Altinity.Cloud environment, but leaving your ClickHouse clusters alone

The “Do not de-provision cloud resources” slider only appears if you’re running Altinity.Cloud in your environment (BYOC).

The first two choices feel odd (“Yes, don’t delete my resources”), but these three options (yes / yes / no) delete the Altinity.Cloud environment without disturbing your ClickHouse clusters, their data, and the infrastructure where they’re running.

Deleting your environment because Altinity.Cloud can’t connect to it anymore

Finally, if Altinity.Cloud can no longer connect to your environment, you need to tell the ACM that you’ll take the responsibility of deleting any Kubernetes or cloud resources that Altinity.Cloud created:

Deleting an Altinity.Cloud environment, deleting resources by hand

Figure 8 - Deleting an Altinity.Cloud environment, deleting resources by hand

The “Do not de-provision cloud resources” slider only appears if you’re running Altinity.Cloud in your environment (BYOC).

The ACM deletes the Altinity.Cloud environment, but you’ll have to delete its resources by hand.