Backup of postgres in a kubernetes pod (and a docker container)
Kubernetes is a lot of things, some cool, some vexsome. One of the things is that it does not necessarily make it easy to make backups of data stored in pods. And if the data is a database you can't really back it up from the outside in the data storage mount either since the backup is liable to become inconsistent and unusable. You have to deal with the database engine to get a consistent backup. At work we have a self hosted kubernetes cluster and quite a bit og old fashioned infrastructure too. Lately some postgres databases have been deployed here with the bitnami helm chart . We use automation tools to set up backups and all kinds of things. And in these tools we prefer not to put passwords if we can avoid it. One _could_ make a backup using pg_dump or similar giving it the pod IP, username and password, but we'd like to avoid that. Examining the bitnami postgres pod it was set up quite interestingly with postgres running at uid 1001 which does not have a user account a