# Jdiegosierra Enterprise Agent Plugins Kubernetes

> Kubernetes Best Practices

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

---


# Kubernetes Best Practices

## Workload configuration

### Pod resource management
- Always set resource requests AND limits
- Use `resources.requests` for scheduling, `resources.limits` for throttling
- Start conservative and tune based on metrics

```yaml
resources:
  requests:
    cpu: 100m
    memory: 128Mi
  limits:
    cpu: 500m
    memory: 512Mi
```

### Health checks
- **livenessProbe** — restart if unhealthy (use for deadlock detection)
- **readinessProbe** — remove from service if not ready (use for startup/dependency checks)
- **startupProbe** — delay liveness checks during startup (use for slow-starting apps)

### Pod disruption budgets
- Always define PDBs for production workloads
- `minAvailable: 1` or `maxUnavailable: 1` for small deployments

## Troubleshooting

### Pod not starting
1. `kubectl describe pod <name>` — check Events section
2. `kubectl logs <name> --previous` — check crash logs
3. Common causes: image pull errors, resource limits, missing secrets

### Service not reachable
1. `kubectl get endpoints <service>` — verify endpoints exist
2. `kubectl get pods -l <selector>` — check pod readiness
3. `kubectl exec -it <pod> -- curl localhost:<port>/health` — test from inside

### OOMKilled
1. Check `kubectl describe pod` for last termination reason
2. Increase memory limits
3. Profile the application for memory leaks

## Security

- Use NetworkPolicies to restrict pod-to-pod traffic
- Never run containers as root — use `securityContext.runAsNonRoot: true`
- Use ServiceAccounts with minimal RBAC permissions
- Scan images for vulnerabilities before deploying

---
> Source: [jdiegosierra/enterprise-agent-plugins](https://github.com/jdiegosierra/enterprise-agent-plugins) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-06-15 -->

