We use optional first-party traffic analytics to improve the blog. You can accept or decline — nothing is measured before you choose.

Privacy policy

Skip to content
NyverraNyverra
⌘K
HomeArticlesCorporate site
🇺🇸
Nyverra

Editorial channel

Articles on technology, operations and partners — infrastructure, monitoring and critical environments.

Social media

Explore

  • Home
  • Articles
  • Categories
  • Tags
  • Authors
  • About
  • Contact
  • RSS
  • Corporate site

Nyverra

  • Our services
  • Case studies
  • Partners

Contact

Email[email protected]WhatsApp(62) 99309-1592Client portalITSM · tickets and SLA

Rua RB 18, S/N — Casa 01, Sala 01 · Residencial Buriti · Senador Canedo – GO, Brazil · ZIP 75260-459

Hours: Mon–Fri, 8am–6pm

© 2026 Nyverra. All rights reserved.

CNPJ: 61.571.209/0001-08 · State registration: 20.291.265-5 · D-U-N-S®: 57-323-5796

blog.nyverra.com.br

Terms of usePrivacyCookies
Back to top
  1. Home
  2. Kubernetes
  3. Postmortem: Deploy Passed Build, Died in Cluster
Kubernetes
#Curso Kubernetes#Kubernetes

Postmortem: Deploy Passed Build, Died in Cluster

Wedson LopesWedson Lopes
31 de outubro de 20263 min de leitura

Not every incident starts with a blackout. This one started with a "green" deploy in the build and a rollout that never finished.

Summary

The pipeline built the new image, imported it on the nodes and updated the Deployment. The new pods entered CrashLoopBackOff. The old pods continued serving, so the site didn't go down — but the deploy remained incomplete for 40 minutes, until the Jenkins timeout.

Cause: the cluster secret had APP_STORAGE_S3_ACCESSKEY/SECRETKEY = minioadmin. The new image included the guard ProdDefaultCredentialsGuard, which rejects default credentials in the prod profile. The old image didn't have the guard (or had been stripped before the change).

Worse: the new image had already applied the Flyway migration 3.5. Rolling back to the old image started failing in Flyway validation. The path was fix forward.

Timeline

Time Event
T+0 Pipeline starts; build and image import on the 3 workers
T+40 min Backend rollout reaches 900 s timeout
T+41 min New pods in CrashLoopBackOff; old pods 2/2 serving
T+45 min Logs show INF-SEC-01 (S3 default)
T+50 min Rollback attempt fails: Flyway 3.5 applied
T+55 min Dedicated MinIO user created; secret updated
T+60 min New image promoted; rollout completes
T+65 min Validation: readiness UP, /api/fornecedores 200, CNPG healthy

Root cause

  1. Configuration drift. The cluster secret had MinIO default credentials (minioadmin), while the application already had a guard that rejects them in production.
  2. Build does not validate runtime. The build passed; the guard only runs at startup.
  3. Rollout without credentials preflight. The pipeline didn't check the secret before swapping the image.
  4. Migration applied before the guard. Flyway ran, applied 3.5, and only then the guard killed the process. This made rollback unfeasible.

What worked

  • Old pods continued serving during the rollout (RollingUpdate strategy).
  • The guard did its job: refused default credential in production.
  • The logs pointed to the cause in one line.
  • The fix forward was possible without data loss.

What didn't work

  • The pipeline didn't have credentials preflight.
  • Rollback was attempted before realizing the migration was applied.
  • The deploy alert didn't differentiate "build ok" from "rollout ok".
  • The default credential was in the cluster for months, without rotation.

Fix

  1. Create a dedicated MinIO user (non-default) with read/write policy.
  2. Update the portal-secrets secret with the new access/secret.
  3. Promote the new image (fix forward).
  4. Validate readiness, critical endpoint and database.

The step-by-step is in the runbook docs/RUNBOOK-K8S-DEPLOY-INF-SEC-01.md of the repository.

Lessons

  1. Default credential is technical debt with interest. Rotate before the guard forces you.
  2. Preflight in the pipeline: fail before the build if the secret has default value.
  3. Migration is forward-only. If the new image applied migration, image rollback is not safe.
  4. Rollout needs timeout and alert. 40 minutes is too long to discover a CrashLoop.
  5. Green build is not green deploy. Validate readiness and a business endpoint, not just /health.
  6. Have a fix forward runbook. The way back may not exist.

Checklist for your pipeline

  • [ ] The pipeline validates credentials/secrets before swapping the image.
  • [ ] The rollout has timeout and alert.
  • [ ] Post-deploy validation includes a business endpoint.
  • [ ] I know if the image applies migrations.
  • [ ] I have fix forward and data rollback plan.
  • [ ] Default credentials are rotated.

Next

In chapter 09 we will expose the application with Services, Ingress, DNS and TLS — and understand why the real traffic path matters even in load testing.

Next: Kubernetes Course 09 — Services, Ingress, DNS and TLS (coming soon). Meanwhile, go back to the course index.

Share

Keep reading

Read also

  • Postmortem — The Postgres failover that taught me what PDB is
    Kubernetes

    Postmortem — The Postgres failover that taught me what PDB is

    A load test with 50 users brought down the Postgres primary. What HPA, worker memory, and PDB have to do with it.

    31 de outubro de 20264 min de leitura
  • Kubernetes for Real — from Zero to Production Cluster
    Kubernetes

    Kubernetes for Real — from Zero to Production Cluster

    A practical path to understand, set up, and operate a Kubernetes cluster — from the first pod to Postgres failover.

    31 de outubro de 20264 min de leitura
  • Kubernetes Course 28 — DR and Capstone: Proving the Cluster Comes Back
    Kubernetes

    Kubernetes Course 28 — DR and Capstone: Proving the Cluster Comes Back

    RPO, RTO and real drills: disaster scenarios, runbook, measured restore and the capstone that closes the course with a cluster that recovers.

    31 de outubro de 20265 min de leitura

Nyverra

Need specialist help?

  • Infrastructure services
  • Case studies
  • Partners

Comments

No comments yet

Be the first to share your thoughts on this article.

Leave a comment

Newsletter

Get new articles

Subscribe to receive Nyverra blog posts in your inbox. We will send a confirmation link.

​