kubernetes-patterns

Provide Kubernetes production best practices for deployments, services, RBAC, and autoscaling.

364|53|Updated May 9, 2026
One-click install
npx skills add https://github.com/cosmicstack-labs/mercury-agent-skills --skill kubernetes-patterns-cosmicstack-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kubernetes-patterns
Source: https://github.com/cosmicstack-labs/mercury-agent-skills/tree/main/categories/devops/kubernetes-patterns
Command: npx skills add https://github.com/cosmicstack-labs/mercury-agent-skills --skill kubernetes-patterns-cosmicstack-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Kubernetes deployments often fail or degrade in production due to missing guardrails around scaling, security, reliability, and resource management.

Core Features & Use Cases

  • Production-ready cluster best practices: Establish safer defaults for workloads with requests/limits, quotas, and namespace policies.
  • Operational reliability patterns: Use readiness, liveness, and startup probes plus pod anti-affinity to improve availability and failover behavior.
  • Practical security and scaling guidance: Apply least-privilege RBAC and select appropriate autoscaling strategies (HPA/VPA/Cluster Autoscaler/KEDA) for real workloads.

Quick Start

Ask for a production Kubernetes checklist to design workloads, networking, RBAC, and autoscaling based on your app requirements.

Frequently Asked Questions about kubernetes-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure Kubernetes liveness and readiness probes for production workloads?

Kubernetes production deployments require readiness, liveness, and startup probes to improve availability and failover behavior. You can configure these probes alongside pod anti-affinity to ensure reliable workload operations and prevent traffic from routing to unready pods.

What's the best way to implement least-privilege RBAC in Kubernetes?

Implementing least-privilege RBAC in Kubernetes involves designing role bindings that restrict access to only necessary resources. This approach secures cluster networking and operations by applying production-grade safety guardrails around user and service account permissions.

How do I choose between Kubernetes autoscaling strategies like HPA, VPA, and KEDA?

Choosing Kubernetes autoscaling strategies depends on workload requirements: HPA for CPU/memory metrics, VPA for pod resource adjustments, Cluster Autoscaler for node scaling, and KEDA for event-driven needs. Selecting the appropriate controller ensures reliable scaling behavior.

How do I set Kubernetes resource requests and limits to prevent pod eviction?

Setting Kubernetes resource requests and limits establishes safer defaults for workloads by defining CPU and memory boundaries. Combined with namespace quotas and policies, these configurations prevent resource contention and ensure stable production cluster operations.

Does this Skill support configuring network policies and ingress for secure Kubernetes deployments?

This Skill supports configuring network policies and ingress to implement secure networking for Kubernetes clusters. It provides production best practices for designing reliable services and ingress controllers that manage traffic routing for both stateless and stateful workloads.

When should I use pod anti-affinity in Kubernetes deployments?

Pod anti-affinity should be used in Kubernetes deployments when you need to improve availability and failover behavior across nodes. It prevents multiple replicas of the same workload from scheduling on the same node, ensuring operational reliability during node failures.