mcpbeat

Kubernetes Patterns

cosmicstack-labs/kubernetes-patterns

Pods, deployments, services, ingress, RBAC, autoscaling, and production cluster best practices

429 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
365
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/cosmicstack-labs/mercury-agent-skills --skill kubernetes-patterns

The instruction itself

10 sections, as written by the author

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.)

How to use it

Copy the folder

Take cosmicstack-labs/kubernetes-patterns from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.