Liquibase Running as a Kubernetes job is failing to get connected with Postgres container

4/6/2019

Setting up minikube cluster with the postgress and liquibase. --> postgres is deployed in the pods --> Running liquibase job to update the postgres

kubernetes job file to run update command in liquibase:

kubernetes job file to run update command in liquibase

Dockerfile to create a liquibase image:

Dockerfile to create a liquibase image

error log:

error log

-- Vaibhav
kubernetes
kubernetes-helm
liquibase
postgresql

2 Answers

4/7/2019

The pod is not able to establish connection to the database. Make sure database username and password is correct. Instead of setting , localhost in LIQUIBASE_URL in DockerFile, can you provide the IP here. Also try to exec into the pod and check if you are able to ping the machine where database is hosted.

-- Saurabh
Source: StackOverflow

4/10/2019

the issue is resolved .. giving the refrence of the internal end point of the Postgres pod :)

-- Vaibhav
Source: StackOverflow