Kubernetes Without the Drowning: Two Paths from First Pod to Production

You've just been handed your first Kubernetes cluster. The docs are endless, the manifests are cryptic, and every tutorial assumes you already know what a readiness probe is. You're not alone — most engineers start by copying YAML from blog posts, then spend hours debugging why their pod keeps restarting. But there's another way: using large language models (LLMs) with carefully crafted prompts to review, explain, and fix your Kubernetes configurations. The choice between manual manifest crafting and LLM-assisted workflows isn't about skill — it's about scale and change frequency. For a single service, hand-written YAML teaches you the fundamentals. For a growing infrastructure with daily deployments, LLM prompts can save hours of review and reduce late-night firefighting. This roundup gives you the prompts that make the difference.

Manual manifests vs. LLM prompts
Manual manifests
  • Clear for 1-2 services
  • Good for learning fundamentals
  • Time-consuming for large clusters
  • Error-prone under time pressure
LLM prompts
  • Scales with many services
  • Catches subtle misconfigurations
  • Requires validation
  • Saves hours on reviews

When Manual Manifests Make Sense (And When They Don't)

If you're running one or two services and deploy once a week, writing manifests by hand is often clearer. You see every field, you learn the API, and you avoid black-box automation. But once you have multiple environments, Helm charts with conditionals, and a team of developers pushing changes, manual review becomes a bottleneck. That's where LLM prompts shine: they can spot missing resource limits, misconfigured probes, and network policies that block traffic — things that are easy to overlook in a 300-line YAML file.

The scale tipping point If your cluster has more than five services or you deploy more than once a day, manual manifest review costs more time than it saves. LLM-assisted checks become worth the setup.

Prompt 1: The YAML Sanity Check

When to use: Before applying any manifest to a cluster, especially after copying from a tutorial or Stack Overflow. This prompt catches common mistakes like missing resources, incorrect apiVersion, or probes that will always fail.

Prompt:

You are a Kubernetes expert reviewing a YAML manifest. Check the following file for:

1. Missing resource requests/limits (CPU and memory).
2. Probes (liveness, readiness) that are misconfigured (e.g., initialDelaySeconds too low, wrong port).
3. Incorrect apiVersion for the resource type.
4. Any securityContext issues (running as root, no readOnlyRootFilesystem).
5. Service selector mismatches with pod labels.
Return a list of issues with severity (critical, warning, info) and a suggested fix for each.

Manifest:

```yaml
[paste your YAML here]

```

Example: If your deployment lacks resources.requests, the LLM will flag it as a warning and suggest adding cpu: 100m, memory: 128Mi. It might also notice that your liveness probe uses httpGet on port 8080 but your container listens on 80 — a critical error that would cause CrashLoopBackOff.

Prompt 2: Explaining Probes Like I'm Five

When to use: When you're unsure why a pod is restarting or not receiving traffic. Probes are a common source of confusion.

Prompt:

Explain the difference between liveness, readiness, and startup probes in Kubernetes. Then, for the following probe configuration, tell me what will happen if the application takes 30 seconds to start and has a liveness probe with initialDelaySeconds: 5 and periodSeconds: 10. Will the pod be restarted? Why or why not?

Probe config:

```yaml
livenessProbe:

  httpGet:

    path: /healthz

    port: 8080

  initialDelaySeconds: 5

  periodSeconds: 10

```

Example: The LLM will explain that the liveness probe starts checking after 5 seconds, but if the app isn't ready, it will fail and the pod will be restarted repeatedly. The fix: increase initialDelaySeconds to 40 or use a startup probe.

Prompt 3: Helm Chart Review for Common Pitfalls

When to use: When you're using Helm and want to avoid issues like missing values.yaml defaults, templating errors, or resource conflicts.

Prompt:

Review this Helm chart template for common mistakes. Check for:

- Hardcoded values that should be in values.yaml.
- Missing default values in values.yaml.
- Incorrect use of `{{ .Values }}` (e.g., missing quotes, wrong indentation).
- Resource limits that might cause OOMKills.
- Any anti-patterns like using `latest` tag for images.
Provide a corrected version of the template and values.yaml snippet.

Template:

```yaml
[paste template here]

```
values.yaml:

```yaml
[paste values.yaml here]

```

Example: The LLM might spot that your image.tag is hardcoded as latest in the template, which breaks rollbacks. It will suggest using {{.Values.image.tag }} and setting a default in values.yaml.

Prompt 4: Network Policy Debugging

When to use: When pods can't communicate and you suspect network policies are blocking traffic.

Prompt:

I have a network policy that should allow traffic from pods with label `app=frontend` to pods with label `app=backend` on port 8080. But the connection is timing out. Here is the policy:

```yaml
[paste network policy]

```
What could be wrong? List possible issues and how to verify them using `kubectl` commands.

Example: The LLM might notice that the policy's podSelector doesn't match the actual labels, or that the namespaceSelector is missing. It will suggest running kubectl describe networkpolicy and checking pod labels.

Prompt 5: Resource Limit Tuning

When to use: When pods are being OOMKilled or CPU throttled, and you need to set realistic limits.

Prompt:

My pod is getting OOMKilled. The current resources are:

```yaml
resources:

  requests:

    memory: "64Mi"

    cpu: "100m"

  limits:

    memory: "128Mi"

    cpu: "200m"

```
The application is a Node.js API that typically uses 200MB of memory under load. What should I change? Explain the relationship between requests and limits, and suggest new values.

Example: The LLM will explain that the limit is lower than actual usage, causing OOMKills. It will recommend setting memory limit to at least 256Mi and requests to 128Mi, and possibly adjusting CPU limits based on profiling.

The Limits of LLM Assistance

LLMs are not magic. They can hallucinate resource names or suggest outdated API versions. Always validate their output with kubectl apply --dry-run=server and test in a staging cluster. Also, LLMs don't know your application's behavior — you still need to monitor and adjust. Use these prompts as a second pair of eyes, not as a replacement for understanding.

For a deeper dive into Kubernetes troubleshooting with LLMs, see Before the Cluster Falls: LLM Prompts That Read Pods, Helm Charts, and Resource Limits Better Than a Tired On-Call. More on the topic: “Docker, Kubernetes, and the LLM That Asks "Why?": Prompts That Diagnose a Pod Instead of Blindly Restarting It”.

Your Next Step

Pick one prompt that addresses your current pain point — whether it's a crashing pod or a Helm chart that won't render — and try it on a real manifest. The goal isn't to automate everything, but to reduce the cognitive load so you can focus on building. Start small, validate the suggestions, and gradually incorporate LLM reviews into your workflow. The cluster will thank you.

← All posts

Ask AI about this article

Ask a question about this article — ASI Biont will answer based on its text.