cloud-native-kubernetes-patterns

cloud-native-kubernetes-patterns is a skill for Claude Code, Codex from j4flmao/agent-skills. It costs 161 tokens per session (2,027 once invoked), scanned A, original, MIT.

A guide to advanced Kubernetes design patterns, including sidecars, traffic proxies, custom controllers, admission webhooks, and scheduling rules. It also covers ways to keep workloads available during disruptions.

In plain words
What is it for?
Use it to design sidecar and ambassador containers, Operators, admission webhooks, disruption budgets, taints, tolerations, and affinity rules.
Why use it?
It helps solve deployment problems involving resilience, workload placement, cluster changes, and communication between containers.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to design sidecar and ambassador containers, Operators, admission webhooks, disruption budgets, taints, tolerations, and affinity rules.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/j4flmao/agent-skills/kubernetes-patterns
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add j4flmao/agent-skills --skill kubernetes-patterns
Clone the repo
git clone --depth 1 https://github.com/j4flmao/agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cloud-native-kubernetes-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/j4flmao/agent-skills/kubernetes-patterns/github.svg)](https://agentmods.dev/skills/j4flmao/agent-skills/kubernetes-patterns)
Your own site
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/kubernetes-patterns"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/kubernetes-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cloud-native-kubernetes-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/j4flmao/agent-skills/kubernetes-patterns"><img src="https://agentmods.dev/badge/skills/j4flmao/agent-skills/kubernetes-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 161 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,027 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00161 $0.02027
Opus 5.5 $0.00064 $0.00811
Sonnet 5.5 $0.00032 $0.00405
Haiku 4.5 $0.00016 $0.00203

Measured 4d ago against content hash 08b005d4e1ba, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cloud-native-kubernetes-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/cloud-native/kubernetes-patterns/SKILL.md · 182 lines

How it starts

The opening of the file, as written. The whole thing — 182 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Kubernetes Workload Patterns

Purpose

Design pods and their placement so workloads survive node drains, zone failures, and rollouts with zero dropped requests. Uses current stable APIs: native sidecar containers, policy/v1 PodDisruptionBudgets, topology spread constraints, and CEL-based ValidatingAdmissionPolicy.

Agent Protocol

Trigger

"k8s patterns", "sidecar", "native sidecar", "ambassador", "PDB", "topology spread", "anti-affinity", "taints", "graceful shutdown", "admission webhook", "ValidatingAdmissionPolicy".

Input Context

  • Workload type (stateless API, worker, stateful), replica count, zones.
  • Cluster version (native sidecars need ≥ 1.29 default-on; GA in 1.33).
  • Policies the platform must enforce.

Output Artifact

Annotated manifests. No file unless requested.

Response Format

Pattern: {name} — why
Manifest: {YAML}
Failure mode covered: {node drain|zone loss|rollout|bad config}

Completion Criteria

  • Replicas spread across zones and nodes.
  • PDB allows at least one eviction (otherwise drains block).
  • Graceful shutdown timing consistent: preStop + app drain < terminationGracePeriodSeconds.

Structural Patterns

Pattern Use Implementation
Init container One-shot setup before app starts (migrations check, config render) initContainers (run to completion, in order)
Sidecar Helper running alongside app for pod lifetime (proxy, log shipper, OTel agent) Native sidecar: init container with restartPolicy: Always — starts before app, stays up, stopped after app, doesn't block Job completion
Ambassador Sidecar proxying outbound calls (retries, mTLS, connection pooling) Envoy/Cloud SQL Auth Proxy as native sidecar
Adapter Normalizes app output (metrics format, logs) Exporter sidecar
spec:
  initContainers:
    - name: cloud-sql-proxy
      image: gcr.io/cloud-sql-connectors/cloud-sql-proxy:2.14.1
      restartPolicy: Always            # native sidecar
      args: ["--port=5432", "my-project:europe-west1:orders-db"]
      startupProbe:
        tcpSocket: { port: 5432 }
      resources:
        requests: { cpu: 50m, memory: 64Mi }
  containers:
    - name: app
      image: registry.example.com/orders:1.12.0

Read the full file on GitHub · 182 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago Changed · +154 lines · +161 tokens per session 08b005d4e1ba
  2. 1mo ago First seen · 28 lines · 0 tokens per session scan A da1098c2bc74

Subscribe to this mod's changes

cloud-native-kubernetes-patterns is a skill published in the GitHub repository j4flmao/agent-skills (36 stars, last pushed 4d ago), licensed MIT. It adds 161 tokens to every session and 2,027 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

openpitrix

KubeSphere OpenPitrix application management Skill. Use when users ask about KubeSphere App Store, OpenPitrix, Helm/YAML application templates, application repositories, app versions, app releases, categories, review states, repository sync, or troubleshooting application installation and upgrade issues.

kubesphere/kubesphere · 60 tokens

whizard-notification

Use when working with WizTelemetry Notification extension for KubeSphere, including installation, configuration, troubleshooting, notification channel setup, alert routing, and silence management.

kubesphere/kubesphere · 36 tokens

whizard-telemetry-ruler

Use when working with WizTelemetry Ruler extension for KubeSphere, including installation, configuration, alerting rules management.

kubesphere/kubesphere · 31 tokens

kubesphere-openkruise

KubeSphere OpenKruise management Skill. Use when user asks to install or enable OpenKruise, check OpenKruise status, view kruise pods/logs/CRDs, create or update SidecarSet, manage sidecar injection, create or update CloneSet, perform in-place update or batch rollout, uninstall or remove OpenKruise, or troubleshoot…

kubesphere/kubesphere · 99 tokens

kubesphere-volcano

KubeSphere Volcano job management Skill. Use when user asks to create, list, update, delete Jobs (Volcano Jobs), manage Queues, create PyTorch/TensorFlow/MPI training jobs, or troubleshoot Volcano scheduling issues in KubeSphere. Includes built-in YAML templates, scheduling policy recommendations, and best practices…

kubesphere/kubesphere · 85 tokens

kubeeye

Use when deploying KubeEye for cluster inspection, creating InspectRule/InspectPlan resources, or retrieving inspection results. Covers InstallPlan-based deployment, OPA/PromQL/FileChange/Sysctl/Systemd/NodeInfo/FileFilter/ServiceConnect/CustomCommand rule types, and report retrieval. Always consult this skill when…

kubesphere/kubesphere · 88 tokens