# K8S Manifests

> Skill: Kubernetes Manifests & Helm

- Skill: `sawrus/k8s-manifests` (Agent Skill)
- Install (CLI): `npx skillmds@latest add sawrus/k8s-manifests`
- Raw SKILL.md: https://api.skillmd.com/api/skills/sawrus/k8s-manifests/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: sawrus (https://skillmd.com/u/sawrus)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/sawrus/k8s-manifests

---

# Skill: Kubernetes Manifests & Helm

## When to load

When writing K8s YAML, designing Helm charts, setting resource limits, configuring probes, or reviewing pod security.

## Production Deployment Template

```yaml
spec:
  replicas: {{ .Values.replicaCount }}  # Min 2 for Tier 1
  template:
    spec:
      securityContext:
        runAsNonRoot: true
        runAsUser: 1000
      terminationGracePeriodSeconds: 60
      containers:
        - name: api
          image: "{{ .Values.image.repository }}@{{ .Values.image.digest }}"
          resources:
            requests: { cpu: 100m, memory: 128Mi }
            limits:   { cpu: 500m, memory: 512Mi }
          readinessProbe:
            httpGet: { path: /health/ready, port: http }
            initialDelaySeconds: 10
            periodSeconds: 5
          livenessProbe:
            httpGet: { path: /health/live, port: http }
            initialDelaySeconds: 30
            periodSeconds: 15
      topologySpreadConstraints:
        - maxSkew: 1
          topologyKey: topology.kubernetes.io/zone
          whenUnsatisfiable: DoNotSchedule
```

## HPA

```yaml
spec:
  minReplicas: 2
  maxReplicas: 20
  metrics:
    - type: Resource
      resource: { name: cpu, target: { type: Utilization, averageUtilization: 70 } }
```

## PodDisruptionBudget (Required for Tier 1)

```yaml
spec:
  minAvailable: 1
  selector:
    matchLabels: {{ include "app.selectorLabels" . | nindent 6 }}
```

