AI Prompts for Gemini for DevOps

20 of the best prompts for Gemini for DevOps, step by step across 4 stages. Works with ChatGPT, Claude, and Gemini.

AI Prompts for Gemini for DevOps

20 of the best prompts for Gemini for DevOps, step by step across 4 stages. Works with ChatGPT, Claude, and Gemini.

Scroll to explore

Published July 5, 2026

Automate deployments, write reliable infrastructure code, debug pipelines faster, and build systems that just work. Built across 4 distinct stages covering CI/CD Pipelines, Infrastructure as Code, Scripting and Automation and more, this guide gives you one expert prompt per step so you never have to write from scratch or guess what the AI needs. The prompts work in ChatGPT, Claude, and Gemini and are designed to get usable output on the first try.

CI/CD Pipelines

Write and optimise automated build, test, and deploy pipelines.

Write GitHub Actions workflow

Write a GitHub Actions workflow for [DESCRIBE STACK] that runs lint, tests, and deploys to [TARGET] on merge to main. Add dependency and build caching.

CI/CD Pipelines

CI takes minutes:

My CI takes [N] minutes: [DESCRIBE WORKFLOW]. Add parallelisation and caching to bring it under [N] minutes.

CI/CD Pipelines

Write deployment pipeline

Write a deployment pipeline that auto-deploys to staging and requires manual approval before production, with Slack notifications at each stage.

CI/CD Pipelines

Write Docker multi-stage build

Write a Docker multi-stage build for [DESCRIBE APP] that caches layers efficiently and pushes to [DESCRIBE REGISTRY].

CI/CD Pipelines

CI has

My CI has a flaky step: [DESCRIBE]. Diagnose the most likely causes and show how to fix or add a retry correctly.

CI/CD Pipelines

Infrastructure as Code

Write maintainable infrastructure definitions.

Write Terraform configuration

Write a Terraform configuration for [DESCRIBE INFRASTRUCTURE]. Use modules, environment-specific variables, and add outputs for key resource IDs.

Infrastructure as Code

Write Docker Compose file

Write a Docker Compose file for local development of [DESCRIBE APP WITH DEPENDENCIES]. Include correct port mappings, environment variables, and volume mounts.

Infrastructure as Code

Write Kubernetes manifest

Write a Kubernetes manifest for [DESCRIBE SERVICE] with Deployment, Service, and HPA. Set resource requests and limits for [DESCRIBE LOAD].

Infrastructure as Code

Show Show the resource

Provision [DESCRIBE CLOUD RESOURCE] with Terraform. Show the resource, the required IAM permissions, and the variables to make it reusable across environments.

Infrastructure as Code

Terraform state is

My Terraform state is disorganised. How do I refactor into modules without losing existing resources, including moving resources between state files safely?

Infrastructure as Code

Scripting and Automation

Automate operations reliably.

Write bash script

Write a bash script that [DESCRIBE TASK]. Include set -e and set -o pipefail, helpful error messages, and a --dry-run flag.

Scripting and Automation

Automate Include a timeout

Automate [DESCRIBE DEPLOYMENT TASK, E.G. "DATABASE MIGRATIONS IN THE DEPLOY PIPELINE"]. Include a timeout, rollback on failure, and a completion notification.

Scripting and Automation

Write cleanup script

Write a cleanup script for [DESCRIBE STALE RESOURCES]. Preview what will be deleted before taking any destructive action.

Scripting and Automation

Manage secrets securely

How do I manage secrets securely in [DESCRIBE ENVIRONMENT] using [SECRETS MANAGER/VAULT/GITHUB SECRETS]? Show how to inject them into the application.

Scripting and Automation

Write monitoring script

Write a monitoring script that checks [DESCRIBE HEALTH CHECKS] on a schedule and alerts [SLACK/PAGERDUTY] if any check fails.

Scripting and Automation

Incidents and Debugging

Diagnose failures and reduce time to recovery.

Deployment failed:

My deployment failed: [PASTE ERROR]. Walk me through diagnosing the root cause and suggest the most likely fixes in order of probability.

Incidents and Debugging

Service shows

My service shows [DESCRIBE SYMPTOM]. Metrics: [DESCRIBE]. What are the most likely causes and how do I narrow it down quickly?

Incidents and Debugging

Write post-incident review template

Write the post-incident review template for [DESCRIBE INCIDENT]: timeline, root cause, contributing factors, impact, immediate fix, long-term prevention.

Incidents and Debugging

Roll back this

I need to roll back this deployment quickly: [DESCRIBE]. Write the exact commands, how to verify the rollback succeeded, and how to communicate status.

Incidents and Debugging

Distributed tracing

Set up distributed tracing for [DESCRIBE ARCHITECTURE]. Recommend the tooling, show how to instrument services, and explain how to trace a slow request end-to-end.

Incidents and Debugging

Frequently asked questions

Can Gemini write CI/CD pipeline configs?+

Yes. Describe your stack and targets and Gemini will write a complete workflow with caching, parallelised jobs, and environment-specific deploy steps.

How does Gemini help with Terraform and Kubernetes?+

Describe the infrastructure and Gemini will write working Terraform modules or Kubernetes manifests with proper resource limits, IAM policies, and reusable variables.

Can Gemini help debug pipeline failures?+

Yes. Paste the error log and workflow and Gemini will walk through the failure, explain each error, and suggest fixes in order of likelihood.

What DevOps topics does Gemini handle best?+

CI/CD configuration, Docker and Kubernetes, Terraform, bash scripting, incident response, and deployment rollbacks are all areas where Gemini gives accurate, immediately usable guidance.

Can Gemini help with production incidents?+

Yes. Describe the failure and paste relevant logs and Gemini will diagnose the root cause, suggest the fastest fix, and write rollback commands.

More Gemini prompt guides

Gemini for WritingGemini for ResearchGemini for CodingGemini for Data AnalysisGemini for MarketingGemini for Resume WritingGemini for Email MarketingGemini for YouTube ScriptsGemini for Meeting SummariesGemini for Cover LettersGemini for Ad CopyGemini for Business PlansGemini for Cold EmailsGemini for Social Media ContentGemini for Blog WritingGemini for SEO ContentGemini for PresentationsGemini for Product DescriptionsGemini for Sales CopyGemini for Content StrategyGemini for ProductivityGemini for HealthGemini for StudyingGemini for TravelGemini for FinanceGemini for AnalysisGemini for Job DescriptionsGemini for Technical WritingGemini for Newsletter WritingGemini for Instagram CaptionsGemini for LinkedIn PostsGemini for Twitter ThreadsGemini for TikTok ScriptsGemini for DebuggingGemini for Code ReviewGemini for Unit TestsGemini for SQLGemini for Brand VoiceGemini for Google DocsGemini for Google SheetsGemini for GmailGemini for Google SlidesGemini for Multimodal TasksGemini for Project ManagementGemini for Customer ServiceGemini for HR ProfessionalsGemini for ConsultingGemini for ProposalsGemini for PythonGemini for JavaScriptGemini for DocumentationGemini for Data ScienceGemini for API DevelopmentGemini for CopywritingGemini for ScriptwritingGemini for Creative WritingGemini for UX WritingGemini for Case StudiesGemini for EntrepreneursGemini for TeachersGemini for Market ResearchGemini for LegalGemini for FreelancersGemini for EmailGemini for RecipesGemini for FitnessGemini for Personal FinanceGemini for ParentingGemini for ReactGemini for TypeScriptGemini for TestingGemini for AndroidGemini for LawyersGemini for AccountantsGemini for NursesGemini for Real EstateGemini for SalespeopleGemini for Small BusinessGemini for EcommerceGemini for StartupsGemini for NonprofitsGemini for Job SearchGemini for Language LearningGemini for Public RelationsGemini for Mental HealthGemini for Book WritingGemini for Job InterviewsGemini for Learning SpanishGemini for Learning FrenchGemini for Learning GermanGemini for Learning JapaneseGemini for Learning PortugueseGemini for Learning ItalianGemini for Learning KoreanGemini for Learning MandarinGemini for Learning ArabicGemini for Learning HindiGemini for Weight LossGemini for ADHDGemini for College EssaysGemini for Side HustlesGemini for Retirement PlanningGemini for PregnancyGemini for DivorceGemini for GriefGemini for New ParentsGemini for MovingGemini for Making MoneyGemini for Passive IncomeGemini for FreelancingGemini for Starting an Online BusinessGemini for Digital ProductsGemini for Learning DutchGemini for Learning SwedishGemini for Learning PolishGemini for Learning TurkishGemini for Learning VietnameseGemini for Wedding PlanningGemini for Starting CollegeGemini for Job LossGemini for Chronic IllnessGemini for MenopauseGemini for Learning ThaiGemini for Learning RussianGemini for Learning IndonesianGemini for Learning TagalogGemini for Learning SwahiliGemini for Divorce RecoveryGemini for Navigating Empty NestGemini for Retirement TransitionGemini for Caregiver SupportGemini for Adoption JourneyGemini for DropshippingGemini for Content Creation IncomeGemini for Amazon FBAGemini for Print on DemandGemini for Email WritingGemini for Fiction WritingGemini for Social Media MarketingGemini for SEO WritingGemini for Content MarketingGemini for RefactoringGemini for Code DocumentationGemini for Business PlanningGemini for Pitch DecksGemini for Financial ModelingGemini for FundraisingGemini for Lesson PlanningGemini for TutoringGemini for Research PapersGemini for Online CoursesGemini for Goal SettingGemini for Time ManagementGemini for JournalingGemini for Habit BuildingGemini for Weight ManagementGemini for Mental WellnessGemini for Sleep ImprovementGemini for Nutrition PlanningGemini for Fitness PlanningGemini for Salary NegotiationGemini for LinkedIn Profile OptimizationGemini for Career Change PlanningGemini for Professional NetworkingGemini for Promotion StrategyGemini for BudgetingGemini for Investing as a BeginnerGemini for Paying Off DebtGemini for Tax PlanningGemini for Saving MoneyGemini for Novel WritingGemini for Character DevelopmentGemini for WorldbuildingGemini for Poetry WritingGemini for Story StructureGemini for Homework HelpGemini for Essay WritingGemini for Exam PreparationGemini for PlanningGemini for OrganizationGemini for BusinessGemini for Meal PlanningGemini for Personal DevelopmentGemini for InvestingGemini for Financial PlanningGemini for EditingGemini for Managing Life Transitions