Vibe DevOps vs Production DevOps: the node drain that emptied checkout

Vibe DevOps vs Production DevOps is decided by what your system does when a node disappears. In the incident below, an AI-generated Deployment passed every demo check, then a routine node drain evicted all three replicas at once because nothing spread them across nodes or limited voluntary disruption.

At 16:40 UTC a platform team started a routine cluster upgrade. The checkout service ran three replicas from a manifest an AI assistant had generated weeks earlier. The YAML applied cleanly, the pods showed Running, and the dashboard stayed green through two releases. What the manifest never declared was topology: all three replicas had landed on the same node, because nothing told the scheduler to spread them. There was no PodDisruptionBudget, so the drain treated all three pods as freely evictable. The drain evicted them together, replacements queued behind image pulls on surviving nodes, and checkout returned errors for eleven minutes. A second surprise followed: the image tag was mutable, so the replacement pods pulled a newer build than the one that had been running, mixing two versions during the recovery.

Nothing in that chain was exotic. The manifest was syntactically valid, semantically plausible, and operationally incomplete. That is the signature of vibe DevOps: output optimised for the feedback loop you can see, which is whether it applies and starts. Production applies a different feedback loop. It asks what happens under node loss, traffic bursts, credential expiry, and time. This guide maps that second loop as five forces beneath the waterline, each with a failure signature, a detection method, and a guardrail. If your workloads already follow solid Kubernetes best practices, treat this as the audit layer for anything an AI assistant generated.


What vibe DevOps actually optimises

Vibe DevOps is infrastructure generated against a demo feedback loop: does it apply, does it start, does the dashboard look green. AI assistants optimise for plausible, happy-path output because that is what the prompt rewards. Production requirements are mostly invisible in that loop, so they are the first things missing.

The mechanism matters more than the label. A language model predicts text that resembles working infrastructure, drawing on years of tutorials, documentation snippets, and blog posts written for learning environments. Tutorial manifests deliberately omit resource requests, security contexts, disruption budgets, and network policies, because those fields distract from the concept being taught. Generated output inherits those omissions at scale, plus stale API versions and fields blended between resources that appear near each other in training text. Schema validation does not catch the problem, because schema checks form: fields exist and types match. A manifest can be perfectly valid and still declare one replica, a mutable image tag, no probes, and a wildcard IAM policy.

Two generation effects deserve names because they defeat casual review. Stale-version bias means older API shapes are over-represented in training data, so generated manifests reach for removed beta APIs and deprecated fields that a current cluster silently ignores or rejects at upgrade time. Field blending means a field that exists on one resource appears on another where it does nothing, producing configuration that looks intentional and changes nothing. Both effects pass a skim review because the text is fluent. Both fail against a strict schema check tied to the target cluster version, which is why mechanical validation outranks reading generated YAML with fresh eyes.

The dividing line is not whether AI wrote the code. It is whether a human understood it, reviewed it against production constraints, and put it through the same gates as any other change. AI-assisted engineering with review, tests, and policy gates is normal platform work. Vibe DevOps is the same generation step with the gates removed, and the gates are where production reality lives.


The iceberg reframed: five forces beneath the waterline

Beneath the waterline sit five forces that demos never apply: state that must survive, identity that bounds blast radius, network physics under load, supply chain drift over time, and cost that compounds silently. Every production incident traces back to one of them.

Force Demo assumption Production reality Failure signature
State Data resets between runs Data outlives every pod and deploy Restore fails, migration locks, pool exhaustion
Identity One admin credential works Every permission is a blast radius Wildcard policy, leaked key, agent overreach
Network physics Localhost latency, no loss Timeouts, retries, queues, partial failure Retry storms, cascading latency, 502s
Supply chain Latest tag is fine Artifacts drift and dependencies rot Unreproducible builds, surprise CVEs
Time and cost Nothing expires, capacity is free Certificates lapse, bills compound Expiry outages, cardinality blowups, idle spend

Read the matrix as a diagnostic, not a curriculum. When an AI-generated system breaks, classify the failure by force before touching the manifest. A restore that has never been tested is a state failure even if the backup job reports success. A dashboard that stays green while users error is a time-and-observability failure, because the signal was designed for the demo. The sections below take each force in turn, with the guardrail that neutralises it.

The forces also compound, which is why single-force fixes disappoint. A supply chain drift that changes a base image can alter TLS behaviour, which surfaces as a network failure during a certificate rotation, which pages the team that has no restore drill for the stateful service behind it. Production incidents rarely respect the matrix rows. The matrix earns its place by giving the response a starting classification and a first command, not by promising that one row explains everything. Mature teams review incidents against all five forces and record which guardrail was missing, which turns each outage into a permanent control instead of a story.


Force 1: state survives, and restores are the real backup

State is the force demos hide best, because demo data is disposable. Production state must survive pod replacement, node loss, bad deploys, and operator error. A backup that has never been restored is a hypothesis, and a migration that locks a hot table turns a routine release into an outage.

Three controls carry this force. First, restore drills: schedule restores into an isolated environment and measure them, because the restore path exercises credentials, network rules, and schema compatibility that the backup job never touches. Second, expand-and-contract migrations: add the new column, dual-write, backfill in batches with lock timeouts, then remove the old shape in a later release, so no single deploy holds a long lock on a hot table. Third, connection budgets: every replica you add multiplies database connections, so autoscaling an API without a pooler such as PgBouncer converts a traffic spike into database exhaustion. The infrastructure as code best practices guide covers the state-file side of the same discipline: remote state with locking, split by blast radius, and plan review before apply.

Queues and event systems carry their own state physics. Most brokers deliver at least once, which means consumers will see duplicates during redelivery, rebalance, and deploys. Generated consumers routinely assume exactly-once delivery and process payments, emails, or inventory changes twice. Production consumers are idempotent: every message carries a deduplication key, writes check that key before applying, and side effects tolerate replay. Ordering is the companion trap. Partitioned topics preserve order only within a partition, so a generated design that assumes global ordering breaks under the first rebalance. State design is where generated systems need the deepest human review, because the failure mode is silent data corruption rather than a visible crash.


Force 2: identity defines blast radius, for humans and agents

Identity is the force that decides how bad a mistake can get. Generated infrastructure defaults to permissive settings because restrictive defaults break demos. Production identity inverts that: least-privilege roles, short-lived credentials, and destructive actions gated behind review, especially when an AI agent holds the credentials.

The pattern to break is the long-lived, broad credential. Static cloud keys in CI variables, cluster-admin bindings for convenience, and wildcard IAM policies all share one property: a single leak or bad command inherits the full permission set. Replace them with OIDC federation from the CI system to the cloud, so credentials live for minutes and scope to one repository and environment. Scope Kubernetes RBAC to namespaces and verbs the workload actually uses, and keep secrets in a manager with rotation rather than base64 values in Git. The GitHub Actions security best practices guide covers the pipeline side of this control set.

AI agents raise the stakes because they act at machine speed without a concept of caution. An agent with production write access and no destructive-action gate will eventually execute a plausible, catastrophic command. Treat agent permissions as a production control: read-only by default, write access scoped per environment, destructive verbs such as delete and destroy requiring human approval, and every action logged with the prompt and plan that produced it. The permission architecture is the safety system; the model's judgement is not.

Attribution completes the control. Every production change should answer who or what made it, from which plan, approved by whom, in one query. Agent-driven changes need the same trail as human ones: the prompt, the generated diff, the policy checks that ran, and the approver for anything destructive. Break-glass access follows the same rule in reverse: emergency credentials exist, are alarmed on use, expire automatically, and get reviewed after the incident. Identity failures rarely announce themselves; they surface during audits and breaches, when the missing trail becomes the incident.


Force 3: network physics punishes optimistic defaults

Network physics is the force that turns small delays into cascading failure. Demos run on localhost with no packet loss and no queueing. Production networks add latency, partial failure, and retry amplification, where every client retrying at once multiplies load on the dependency that is already struggling.

Timeouts and retries are the first control. Every outbound call needs a timeout shorter than the caller's remaining budget, retries need exponential backoff with jitter and a cap, and retry budgets should stop a client from multiplying requests during an outage. Without those bounds, a slow dependency accumulates queued requests across every caller, and the recovery takes longer than the original fault. Circuit breakers complete the pattern by failing fast once a dependency is demonstrably down, protecting both sides.

Placement is the second control. Replicas that share a node or zone share a fate, so topology spread constraints and PodDisruptionBudgets are network-physics controls as much as scheduling ones: they decide whether a drain or zone event is a capacity dip or an outage. The incident at the top of this guide was a placement failure wearing a networking costume. Verify placement with evidence, not intent: list pods with their nodes after every release and confirm the spread the manifest claims.

Load shedding is the third control, and the one generated code almost never includes. When demand exceeds capacity, a system must choose what to drop: shed low-priority requests early with a clear error, protect the critical path, and keep latency bounded for the requests it accepts. Without shedding, queues grow until every request times out, which converts overload into total outage. Queue depth and queueing delay are the signals to watch, because they move before error rates do. Backpressure, bounded queues, and priority-aware shedding turn a traffic spike into degraded service instead of a cascading failure across every caller.


Force 4: supply chain drift makes builds unreproducible

Supply chain drift is the force that makes the same deploy produce different systems over time. Mutable image tags, unpinned dependencies, and unsigned artifacts mean two nodes can run different binaries from one manifest. Production supply chain control makes every artifact immutable, identified, and verifiable.

Pin images by digest in production manifests, and promote the same digest across environments instead of rebuilding per stage. A digest turns rollback into a known quantity: the previous artifact is byte-identical, not whatever the tag points at today. Generate an SBOM per build so a new CVE maps to affected services in minutes, and sign artifacts so admission can verify provenance before scheduling. Dependency updates belong in scheduled, reviewed pull requests with test evidence, not in silent base-image drift. The control question for any generated Dockerfile or pipeline is simple: can you name the exact bytes running in production, and reproduce them? If the answer involves a moving tag, the supply chain force is unmanaged.

Base images need a lifecycle, not just a pin. A pinned digest freezes known vulnerabilities in place, so pinning without a rebuild cadence trades drift for rot. The production pattern is scheduled rebuilds: rebuild on base-image updates, scan the result, promote the new digest through the same canary path as application changes, and keep the previous digest available for rollback. CVE triage then becomes a query against the SBOM inventory rather than a fleet-wide guessing exercise. Generated pipelines usually stop at build and push; the rebuild, scan, sign, and promote loop is the part production adds.


Force 5: time and cost compound quietly

Time and cost are the forces that fail without an event. Certificates expire, tokens lapse, metric cardinality grows, and idle capacity bills monthly. Demos run for minutes, so none of this appears. Production systems run for years, so expiry and accumulation are certainties to be scheduled, not surprises to be discovered.

Expiry management is a calendar discipline: inventory certificates, keys, and tokens with their expiry dates, automate renewal where the issuer allows it, and alert on time-to-expiry with enough lead time to act. Observability cost needs the same treatment. High-cardinality labels such as user IDs or raw URL paths multiply time series until the metrics backend degrades or the bill doubles; enforce label allowlists at the collector and sample healthy traces while keeping error traces whole. Alert on symptoms users feel, error rate and latency against SLOs, rather than raw CPU, because a deadlocked service at low CPU drops every request while looking calm. The production monitoring and alerting guide covers symptom-based alerting and runbook ownership in depth.

Capacity headroom belongs to the same force, because time converts today's headroom into tomorrow's saturation. Traffic growth, data growth, and dependency creep consume margin silently until a routine peak becomes an outage. Track headroom explicitly: the multiple of current peak load the system can absorb, measured by load test rather than estimated from instance sizes. Cost follows the same curve. Unit economics, cost per request or per active user, expose efficiency regressions that total spend hides, because growth masks waste. A generated autoscaling policy with no maximum and no cost alarm is a time-force failure waiting for its first traffic spike.


Before and after: hardening AI-generated YAML

Hardening generated YAML means adding the fields demos omit: resource requests, probes that test serving ability, a non-root security context, topology spread, and a disruption budget. The before version applies cleanly and fails under a drain. The after version survives the same drain.

yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: checkout-api
spec:
  replicas: 3
  selector:
    matchLabels:
      app: checkout-api
  template:
    metadata:
      labels:
        app: checkout-api
    spec:
      containers:
        - name: api
          image: checkout-api:latest
          ports:
            - containerPort: 8080
yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: checkout-api
  labels:
    app: checkout-api
spec:
  replicas: 3
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
  selector:
    matchLabels:
      app: checkout-api
  template:
    metadata:
      labels:
        app: checkout-api
    spec:
      topologySpreadConstraints:
        - maxSkew: 1
          topologyKey: kubernetes.io/hostname
          whenUnsatisfiable: DoNotSchedule
          labelSelector:
            matchLabels:
              app: checkout-api
      containers:
        - name: api
          image: checkout-api:1.4.2
          ports:
            - containerPort: 8080
          resources:
            requests:
              cpu: 250m
              memory: 256Mi
            limits:
              cpu: 500m
              memory: 512Mi
          securityContext:
            runAsNonRoot: true
            allowPrivilegeEscalation: false
            readOnlyRootFilesystem: true
            capabilities:
              drop:
                - ALL
          readinessProbe:
            httpGet:
              path: /healthz
              port: 8080
            initialDelaySeconds: 5
            periodSeconds: 10
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8080
            initialDelaySeconds: 15
            periodSeconds: 20
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: checkout-api
spec:
  maxUnavailable: 1
  selector:
    matchLabels:
      app: checkout-api

Each added field answers one force. The pinned tag and digest-ready reference answer supply chain drift. Requests and limits answer noisy-neighbour physics and give the autoscaler real inputs. The security context answers identity by removing root and privilege escalation. Topology spread and the disruption budget answer placement, so a drain moves one replica at a time instead of emptying the service. Probes answer time: readiness gates traffic on serving ability, and liveness restarts only what a restart can fix. The deployment reliability and canary releases guide covers staged rollouts once this base is in place.


Verification pipeline: gates that catch plausible-but-wrong

Verification works in layers because each layer catches a different class of error. Schema validation against the target cluster version catches removed APIs and misplaced fields. Static analysis catches insecure defaults. Admission policy enforces the rules at deploy time. Canary release and rollback evidence catch what static checks cannot.

yaml
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
  name: require-production-baseline
spec:
  validationFailureAction: Enforce
  rules:
    - name: require-resources-and-probes
      match:
        any:
          - resources:
              kinds:
                - Deployment
      validate:
        message: "Deployments must declare resource requests and a readiness probe."
        pattern:
          spec:
            template:
              spec:
                containers:
                  - resources:
                      requests:
                        cpu: "?*"
                        memory: "?*"
                    readinessProbe:
                      httpGet:
                        path: "?*"

Run the pipeline in order. Validate manifests against the exact Kubernetes version with a strict schema checker, then run a server-side dry run so the API server and admission controllers see the object without creating it. Scan the rendered output, not the templates, with a static analyser for root containers, mutable tags, missing limits, and exposed services. Enforce the baseline with admission policy so a bypassed pipeline still cannot schedule a non-compliant pod. Release through a canary with automatic rollback on error-rate or latency regression, and keep the rollback artifact immutable so recovery is a redeploy, not a rebuild. AI-generated output enters this pipeline as an untrusted draft, exactly like a new colleague's first pull request.

Negative tests keep the gates honest. A policy that has never rejected anything may be a policy that matches nothing, so the pipeline should include fixtures that must fail: a Deployment without requests, an image tagged latest, a privileged container. If the gate passes those fixtures, the gate is broken and the pipeline should stop. The same discipline applies to admission webhooks and static analysers after every upgrade, because rule formats and defaults drift between versions. Verification infrastructure needs verification, and the cheapest proof is a test that expects rejection and gets it. The local LLM for DevOps guide covers running generation models inside your own boundary when data sensitivity requires it.


The 30-minute vibe audit

The vibe audit is a timed evidence check for any AI-generated system heading to production. Each row demands proof, not assertion: a command output, a dashboard link, or a drill result. Any row without evidence is an accepted risk with an owner and a date, or it blocks launch.

Check Evidence to produce Force
Restore drill Timed restore into an isolated environment within the last quarter State
Migration safety Expand-and-contract plan with lock timeouts for the next schema change State
Credential scope OIDC federation in CI, no static cloud keys, RBAC scoped per namespace Identity
Agent permissions Read-only default, destructive verbs gated, actions logged Identity
Placement Pod-to-node listing showing spread across nodes or zones Network physics
Timeouts and retries Explicit timeout, capped retries with jitter on every outbound call Network physics
Artifact identity Digest-pinned images, SBOM per build, signed artifacts Supply chain
Expiry inventory Certificates and tokens listed with expiry dates and renewal automation Time and cost
Symptom alerts Error-rate and latency alerts tied to SLOs, each with a runbook Time and cost
Rollback One-command rollback to an immutable artifact, tested in staging All five

Run the audit before the first production traffic, after any major platform change, and whenever an AI assistant regenerates a significant part of the system. The audit's value is the evidence habit: production readiness stops being a feeling about the demo and becomes a set of artefacts a reviewer can inspect.

Ownership is what keeps the audit alive after launch week. Assign each row a named owner, store the evidence links with the service's runbook, and re-run the audit on a quarterly cadence or after any incident that touched the service. Rows that fail twice in a row indicate a platform gap rather than a service gap, and the fix belongs in the paved-road templates and admission policies every service inherits. That feedback loop is the difference between a checklist and a production culture: the audit findings harden the platform, so the next AI-generated service starts closer to ready by default.


Troubleshooting matrix: symptom to force to command

Classify the symptom by force before changing anything. Green dashboards with user errors point at observability design. Drain-time outages point at placement. Permission surprises point at identity. Unreproducible deploys point at supply chain. Expiry outages point at time, and silent cost growth points at accumulation.

bash
kubectl get pods -n production -o wide
kubectl get pdb -n production
kubectl describe deployment checkout-api -n production
kubectl auth can-i --list --as=system:serviceaccount:production:checkout-api
kubectl get pods -n production -o jsonpath='{range .items[*]}{.metadata.name}{" "}{.spec.containers[0].image}{"\n"}{end}'
kubectl apply --dry-run=server -f manifests/

Work the output in order. If replicas share a node, fix topology spread before scaling. If a service account holds verbs it never uses, scope the role before the next deploy. If running images differ across pods, pin digests and redeploy. If alerts stayed silent during user impact, rebuild them around error rate and latency with a runbook attached. Each check isolates one force, which keeps the fix proportional to the cause.

Frequently Asked Questions

Vibe DevOps vs Production DevOps: what is the difference?

Vibe DevOps optimises for the demo loop: generated infrastructure that applies, starts, and looks green. Production DevOps optimises for the failure loop: state survival, bounded blast radius, network physics under load, reproducible artifacts, and expiry management. The difference is verification against forces demos never apply.

Is AI-generated infrastructure safe to use in production?

Yes, when it passes the same gates as human-written infrastructure: schema validation against the target version, static analysis, admission policy, peer review, canary release, and tested rollback. Treat generated output as an untrusted draft, not as a finished change.

Why does AI-generated Kubernetes YAML fail in production?

Generated YAML reproduces tutorial patterns: missing resource requests, no probes, mutable image tags, root containers, stale API versions, and no disruption budgets or topology spread. It is syntactically valid and semantically incomplete, so failures appear under drains, bursts, and upgrades rather than at apply time.

What permissions should an AI agent have in production?

Read-only by default, with write access scoped per environment and destructive actions gated behind human approval. Every agent action should be logged with the plan that produced it. The permission architecture is the safety system, because the agent will eventually propose a plausible but destructive command.

What is a production readiness checklist?

A production readiness checklist is an evidence-based go-live review covering restore drills, credential scope, placement, timeouts, artifact identity, expiry inventory, symptom alerts, and tested rollback. Each item requires proof such as a drill result or dashboard link, and gaps become owned risks with dates.

How do I harden AI-generated Terraform?

Review every plan diff before apply, keep remote state with locking split by blast radius, replace wildcard policies with least-privilege roles, enable deletion protection on stateful resources, and gate destructive changes behind approval. Generated Terraform defaults to permissive settings, so the review is where production constraints enter.

Does vibe DevOps mean avoiding AI tools?

No. It means removing the gates, not using the tools. AI-assisted engineering with review, policy enforcement, and release evidence is production practice. The risk is unreviewed generation reaching production with demo-grade defaults.