P
💻DeveloppementAdvancedAll AIs

Prompt to Automate Kubernetes Deployments Like a Pro

This prompt generates a complete, secure Kubernetes configuration, including YAML manifests, autoscaling and DevOps best practices tailored to your application.

Paste in your AI

Paste this prompt in ChatGPT, Claude or Gemini and customize the variables in brackets.

Tu es un ingénieur DevOps senior spécialisé en Kubernetes avec 10 ans d'expérience en orchestration de conteneurs et en infrastructure cloud-native. Je dois déployer l'application suivante sur un cluster Kubernetes :

  • Nom de l'application : [NOM_APPLICATION]
  • Type d'application : [TYPE_APPLICATION (ex: API REST Node.js, microservice Python, frontend React, worker asynchrone, base de données stateful)]
  • Environnement cible : [ENVIRONNEMENT (ex: production, staging, développement)]
  • Fournisseur cloud / infra : [FOURNISSEUR (ex: AWS EKS, GCP GKE, Azure AKS, bare-metal, k3s)]
  • Nombre de réplicas souhaité : [NOMBRE_REPLICAS]
  • Ressources estimées : [RESSOURCES (ex: 256Mi RAM / 250m CPU par pod, ou 'à déterminer')]

Génère une configuration de déploiement Kubernetes complète incluant :

  1. Deployment manifest (YAML) avec : labels cohérents, strategy de rolling update, resource requests/limits, liveness et readiness probes, security context (non-root, read-only filesystem si applicable), variables d'environnement via ConfigMap et Secrets
  2. Service adapté (ClusterIP, NodePort ou LoadBalancer selon le contexte)
  3. ConfigMap pour la configuration non sensible
  4. HorizontalPodAutoscaler avec des seuils pertinents
  5. NetworkPolicy restrictive (principle of least privilege)
  6. PodDisruptionBudget pour garantir la haute disponibilité

Pour chaque fichier YAML généré :

  • Ajoute des commentaires explicatifs sur les choix techniques
  • Respecte les bonnes pratiques de sécurité Kubernetes (Pod Security Standards restricted)
  • Utilise des labels standards (app.kubernetes.io/*)
  • Propose des valeurs par défaut raisonnables que je pourrai ajuster

Termine par une section 'Commandes de déploiement' avec les commandes kubectl dans l'ordre, une checklist de vérification post-déploiement, et les points d'attention spécifiques à l'environnement choisi.

Personalize this prompt with Léa

Léa rewrites this prompt for your job and your exact goal — 3 quick questions.

Why this prompt works

<p>This prompt transforms AI into an experienced Kubernetes DevOps engineer capable of producing <strong>production-ready</strong> deployment manifests. By providing the application type, target environment and cloud provider, you get a complete configuration following security and high availability best practices.</p><p>The bracketed variables let you adapt the prompt to any scenario: from a simple microservice in staging to a complex production architecture. The prompt covers often-neglected aspects like <strong>NetworkPolicies</strong>, <strong>PodDisruptionBudgets</strong> and <strong>security contexts</strong>, which are essential for a robust deployment.</p><p>For best results, be specific about your tech stack and constraints. You can iterate by then requesting an <strong>Ingress</strong>, <strong>ServiceAccounts</strong> with RBAC, or integration with a service mesh like Istio. This prompt serves as a solid foundation that you will enrich based on your specific needs.</p>

Use Cases

Deploy a new microservice on an existing Kubernetes cluster with security best practicesMigrate a monolithic application to Kubernetes by generating all necessary manifestsPrepare a Kubernetes configuration for a production environment with autoscaling and high availabilityStandardize team deployments by creating reference YAML templates

Expected Output

A complete set of commented Kubernetes YAML files (Deployment, Service, ConfigMap, HPA, NetworkPolicy, PDB), accompanied by ordered kubectl commands for deployment and a post-deployment verification checklist.

Improve this prompt

Run this prompt through the Optimizer to strengthen its context, constraints and expected format.

Improve this prompt with the Optimizer

Comments

  • LéaAI

    Pour une automatisation complète, demandez en plus l’intégration GitOps : un manifest ArgoCD ou Flux pour déployer ces ressources, et une gestion des secrets via ExternalSecrets/SOPS. Cela rendra vos déploiements reproductibles sur plusieurs environnements.

📬 Get new prompts every week

Join our newsletter and never miss a prompt.

Go further

Similar Prompts

💻DeveloppementAdvancedAll AIs

Design a Robust Microservices Architecture

A complete prompt to design a professional microservices architecture covering DDD decomposition, inter-service communication, Kubernetes deployment, and observability.

0503
💻DeveloppementIntermediateAll AIs

Debug Your Python Code with ChatGPT

A structured prompt to get a complete analysis of your Python bugs: identification, root cause explanation, commented fix, and prevention tips.

0592
💻DeveloppementIntermediateAll AIs

A/B Testing Plan

Plan an A/B test

0294
💻DeveloppementIntermediateAll AIs

Design an API versioning strategy

Manage API versioning

0230