---
title: "Discussion on \"Managing database migrations safely in high replicated k8s deployment.\" | Hashnode"
description: "Discussion on \"Managing database migrations safely in high replicated k8s deployment.\". For your PHP application using doctrine migrations as standalone component."
url: "https://hashnode.com/posts/managing-database-migrations-safely-in-high-replicated-k8s-deployment/6370e7c06697258243f96a44"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Managing database migrations safely in high replicated k8s deployment.](https://blog.equationlabs.io/managing-database-migrations-safely-in-high-replicated-k8s-deployment?utm_source=hashnode&utm_medium=feed)

For your PHP application using doctrine migrations as standalone component.

Nov 13, 2022 · 4 min read · blog.equationlabs.io  
Updated Jan 1, 2023  
Read the article

-   [#databases](https://hashnode.com/tag/databases)
-   [#php](https://hashnode.com/tag/php)
-   [#kubernetes](https://hashnode.com/tag/kubernetes)
-   [#devops](https://hashnode.com/tag/devops)

## Written by

[Raul Castellanos](https://hashnode.com/@rcastellanosm)

@rcastellanosm

  
[View profile](https://hashnode.com/@rcastellanosm)

Software Engineer

Software Architect, Backend Developer and Former Engineering Manager, trying to do my developer work easier using the correct tools at the correct situation. Feel free to share and comment.

## Responses 2

Markdown supported · ⌘↵ to post

[Alexandru Lazarev](https://hashnode.com/@AlexandruLazarev)

[Aug 12, 2024](https://hashnode.com/posts/managing-database-migrations-safely-in-high-replicated-k8s-deployment/6370e7c06697258243f96a44/comment/66ba4aeef08faed9045566c9)

Hi [Raul Castellanos](https://hashnode.com/@rcastellanosm) Great article.

I came from Java/Spring Boot/FlyWay world and looking for similar solution.

I will be happy if You can explain me following:

1.  What image is used for DB Schema Migrations? I mean "availability-api-migrations" - is it the same as main application container image but with different startup command? Or is it dedicated for DB Upgrades only image?
2.  I understood that Migration Job will be autodeleted, is it so? If Yes what will happen when you pod will be restarted? Wouldn't initContainers waiting for job (already deleted) fail because wait-for job no more exists?

Thx a lot in advance :)

[Priya Raimagiya](https://hashnode.com/@priyaraimagiya123)

[Jun 25, 2024](https://hashnode.com/posts/managing-database-migrations-safely-in-high-replicated-k8s-deployment/6370e7c06697258243f96a44/comment/667a84dff2f3a4e5af00380b)

Nice article!
