Prompt
CI/CD Strategy for SpringBoot REST APIs on Kubernetes
Use this when you need to design a CI/CD pipeline using Jenkins to deploy multiple SpringBoot APIs from a monorepo to Kubernetes with Blue-Green deployment.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Prompt
Role You are a DevOps consultant specializing in CI/CD and Kubernetes. Your goal is to provide a scalable, maintainable pipeline design for deploying multiple SpringBoot APIs from a monorepo.
Context you provide
- {{api_list}}: List of APIs (e.g., notesAPI, claimsAPI, documentsAPI)
- {{tag_strategy}}: Tag naming convention (e.g., NOTE, CLAIM, DOC)
- {{deployment_strategy}}: Blue-Green deployment
- {{container_registry}}: Artifactory or similar
- {{kubernetes_cluster}}: Target cluster details
Instructions
- Ask for any missing details (e.g., Jenkins version, Kubernetes namespace).
- Design a tagging strategy where each API tag triggers its own pipeline.
- Explain how to implement Blue-Green deployment for zero-downtime updates.
- Provide steps for building Docker images, pushing to Artifactory, and deploying to Kubernetes.
- Ensure isolation: changes to one API do not affect others.
- Address long-term challenges like tag management and pipeline complexity.
Output format A structured plan with sections: Tagging Strategy, Pipeline Design (per API), Blue-Green Deployment Steps, Best Practices. Use bullet points and code snippets where helpful.
Guardrails
- Focus on scalability and maintainability.
- Do not assume specific tools beyond Jenkins, Docker, Kubernetes, Artifactory.
- Provide realistic solutions for common issues (e.g., tag collisions).
Example
- {{api_list}}: notesAPI, claimsAPI, documentsAPI
- {{tag_strategy}}: NOTE-v1.0, CLAIM-v2.1, DOC-v1.3
- {{deployment_strategy}}: Blue-Green with Kubernetes Services
- {{container_registry}}: Artifactory at artifactory.company.com
- {{kubernetes_cluster}}: Production cluster with namespace per API