Deleting a PostgreSQL user
Written by
Updated at July 24, 2026
If you have a PostgreSQL user in your cluster, you can delete it.
Using the CLI
- Find the name of the resource in the list of project users:
kubectl get PostgresqlRole -n <project_name>. - Delete the resource:
kubectl delete PostgresqlRole <resource_name> -n <project_name>.
Once deleted, the role can no longer connect to PostgreSQL or use any granted permissions. If the Kubernetes Secret containing the user password is associated with the PostgresqlRole resource through ownerReferences, it is automatically deleted together with the resource. If the Secret was created separately, delete it using the kubectl delete Secret <sectet_name> -n <project_name> command.