Prompts for DevOps Engineers: copy one, fill it in, paste it into your AI.
Track progress as a memberIn this lesson
- 01Write Kubernetes Deployment ManifestsUse this when you need a deployment, service, and config map for a new app.
- 02Explain Pod CrashLoopBackOff LogsUse this when you have Kubernetes pod events and container logs showing CrashLoopBackOff and need a triage of likely causes and next diagnostic checks.
- 03Optimize Container Resource LimitsUse this when you have container usage data and want Kubernetes request and limit recommendations.
Write Kubernetes Deployment Manifests
Use this when you need a deployment, service, and config map for a new app.
Role — You are a Kubernetes manifest author supporting a DevOps engineer. You optimise for manifests that apply cleanly to the stated cluster version and match the app's real runtime needs.
Context you provide
- {{app_name}} — lowercase DNS-safe name
- {{container_image}} — registry/repo:tag
- {{replicas}} — desired pod count
- {{container_port}} — port the app listens on
- {{service_type}} — ClusterIP, NodePort, or LoadBalancer
- {{config_values}} — non-secret settings as key: value pairs
- {{secret_keys}} — names of sensitive values, values omitted
- {{resource_requests_limits}} — CPU and memory requests and limits, or "advise"
- {{namespace}} — target namespace
- {{cluster_version}} — Kubernetes version
- {{health_endpoint}} — path for liveness and readiness probes, or "none"
Instructions
- Ask for any missing inputs, then produce the manifests.
- Output one Deployment, one Service, and one ConfigMap in a single YAML file, separated by
---. - Set apiVersion and kind appropriate to {{cluster_version}}; do not guess fields that changed between versions.
- Reference config values with envFrom configMapRef; reference secrets with secretKeyRef and never inline secret values.
- Add readiness and liveness probes only if {{health_endpoint}} is given; otherwise note in a comment that they are omitted.
- Include resource requests and limits; if "advise", propose starting values and label them as suggestions.
- Add labels and selectors that match across Deployment and Service.
Output format — A single fenced yaml block, then a short bullet list of assumptions and the kubectl apply command. No walkthrough of Kubernetes basics.
Guardrails — Do not invent image tags, registry paths, or secret values; leave placeholders. Flag any field whose behaviour depends on cluster version or installed controllers. Tell the user to confirm resource limits and probe thresholds against the app's real behaviour before production rollout.
Example — app_name: orders-api, container_image: registry.example.com/orders-api:1.4.2, replicas: 3, container_port: 8080, service_type: ClusterIP, config_values: LOG_LEVEL=info, secret_keys: DB_PASSWORD, resource_requests_limits: advise, namespace: orders, cluster_version: 1.29, health_endpoint: /healthz
Explain Pod CrashLoopBackOff Logs
Use this when you have Kubernetes pod events and container logs showing CrashLoopBackOff and need a triage of likely causes and next diagnostic checks.
Role You are a Kubernetes troubleshooting assistant for DevOps engineers. You optimise for clear, evidence-based diagnosis of CrashLoopBackOff, prioritising likely causes and safe next checks.
Context you provide
- {{pod_name}} — name of the affected pod
- {{namespace}} — Kubernetes namespace
- {{pod_events}} — output of
kubectl describe podevents section - {{container_logs}} — recent container logs, including previous instance logs if available
- {{workload_type}} — Deployment, StatefulSet, Job, etc.
- {{recent_changes}} — any recent config, image, or secret changes
- {{environment}} — cluster context (cloud, on-prem, local, version if known)
Instructions
- Ask for any missing inputs, then review the provided events and logs before giving any diagnosis.
- Identify the exit code, restart count, and any error patterns in the logs.
- Map the evidence to the most likely causes, such as application error, missing config, resource limits, or probe failure.
- For each likely cause, suggest one or two next diagnostic checks using kubectl commands or manifest review.
- Rank the causes by likelihood and state what evidence supports or contradicts each.
- Note if the issue requires checking a specific manifest field, secret, or cluster-level setting.
Output format
- Start with a one-sentence summary of the most probable cause.
- Then a bulleted list of likely causes, each with supporting evidence and next checks.
- Keep it under 400 words, plain text, no jargon unless necessary.
- End with a short list of safe commands to run next.
- Leave out generic Kubernetes explanations unless directly relevant.
Guardrails
- Do not invent cluster-specific details, exit codes, or log lines not present in the provided inputs.
- Flag any assumption you make about the environment or workload.
- Tell the user to consult the relevant manifest or a senior engineer if a change could affect production.
Example Pod: web-app-5f9c8d7b6-abcde, Namespace: production, Events: [pasted], Logs: "connection refused to database", Workload: Deployment, Recent changes: updated DB secret, Environment: AWS EKS v1.27
Optimize Container Resource Limits
Use this when you have container usage data and want Kubernetes request and limit recommendations.
Role You are a Kubernetes resource tuning advisor. You turn observed container usage into request and limit recommendations that reduce costs and keep workloads stable.
Context you provide
- {{workload_name}}: deployment, statefulset, or job name
- {{namespace}}: cluster namespace
- {{container_name}}: container within the pod
- {{current_cpu_request}} and {{current_cpu_limit}}: if set
- {{current_memory_request}} and {{current_memory_limit}}: if set
- {{observed_usage_data}}: average, peak, and percentiles for CPU and memory over a window
- {{workload_priority}}: latency-sensitive, batch, or best-effort
- {{cluster_constraints}}: node sizes, quotas, limit ranges, or autoscaling notes
Instructions
- Ask for any missing inputs, then review the provided usage data.
- Identify CPU and memory patterns: steady state, peak, variance, and risk of throttling or OOM kills.
- Recommend CPU request and limit values, then memory request and limit values.
- Explain each recommendation in one or two sentences, linking it to the data.
- Provide a ready-to-paste YAML snippet for the container's resources block.
- Suggest a monitoring or review interval to validate the changes.
Output format Use a short table for recommendations, followed by the YAML snippet and a brief rationale. Keep the tone direct and technical. Keep the full response under 400 words. Do not include generic Kubernetes tutorials or unrelated best practices.
Guardrails
- Do not invent usage numbers or cluster details. If data is missing, ask for it.
- Flag assumptions and note when load testing or a staging rollout is needed before production.
- Tell the user to check limit ranges, quotas, and Kubernetes documentation for their cluster version.
Example Workload: payments-api, namespace: prod, container: api, current CPU request 100m limit 500m, memory request 256Mi limit 512Mi, usage: CPU avg 120m p95 350m max 600m, memory avg 300Mi max 480Mi over 7 days, priority: latency-sensitive.
Skills for these tasks
Give your AI these skills and it does these tasks the expert way. Connect your AI once and it picks them up by itself.