logo
Alauda support for PostgreSQL
logo
Alauda support for PostgreSQL
Navigation
Introduction
Release Notes
Lifecycle Policy
Installation
Upgrade
Architecture

Guides

Create Instance
Delete Instance
Instance Details
Backup and Restore
Scheduling Configuration
Log
Monitoring

HowTo

Configuring a High Availability PostgreSQL Cluster

Trouble Shooting

Cluster Creation Failure
Master-Slave Switch Exception
Backup and Restore Failure
Permissions

API Reference

Kubernetes APIs

PostgreSQL APIs

Postgresqls
PostgresBackup
PostgresRestore
📝 Edit this page on GitHub
Previous PageCreate Instance
Next PageInstance Details

#Delete Instance

WARNING

Important Considerations Before Deletion

  • This operation is irreversible - deleted instances cannot be recovered
  • Ensure you have valid backups if you might need the data later
  • Verify no applications are currently using this database instance
  • Cluster deletion will remove all replicas and associated resources

Deleting a PostgreSQL instance will remove:

  • The Custom Resource (CR)
  • StatefulSet and Pods
  • ConfigMaps and Secrets
  • PersistentVolumeClaims (PVCs)
  • Monitoring and logging resources

#TOC

#Procedure

CLI
Web Console

To delete a PostgreSQL instance (including all associated PVCs), execute:

kubectl -n $NAMESPACE delete postgresql <instance-name>

Example output:

postgresql.acid.zalan.do "example-postgres" deleted

After deletion, you can confirm the instance status with:

kubectl -n $NAMESPACE get postgresql

#Post-Deletion Verification

After deletion, verify all resources are removed:

kubectl -n default get postgresql  # Should not show deleted instance
kubectl -n $NAMESPACE get pvc  # Verify PVCs were deleted

#Related Operations

  • Creating Backups
  • Monitoring Deletion Progress
  • Troubleshooting Deletion Issues