KubeShark: A Kubernetes Skill for Claude Code and Codex to Catch Hallucinated YAML

✍️ OpenClawRadar📅 Published: May 18, 2026🔗 Source
KubeShark: A Kubernetes Skill for Claude Code and Codex to Catch Hallucinated YAML
Ad

Lukas Niessen built KubeShark, a Kubernetes skill for Claude Code and Codex that tackles a specific problem: LLMs hallucinate when writing Kubernetes YAML. They generate deprecated API versions, forget security contexts, create Services selecting no pods, misconfigure probes, omit resource requests, and produce rollouts that look valid but fail under load. Kubernetes is unforgiving here — a wrong Service selector or broken liveness probe applies successfully but causes silent failures or pod restarts.

Failure-Mode-First Workflow

KubeShark is not a dump of best practices. Before generating any YAML, the agent must reason about what can go wrong across six failure domains:

  • Insecure workload defaults
  • Resource starvation
  • Network exposure
  • Privilege sprawl
  • Fragile rollouts
  • API drift

Only after that reasoning does it produce manifests, Helm charts, Kustomize overlays, RBAC, NetworkPolicies, or validation steps. The idea is to make operational details unavoidable rather than skipped.

Specific Mistakes It Catches

  • Service selector that does not match Deployment labels
  • Ingress using an API version removed in modern Kubernetes
  • Deployment running as root with no security context
  • Liveness probe checking an external database
  • ClusterRoleBinding where a RoleBinding would suffice
  • StatefulSet assuming PVCs disappear on scale-down
  • Helm template rendering valid YAML with wrong Kubernetes API
  • Kustomize patch silently targeting the wrong resource
Ad

Token-Efficient Architecture

KubeShark's main SKILL.md stays compact and procedural. Deeper knowledge lives in focused reference files loaded only when relevant — for example, probe guidance doesn't load RBAC rules, and Helm tasks don't load NetworkPolicy guidance. This prevents token waste and reduces the chance the agent mixes unrelated concepts.

The skill also supports platform-specific contexts via Conditional Reference Retrieval. It detects signals like IRSA, Karpenter, Azure Workload Identity, GKE Autopilot, OpenShift Routes, ApplicationSet, HelmRelease, ServiceMonitor, or OpenTelemetry Collector, then loads the matching reference. This gives EKS-aware, AKS-aware, GKE-aware, OpenShift-aware, GitOps-aware, or observability-aware manifest generation and review — only when the context is relevant.

Defaults lean toward security: Pod Security Standards, cross-resource consistency checks, label/selector/port alignment, deprecated API avoidance, and rollback guidance are built in.

Target Audience

Platform engineers, SREs, DevOps engineers, and anyone using Claude Code or Codex for Kubernetes work.

📖 Read the full source: r/openclaw

Ad

👀 See Also

CC-Wiki: Turn Claude Code Sessions into a Shareable Quartz Knowledge Base
Tools

CC-Wiki: Turn Claude Code Sessions into a Shareable Quartz Knowledge Base

CC-Wiki converts your ~/.claude session history into a Quartz-based knowledge base. One command installs it; running /cc-wiki inside a Claude Code session packages the conversation.

OpenClawRadar
Dev-Card: A Claude Code Skill That Generates Developer Identity Cards from Git History
Tools

Dev-Card: A Claude Code Skill That Generates Developer Identity Cards from Git History

Dev-Card is a Claude Code skill that analyzes git repositories to generate shareable Developer Identity Cards, assigning one of 11 developer archetypes based on commit timing, language breakdown, commit message patterns, and commit size distribution.

OpenClawRadar
AGENTS-COLLECTION: 129 Claude Code Agents Organized in One Repository
Tools

AGENTS-COLLECTION: 129 Claude Code Agents Organized in One Repository

A developer has compiled 129 Claude Code agents into a single repository in ~/.claude/agents/ format, ready for installation with a simple copy command. The collection includes the full agency-agents system with 68 personality-driven agents across multiple disciplines, plus additional agents for multi-agent team workflows.

OpenClawRadar
Team Memory MCP: Open Source Shared Memory for Claude Code with Bayesian Confidence Scoring
Tools

Team Memory MCP: Open Source Shared Memory for Claude Code with Bayesian Confidence Scoring

Team Memory MCP is an open source tool that provides shared team memory for Claude Code with Bayesian confidence scoring. It uses a Beta-Bernoulli model to rank patterns, includes temporal decay with 90-day half-life, and can be added to Claude Code with a single command.

OpenClawRadar