DEV Community

Discussion on: How to deploy Postgres on Kubernetes with Skaffold

Collapse
 
bthvedt profile image
BThvedt

I have the weirdest issue .. I'm trying to make a deployment for postgresql (not for django but for a side-project idea I have) based on this tutorial, and it works fine, but if I change the POSTGRES_DB or the POSTGRES_USER at all the pod is never ready and it keeps restarting. Any clue what it could be?

Collapse
 
ksaaskil profile image
Kimmo Sääskilahti

Weird! I guess you have tried tearing down the whole stack and only then changing the configuration? If it uses old volumes or containers, it could mean the new database and user are never created. Maybe you could also try looking into container logs to understand the error?

Collapse
 
bthvedt profile image
BThvedt

I'm using docker desktop for windows to run kubernetes .. the only thing that seems to work is to use the option to completely reset all the settings to the initial defaults and start over again! And yes I've tried looking at container logs, I forget what they said but it didn't really solve it for me.
I admit I only really understand the basics of kubernetes, I can't even find where docker desktop puts the volumes (it uses WSL aka "windows subsystem for linux" and think it somehow handles them internally) but I suspect if I could find them and delete them after deleting the pod, then changing the user or pass would work.. but what do I know!