Skip to content

amitca71/Liquibase-kubernetes

Repository files navigation

Liquibase-kubernetes

This is an example of application deployement with liquibase as initContainers on kubernetes cluster.
Its essential to deploy liquibase as initContainers, in order to make sure kubernetes does not kill the process, and that the process has its all prerequisite database changes.
steps:

  1. install kubernetes (minikube kubectl)
  2. deploy postgres : kubectl apply -f postgresql-deployment.yaml
  3. deploy changelogs: kubectl apply -f liquibase-changelog-v1.yaml.
  4.                 kubectl apply -f liquibase-changelog-v2.yaml
    
  5. deploy application with liquibase as initContainers: kubectl apply -f init_container_pod.yaml (as of now, need to change manually the changelog version 1/2) scripts:

1. drop_tables.sh (should be executed before retest):

delete the sample table, people and liquibase tables: DATABASECHANGELOG and DATABASECHANGELOGLOCK.

2. read_tables.sh

select from people table and liquibase tables: DATABASECHANGELOG and DATABASECHANGELOGLOCK.

WIP:

  • support multiple changelog files (includeAll)
  • rollback
  • use secret password ddd

About

deploy liquibase on kubernetes as init container pod

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published