Q: You're building microservices and you want every service's Docker image to be uniquely and traceably tagged. What's your tagging strategy?
Never use latest in production — it makes rollback and debugging impossible.
Want to master this scenario in a live sandbox? KodeKloud's Enterprise GitOps with ArgoCD & Kubernetes Rollouts covers this exact problem with hands-on terminal drills.
🛠️ Production Runbook & Step-by-Step Resolution
Direct Answer: "During a high-stakes release, we hit a similar deployment challenge and resolved it with automated safeguards. When addressing this question, I walk the interviewer through our production incident runbook: isolating the blast radius, checking diagnostic logs and metrics, and applying a safe fix."
Initial Diagnostics & Root Cause Analysis
Never use latest in production — it makes rollback and debugging impossible.
- Git commit SHA —
my-service:abc1234— fully unique, traceable.git rev-parse --short HEAD. - Semantic version + SHA —
my-service:1.4.2-abc1234— human readable + traceable. - Branch + SHA for non-main branches —
my-service:feature-login-abc1234for testing.
Remediation & Permanent Safeguards
Good strategies: Workflow: In Kubernetes, the deployment image tag is updated to the new SHA. ArgoCD/Flux detects the change and deploys.
IMAGE_TAG=$CI_COMMIT_SHA # GitLab
# or
IMAGE_TAG=$GITHUB_SHA # GitHub Actions
docker build -t my-registry/my-service:$IMAGE_TAG .
docker push my-registry/my-service:$IMAGE_TAG
- Git commit SHA — my-service:abc1234 — fully unique, traceable. git rev-parse --short HEAD.
- Semantic version + SHA — my-service:1.4.2-abc1234 — human readable + traceable.
- Branch + SHA for non-main branches — my-service:feature-login-abc1234 for testing.
Senior hiring managers and bar raisers evaluate how you prioritize during outages. Avoid these common anti-patterns:
- Performing all-at-once cutovers rather than progressive canary deployments or blue/green validation when addressing microservices Direct cutovers expose 100% of user traffic to unverified code defects, maximizing the blast radius of unexpected runtime bugs.
- Configuring static long-lived cloud credentials in CI runners instead of temporary STS tokens via OIDC when addressing automation Static access keys stored in CI secret vaults risk exfiltration if runner environments or third-party pipeline actions are compromised.
-
Relying exclusively on client-side pre-commit hooks for secret detection without CI server gate enforcement
Developers can bypass client hooks with
git commit --no-verify; robust DevSecOps requires automated pipeline scanning with tools like Gitleaks or Trivy. - Ignoring runner disk space saturation and dangling container build cache accumulation Unpruned runner build artifacts and dangling Docker images exhaust disk inodes, causing pipeline failures unrelated to actual code quality.