> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ankra.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Leaving Ankra

> What stays in your Git repository and on your clusters when you stop using Ankra, how the agent comes off, and what you can export first.

Ankra manages clusters that run on your infrastructure and keeps their configuration in a Git repository you own, so most of what you built does not depend on Ankra to keep existing. This page explains what stays where when you leave, what depends on the kind of cluster, and what Ankra holds that you can take with you before you go.

## What stays in your Git repository

A cluster's [GitOps](https://docs.ankra.ai/concepts/gitops.md) repository is a repository in your own Git account. The cluster and Stack YAML Ankra wrote there, and the `.ankra-owned.json` file that records what it last wrote, are ordinary files in that repository, and Git keeps them and their history whatever happens in Ankra.

The files are `ImportCluster` and Stack YAML, so the repository stays a readable record of the Stacks, add-ons, manifests and variables the cluster declared.

For a cluster built in the portal without a GitOps repository, or to have the whole specification as Ankra holds it now, export it first:

```bash theme={null}
ankra cluster export --cluster my-cluster -f my-cluster.yaml
```

## What happens to your clusters

What leaving does to a cluster depends on how it came to Ankra. A cluster is removed from **Infrastructure → Clusters → \<your cluster> → Settings → Terminate or remove**, and that page offers only what fits the cluster:

| Cluster | What the page offers | What happens to the cluster |
| - | - | - |
| A cluster you imported | **Disconnect the cluster** | Ankra stops managing it and removes it from Ankra. The cluster and everything running on it are not deleted. The Ankra agent stays installed until you remove it yourself. |
| A managed cluster at a cloud provider (for example EKS, AKS or GKE) | **Disconnect from Ankra**, or delete it at the provider | Disconnecting removes the cluster from Ankra with Ankra's agent and integration. The cluster and its node pools keep running at the provider, and the provider keeps charging for them. |
| A cluster Ankra built on servers at a provider | Terminate | Terminating deletes the servers, networks and SSH keys Ankra made for the cluster at its provider and removes the cluster from Ankra. Its workloads and the data on its servers are lost. Volumes and load balancers the retention policy keeps, load balancers the cluster did not make, and anything a **Force terminate** could not clean up stay at the provider and keep billing: check the provider account afterwards. |

The portal offers no way to disconnect a cluster Ankra built and keep it running. Move its workloads elsewhere before you terminate it, or contact [Ankra support](https://docs.ankra.ai/platform/support.md).

An organisation can only be deleted once it has no clusters left, so every cluster goes through one of these first: see [Leave or delete an organisation](https://docs.ankra.ai/guides/delete-or-leave-an-organisation.md).

## Removing the agent

The agent is a Helm release, `ankra-agent`, in the `ankra` namespace. On an imported cluster it stays after you disconnect, until you uninstall it with your own access to the cluster: see [Uninstalling](https://docs.ankra.ai/concepts/cluster-agent.md#uninstalling) on the cluster agent page.

## What Ankra holds, and how to export it

| What | How to take it with you |
| - | - |
| A cluster's whole specification: Stacks, add-ons, manifests, applications, variables and settings | `ankra cluster export`, as `ImportCluster` YAML. |
| A Stack profile version | `ankra stack-profiles export-iac`, as `ClusterInfrastructureAsCode` YAML: see [ankra stack-profiles](https://docs.ankra.ai/reference/cli/stack-profiles.md). |
| The audit trail | `ankra org audit-logs export`, as CSV or JSON, up to 100,000 rows per export: see [Audit export](https://docs.ankra.ai/security/audit-export.md). |
| Organisation variables | `ankra org variables list` and `ankra org variables get`: see [ankra org](https://docs.ankra.ai/reference/cli/org.md). |
| Invoices | The PDF on each invoice in **Settings → Plan and billing → Invoices**. |
| Images in Ankra's image registry | Pull them before you delete the organisation: deleting it revokes the registry logins. |

```bash theme={null}
ankra org audit-logs export --format json --file audit.json
```

## What happens when you delete the organisation or your account

Deleting the organisation removes its memberships, logo, single sign-on connection, AI provider keys and registry logins, and cancels its plan. On a plan invoiced monthly, the month so far becomes a draft invoice that a person at Ankra reviews before it is sent; an organisation paying from credit gets no invoice, and its last complete hours are charged to its credit. Its invoices are kept: deleting an organisation does not delete its bill. Granted credit is voided, and credit you bought is held for 30 days so it can be refunded. The full list is in [What deleting does](https://docs.ankra.ai/guides/delete-or-leave-an-organisation.md#what-deleting-does).

Deleting your own account, from **Profile** in the account menu, revokes your tokens, removes your sign-in, your personal AI keys and your connected GitHub account, and takes you out of every organisation. It does not delete an organisation: one where you are the only member stays, with its clusters and its plan and nobody left to manage it. Delete that organisation first. See [Your account](https://docs.ankra.ai/platform/user-profile.md#profile).

## Related

* [GitOps](https://docs.ankra.ai/concepts/gitops.md): how Ankra writes to your repository.
* [The cluster agent](https://docs.ankra.ai/concepts/cluster-agent.md): what runs in each cluster.
* [Leave or delete an organisation](https://docs.ankra.ai/guides/delete-or-leave-an-organisation.md): the steps.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.