kubernetes-patterns
- Repo stars 0
- Author repo skills-registry
Kubernetes Patterns
Deploy and manage production Kubernetes clusters.
Core Objects
Workloads
| Object | Use Case | Scaling |
|---|---|---|
| Deployment | Stateless apps | Replicas, HPA |
| StatefulSet | Stateful apps (DBs) | Stable network IDs |
| DaemonSet | Per-node agents (logging, monitoring) | Node count |
| Job/CronJob | Batch tasks, scheduled jobs | Completion |
Networking
- Service: Stable endpoint for pods (ClusterIP, NodePort, LoadBalancer)
- Ingress: HTTP routing, TLS termination, path-based routing
- Network Policies: Pod-level firewall rules
Production Best Practices
Resource Management
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 256Mi
- Always set requests AND limits
- Use LimitRange for namespace defaults
- Use ResourceQuota for namespace caps
Pod Anti-Affinity
Spread pods across nodes for HA.
Readiness & Liveness Probes
- Readiness: traffic starts flowing
- Liveness: pod gets restarted
- Startup: for slow-starting containers
RBAC
- Least-privilege service accounts per app
- Namespace-scoped roles (not cluster-wide)
- Regularly audit permissions
- Use groups, not individual users
Autoscaling
- HPA: scale by CPU/memory or custom metrics
- VPA: adjust resource requests automatically
- Cluster Autoscaler: add/remove nodes
- KEDA: event-driven scaling (SQS queue depth, etc.)
<!-- tomevault:4.0:skill_md:2026-05-22 -->Source: cosmicstack-labs/mercury-agent-skills — distributed by TomeVault.
- Fluxly category
- DevOps
- Author-declared agents
- No explicit declaration found; this is not inferred or tested compatibility
- Static check
- 88 / 100 · heuristic scan, not runtime safety proof
- Author / version / license
- @tomevault-io · no license declared
- Fluxly token estimate
- Lean
- Fluxly setup estimate
- Plug-and-play
- External API key
- No requirement detected
- Detected OS requirements
- macOS · Linux · Windows
- Runtime requirements
- Node.js
- Detected file/system behavior
-
- Read-only
- Detected network behavior
- Local-only
- Install commands
- None (reference only)
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
The current SKILL.md does not define a fixed output example. Core Objects
Object · Use Case · Scaling Deployment · Stateless apps · Replicas, HPA StatefulSet · Stateful apps (DBs) · Stable network IDs
Service: Stable endpoint for pods (ClusterIP, NodePort, LoadBalancer) Ingress: HTTP routing, TLS termination, path-based routing Network Policies: Pod-level firewall rules
Production Best Practices
Always set requests AND limits Use LimitRange for namespace defaults Use ResourceQuota for namespace caps
Spread pods across nodes for HA.
# Kubernetes Patterns
Deploy and manage production Kubernetes clusters.
## Core Objects
### Workloads
| Object | Use Case | Scaling |
|--------|----------|---------|
| Deployment | Stateless apps | Replicas, HPA |
| StatefulSet | Stateful apps (DBs) | Stable network IDs |
| DaemonSet | Per-node agents (logging, monitoring) | Node count |
| Job/CronJob | Batch tasks, scheduled jobs | Completion |
### Networking
- **Service**: Stable endpoint for pods (ClusterIP, NodePort, LoadBalancer)
- **Ingress**: HTTP routing, TLS termination, path-based routing
- **Network Policies**: Pod-level firewall rules
## Production Best Practices
### Resource Management
```yaml
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 256Mi
```
- Always set requests AND limits
- Use LimitRange for namespace defaults
- Use ResourceQuota for namespace caps
### Pod Anti-Affinity
Spread pods across nodes for HA.
### Readiness & Liveness Probes
- Readiness: traffic starts flowing
- Liveness: pod gets restarted
- Startup: for slow-starting containers
## RBAC
- Least-privilege service accounts per app
- Namespace-scoped roles (not cluster-wide)
- Regularly audit permissions
- Use groups, not individual users
## Autoscaling
- HPA: scale by CPU/memory or custom metrics
- VPA: adjust resource requests automatically
- Cluster Autoscaler: add/remove nodes
- KEDA: event-driven scaling (SQS queue depth, etc.)
---
> Source: [cosmicstack-labs/mercury-agent-skills](https://github.com/cosmicstack-labs/mercury-agent-skills) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-05-22 --> Author text anchors workflow facts; Fluxly only indexes current sections, terms, files, and commands.
sections -> Core Objects → Workloads → Networking → Production Best Practices → Resource Management → Pod Anti-Affinity
terms -> Service · Ingress · Network Policies · Deploy and manage production Kubernetes clusters.
files/cmd -> Job/CronJob · CPU/memory · add/remove · cosmicstack-labs/mercury-agent-skills · github.com/cosmicstack-labs/mercury-agent-skills
body sha256 -> dee085d8483f
Decide Fit First
Design Intent
How To Use It
Boundaries And Review