Deleting Organizations
Cluster administrators can delete an
organization with the
Fuzzball CLI subcommand
organization delete. There is no web UI equivalent.
Organization deletion is permanent and cannot be undone. When you delete an organization:
- All of its users are removed
- Its Keycloak realm – the identity domain holding those users – is deleted unless you pass
--keep-realmDeleting an organization does not stop its running workflows or reclaim its volumes. Terminate any running workflows and preserve any needed data before you proceed.
- Cluster administrator permissions
- Fuzzball CLI with a context configured and logged in as a cluster administrator
- The name or ID of the organization to delete
Use fuzzball organization list to see the organizations in the cluster and their IDs:
$ fuzzball organization list
ID | NAME | PRIORITY
c9261ae5-1a31-4e88-bc74-5520ca661ec4 | Test-Organization | 0
f35fcdd4-e702-450e-a060-7d1d51519d07 | FuzzballTesting | -5Pass either the organization’s name or its UUID. Names are matched without regard to case. The command describes what will be removed, then prompts you to confirm:
$ fuzzball organization delete Test-Organization
This permanently deletes organization "Test-Organization" (c9261ae5-1a31-4e88-bc74-5520ca661ec4) and its members.
Its Keycloak realm will also be deleted. Pass --keep-realm to retain it.
Delete organization "Test-Organization"?:The prompt is an interactive selector with No preselected. Use the arrow keys to choose Yes, then press Enter to complete the deletion:
Organization "Test-Organization" (c9261ae5-1a31-4e88-bc74-5520ca661ec4) deletedChoosing No cancels and leaves the organization untouched:
Deletion cancelled.Pass --yes to delete without prompting. This is required in scripts and anywhere else stdin is not
a terminal; without it, the command exits with an error rather than waiting on a prompt that cannot
be answered:
$ fuzzball organization delete c9261ae5-1a31-4e88-bc74-5520ca661ec4 --yes
Organization "Test-Organization" (c9261ae5-1a31-4e88-bc74-5520ca661ec4) deletedBy default the organization’s Keycloak realm is deleted along with the organization, so no orphaned
realm is left behind. Pass --keep-realm when the realm is shared with another system or is managed
externally:
$ fuzzball organization delete Test-Organization --keep-realmDeployments that point Fuzzball at an externally managed Keycloak never have their realm deleted, whether or not--keep-realmis passed. Fuzzball only tears down realms it created itself.
| Flag | Description |
|---|---|
--keep-realm | Retain the organization’s Keycloak realm instead of deleting it. |
--yes, -y | Skip the confirmation prompt. Required when stdin is not a terminal. |
Run fuzzball organization list again to confirm the organization is gone:
$ fuzzball organization list
ID | NAME | PRIORITY
f35fcdd4-e702-450e-a060-7d1d51519d07 | FuzzballTesting | -5The fuzzball-admin CLI in the fuzzball-admin-0 pod can also delete organizations. It bypasses the
Fuzzball API and requires kubectl access to the cluster, so prefer fuzzball organization delete
above.
fuzzball-admin organization deletebehaves differently from the Fuzzball CLI: it requires the organization UUID, it does not ask for confirmation, and it retains the Keycloak realm unless you pass--delete-realm– the opposite of the Fuzzball CLI default.
$ kubectl exec -n fuzzball fuzzball-admin-0 -- /app/fuzzball-admin organization delete \
c9261ae5-1a31-4e88-bc74-5520ca661ec4 --delete-realm
Organization with id c9261ae5-1a31-4e88-bc74-5520ca661ec4 deleted successfully