kubernetes-ops

timequity's avatarfrom timequity

Kubernetes deployments, troubleshooting, and operational best practices.

⭐0stars🔀0forks📁View on GitHub🕐Updated Dec 18, 2025

When & Why to Use This Skill

This Claude skill serves as a comprehensive operational toolkit for Kubernetes management, designed to streamline containerized deployments and accelerate incident resolution. It provides standardized YAML templates for deployments and services, a curated set of kubectl troubleshooting commands, and Helm lifecycle management patterns. By integrating operational best practices, it helps DevOps engineers and SREs maintain high system availability and optimize resource allocation within cloud-native environments.

Use Cases

  • Scenario 1: Rapidly generating production-ready Kubernetes manifests with built-in health checks (liveness/readiness probes) and resource constraints.
  • Scenario 2: Debugging failed deployments by systematically checking pod logs, events, and resource usage to identify root causes like OOMKilled or ImagePullBackOff.
  • Scenario 3: Managing application versioning and rollbacks using Helm to ensure safe and predictable software delivery cycles.
  • Scenario 4: Implementing operational runbooks for junior engineers to perform safe cluster inspections and shell-level troubleshooting.
namekubernetes-ops
descriptionKubernetes deployments, troubleshooting, and operational best practices.

Kubernetes Ops

Deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  name: api
  labels:
    app: api
spec:
  replicas: 3
  selector:
    matchLabels:
      app: api
  template:
    metadata:
      labels:
        app: api
    spec:
      containers:
        - name: api
          image: myapp:v1.0.0
          ports:
            - containerPort: 8080
          resources:
            requests:
              memory: "128Mi"
              cpu: "100m"
            limits:
              memory: "256Mi"
              cpu: "200m"
          livenessProbe:
            httpGet:
              path: /health
              port: 8080
            initialDelaySeconds: 10
          readinessProbe:
            httpGet:
              path: /ready
              port: 8080

Service

apiVersion: v1
kind: Service
metadata:
  name: api
spec:
  selector:
    app: api
  ports:
    - port: 80
      targetPort: 8080
  type: ClusterIP

Troubleshooting

# Pod status
kubectl get pods -o wide
kubectl describe pod <name>

# Logs
kubectl logs <pod> -f
kubectl logs <pod> -c <container> --previous

# Shell access
kubectl exec -it <pod> -- /bin/sh

# Events
kubectl get events --sort-by='.lastTimestamp'

# Resource usage
kubectl top pods
kubectl top nodes

Common Issues

Symptom Check
ImagePullBackOff Image name, registry auth
CrashLoopBackOff Logs, resource limits
Pending Resources, node selector
OOMKilled Memory limits

Helm

# Install
helm install myapp ./chart -f values.yaml

# Upgrade
helm upgrade myapp ./chart -f values.yaml

# Rollback
helm rollback myapp 1