I think would be better if you first try to establish connection to the database from the pod, can you ssh into it and run a telnet postgres.home 5432?
Could you try removing type: NodePort from your service? From what I understand you're trying to reach your service from within the cluster so you should use ClusterIP (default value)
I can see in your project that your dev profile is hitting localhost and the prod one is hitting postgres. Are you using prod profile in your deployment? Your application property is also using dev. Also to use kubernetes dns resolver you must specify the namespace as well, try with postgres.default instead of just postgres in the database connection string
Could you try setting the variables' value directly in the deployment template? For example - name: spring.datasource.password valueFrom: secretKeyRef: name: dev-db-secret key: password