Skip to content
Kubernetes Platform Engineering logo

Kubernetes Platform Engineering

Production Kubernetes platform patterns covering cluster architecture, security, GitOps, observability, autoscaling, and operational guardrails

SKILL.md

Full skill instructions

Kubernetes Platform Engineering

Overview

Platform engineering on Kubernetes is about making the “golden path” easy: secure-by-default workloads, consistent delivery via GitOps, and predictable operations (capacity, upgrades, incident response).

Why This Matters

  • Reliability: self-healing + controlled rollouts reduce incidents
  • Security: least privilege and isolation by default
  • Developer velocity: standard templates + paved roads
  • Cost control: right-sizing and autoscaling without surprises

Core Concepts

1. Cluster Architecture

  • Separate node pools by workload class (stateless, stateful, GPU, batch, system).
  • Define upgrade strategy (surge capacity, maintenance windows, version skew policy).
  • Decide multi-cluster approach (per env/​region/​tenant) and shared services (ingress, monitoring, secrets).

2. Workload Patterns

  • Deployment for stateless services; use PodDisruptionBudget, readinessProbe, and topologySpreadConstraints.
  • StatefulSet for stable identity/​storage (databases, queues) with explicit backup/​restore.
  • Job/​CronJob for batch; enforce concurrency policies and deadlines.
  • DaemonSet for node-level agents (logging, CNI, security).

3. Networking

  • Use Ingress/​Gateway with TLS termination and standardized auth/​rate limiting at the edge.
  • Apply NetworkPolicies (default-deny + explicit allow) for zero-trust inside the cluster.
  • Consider service mesh only when you need it (mTLS, traffic shifting, retries, L7 telemetry); keep complexity intentional.

4. Storage

  • Standardize StorageClass per tier (fast SSD, standard, archival) and backup policies.
  • For stateful apps: set anti-affinity/​zone spread; verify recovery time objectives (RTO/​RPO).
  • Avoid “pet” PVs by having a documented restore path and regular restore drills.

5. Security Baseline

  • Enforce Pod Security (restricted baseline): non-root, read-only root filesystem, drop capabilities.
  • RBAC least privilege: namespace-scoped roles, separate human vs automation identities.
  • Secrets: prefer external secret managers (e.g., External Secrets + AWS/​GCP/​Azure secret store); avoid long-lived static secrets in Git.
  • Admission policies: Kyverno / Gatekeeper for guardrails (image registries, resource limits, required labels).

6. Observability & Ops

  • Metrics: Prometheus + dashboards per service (latency, errors, saturation, restarts).
  • Logs: structured JSON with trace IDs; centralized retention policies.
  • Traces: OpenTelemetry for request graphs across services.
  • SLOs: define error budgets and link alerts to user impact.

7. GitOps & Delivery

  • Git is source of truth: Argo CD / Flux reconciles desired state.
  • Use Helm/​Kustomize overlays per environment; keep secrets out-of-band.
  • Progressive delivery: canary/​blue-green via Argo Rollouts / Flagger (or mesh-based traffic shifting).

8. Cost & Capacity Management

  • Require resource requests/​limits; use VPA recommendations carefully (watch for restarts).
  • Use HPA/​KEDA for demand-based scaling; use cluster autoscaler/​Karpenter for nodes.
  • Separate spot/​preemptible pools for tolerant workloads; enforce pod placement policies.

Quick Start (Minimal “Production-ish” Deployment)

apiVersion: apps/​v1
kind: Deployment
metadata:
  name: app
spec:
  replicas: 2
  strategy:
    type: RollingUpdate
    rollingUpdate: { maxUnavailable: 0, maxSurge: 1 }
  selector: { matchLabels: { app: app } }
  template:
    metadata: { labels: { app: app } }
    spec:
      securityContext: { runAsNonRoot: true }
      containers:
        - name: app
          image: your-registry/​app:1.0.0
          ports: [{ containerPort: 3000 }]
          resources:
            requests: { cpu: "100m", memory: "256Mi" }
            limits: { cpu: "500m", memory: "512Mi" }
          readinessProbe:
            httpGet: { path: /​readyz, port: 3000 }
            initialDelaySeconds: 5
          livenessProbe:
            httpGet: { path: /​healthz, port: 3000 }
            initialDelaySeconds: 10
---
apiVersion: policy/​v1
kind: PodDisruptionBudget
metadata:
  name: app
spec:
  minAvailable: 1
  selector: { matchLabels: { app: app } }

Production Checklist

  • Requests/​limits set; namespaces have LimitRange/ResourceQuota
  • readinessProbe + livenessProbe + graceful shutdown configured
  • PDB + topology spread/​anti-affinity to survive node/​zone events
  • NetworkPolicies enforce default-deny and least access
  • RBAC least privilege; service accounts scoped per app
  • Metrics/​logs/​traces exported; alerts tied to SLOs
  • Backup/​restore drills for stateful components
  • Upgrade playbook exists (cluster + addons + workload compatibility)

Tools & Libraries

ToolPurpose
Argo CD / FluxGitOps continuous delivery
Helm / KustomizePackaging and environment overlays
Prometheus + GrafanaMetrics + dashboards
Loki/​ELKCentral logging
OpenTelemetryDistributed tracing
External SecretsSecret manager integration
Kyverno / GatekeeperPolicy enforcement

Anti-patterns

  1. No requests/​limits: unpredictable scheduling and noisy-neighbor incidents
  2. Hand-applied changes: kubectl apply drift instead of GitOps reconciliation
  3. Flat network: no NetworkPolicies; lateral movement is trivial
  4. Single replica: planned/​unplanned disruption becomes downtime

Real-World Examples

Example: Progressive Delivery (Canary)

  • Deploy new version at 5% traffic; watch SLOs; ramp to 25/​50/​100%; auto-rollback on regressions.

Example: Autoscaling

  • HPA on CPU/​requests-per-second + cluster autoscaler for nodes; cap max replicas to protect dependencies.

Example: Zero-Trust Networking

  • Default-deny in each namespace; only allow traffic from ingress controller to app and app to explicit dependencies.

Common Mistakes

  1. Missing readiness probes (traffic hits pods before they’re ready)
  2. Running containers as root (wider blast radius on compromise)
  3. Unbounded egress (data exfiltration paths and surprise costs)
  4. Treating the cluster as the product (no SLOs, no runbooks, no ownership)

Integration Points

  • CI (image build, SBOM, scanning, signing)
  • CD (GitOps reconciler + progressive delivery)
  • Cloud provider (EKS/​GKE/​AKS, IAM, load balancers, DNS)
  • Observability + incident management (paging, runbooks, postmortems)

Further Reading

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View