Uninstall and environment decommission
Remove Gameplane without orphaning finalizers, deleting retained worlds, or leaving credentials and cloud resources behind.
Removing Gameplane requires careful inventory, explicit decisions on every retained resource, and an uninstall order that respects Kubernetes finalizers and state cleanup. This guide covers retention decisions, safe uninstall sequencing, and verification that no orphaned resources or costs remain.
Freeze GitOps reconciliation and stop all automated schedules (BackupSchedule, webhook reconciliation, notification sinks) before uninstalling or they may recreate resources while the environment is being decommissioned.
Decide retention
Inventory platform and game state, classify every item, and obtain owner approval before removal.
Backup and export
Before removing anything, export or back up irreplaceable state:
- Game server worlds and data: Trigger a final backup for every active GameServer via the Backup CRD or dashboard. Export
spec.storage.datavolumes to external storage if they contain user-created content or mods. - Database: Export audit logs and user credentials. For SQLite, the PVC
gameplane-api-datacontainsgameplane.db; for PostgreSQL, dump the database withpg_dump. - Module sources and credentials: Document all
ModuleSourcecustom registries and their pull-secret names (usually akubernetes.io/dockerconfigjsonSecret). Note theuploadsModuleSource (created whenuploadModuleSource.enabledis set) and, if it points at a mounted directory viaoperator.localModules.{hostPath,existingClaim}, back up that volume before uninstalling. - OIDC and webhook credentials: Export
Secretobjects ingameplane-systemnamespace (OIDC client secret, webhook signing keys, etc.). These will be deleted when the namespace is removed. - Cluster registrations: Document any registered remote
ClusterCRDs and their kubeconfig Secrets for re-registration or archival.
Retention approval
Obtain sign-off from stakeholders (game owners, ops team, legal if applicable) on:
- Which worlds and save files are being destroyed vs. exported.
- How long backups are retained (restic repositories may continue accruing storage costs).
- Whether to retain the
gameplane-gamesnamespace and PVCs if migrating to a new cluster.
Uninstall safely
Quiesce writes and remove controllers and dependencies in an order that allows finalizers to complete.
Uninstall sequence
Follow this order to allow finalizers to complete:
-
Scale down controllers: Set the operator and API Deployment replicas to 0.
kubectl -n gameplane-system scale deployment gameplane-operator --replicas=0 kubectl -n gameplane-system scale deployment gameplane-api --replicas=0This stops new reconciliation loops. Existing in-flight operations (e.g., restic Backup Jobs) may still be running.
-
Wait for in-flight operations: Wait for all Backup and Restore Jobs to complete or be explicitly deleted:
kubectl -n gameplane-games get jobs kubectl delete -n gameplane-games jobs --allQuiesce any running GameServers and wait for pods to stop (or delete them forcefully).
-
Delete GameServers and Backups: GameServers delete immediately (no finalizer); a quiesced Backup (
spec.quiesce: true) has a finalizer that blocks deletion until the operator sends the matching unquiesce — wait for that to clear before assuming it’s stuck.kubectl delete gameservers -A kubectl delete backups -AIf a resource is stuck with
DeletionTimestampset, check the operator logs for the finalizer handler’s error, fix the underlying issue (e.g., orphaned cloud resource), and remove the finalizer manually only as a last resort (only for Backups withspec.quiesce: true):kubectl patch backup <name> -p '{"metadata":{"finalizers":[]}}' --type merge -
Delete Helm release: Uninstall the chart. CRDs are not deleted automatically (see “CRD retention” below).
helm uninstall gameplane -n gameplane-system -
Delete the gameplane-system namespace: Removes API, operator, and all related resources.
kubectl delete namespace gameplane-system -
Delete or retain CRDs: By default, Helm does not delete CRDs (to prevent accidental data loss). If you are decommissioning entirely:
kubectl delete crd backups.gameplane.local backupschedules.gameplane.local \ clusters.gameplane.local gameservers.gameplane.local gametemplates.gameplane.local \ modules.gameplane.local modulesources.gameplane.local restores.gameplane.localIf keeping the CRDs for re-import or recovery, skip this step. CRDs without resources consume minimal cluster resources.
-
Delete or retain the gameplane-games namespace: If you are migrating GameServers to a new cluster and want to keep the PVCs and game data:
# Keep PVCs and data, remove just the namespace and pods kubectl delete namespace gameplane-games --grace-period=60Or, if decommissioning entirely:
# Deletes all PVCs and game data kubectl delete namespace gameplane-gamesIf PVCs have a
retainreclaim policy, they persist after namespace deletion and can be re-attached to another cluster.
Verify and close
Check for orphaned resources and costs, revoke credentials, and archive restoration and destruction evidence.
Final verification checklist
- No Gameplane pods running in
gameplane-systemorgameplane-gamesnamespaces. - No Gameplane Services, Ingress, or NetworkPolicies remain in the cluster.
- No Gameplane PersistentVolumeClaims or PersistentVolumes exist (or are retained intentionally with a documented reason).
- Cloud provider load balancers and IP addresses associated with Gameplane are released.
- DNS entries (e.g.,
gameplane.your-domain) are removed or point elsewhere. - All exported backups and audit logs are stored in long-term archive (S3, GCS, etc.).
- Credentials have been rotated or revoked in the backup repository and any external systems (Slack for notifications, OIDC provider, etc.).
- A final audit log or summary document is archived, signed, and timestamped.
DECOMMISSION CHECKLIST
Environment migration (alternative to full decommission)
If you are shutting down Gameplane on one cluster but migrating to another:
- Export all GameServers to YAML via
kubectl get gameservers -A -o yaml > gameservers-export.yaml. - Export all Backup objects and their associated restic snapshots.
- On the new cluster, install Gameplane and re-import the GameServer definitions via
kubectl apply -f gameservers-export.yaml. - Re-register any
Clusterresources and re-createModuleSourceconfigurations. - Once verified on the new cluster, proceed with full decommission on the old cluster (steps above).
This approach allows zero-downtime migration if you can tolerate a brief reconciliation window for the operator to re-create the StatefulSets and Services on the new cluster.
See also
- Platform disaster recovery — recover from cluster failure, restore all data, and re-register multi-cluster topology.
- Backup & recovery — backup retention policies and restore procedures.
- Kubernetes maintenance — node drains, cluster upgrades, and capacity management.