# Kubernetes Misconfiguration

> Detects insecure Kubernetes pod and container configurations including privileged containers, hostPID, hostNetwork, and missing resource limits.

- Skill: `zakirkun/kubernetes-misconfiguration` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add zakirkun/kubernetes-misconfiguration`
- Raw SKILL.md: https://api.skillmd.com/api/skills/zakirkun/kubernetes-misconfiguration/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: zakirkun (https://skillmd.com/u/zakirkun)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/zakirkun/kubernetes-misconfiguration

---


# Kubernetes Misconfiguration

## Overview
Kubernetes misconfigurations can lead to cluster takeover and container escapes:
1. **`privileged: true`**: Pod container with root-level host access
2. **`hostPID: true`**: Pod shares host PID namespace — can see/kill host processes
3. **`hostNetwork: true`**: Pod uses host network, bypassing network policies
4. **`allowPrivilegeEscalation: true`**: Allows container processes to gain more privileges
5. **`runAsRoot: true` or no `runAsNonRoot`**: Container runs as root
6. **No resource limits**: Resource exhaustion DoS possible
7. **Wildcard RBAC permissions**: `resources: ["*"]` with `verbs: ["*"]`

## Remediation
- Use `securityContext` with `runAsNonRoot: true`, `allowPrivilegeEscalation: false`
- Apply `readOnlyRootFilesystem: true`
- Set resource requests and limits
- Follow principle of least privilege for RBAC

