name: kubernetes description: "Provides comprehensive guidance for Kubernetes including pods, services, deployments, ingress, ConfigMaps, and cluster management. Use when the user asks about Kubernetes, needs to deploy applications, configure resources, or troubleshoot cluster issues."
Use this skill whenever the user wants to:
kubectl apply -f to deploy# deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp
spec:
replicas: 3
selector:
matchLabels:
app: myapp
template:
metadata:
labels:
app: myapp
spec:
containers:
- name: myapp
image: myapp:1.0.0
ports:
- containerPort: 8080
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 256Mi
livenessProbe:
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 10
readinessProbe:
httpGet:
path: /ready
port: 8080
---
apiVersion: v1
kind: Service
metadata:
name: myapp
spec:
selector:
app: myapp
ports:
- port: 80
targetPort: 8080
type: ClusterIP
# Apply manifests
kubectl apply -f deployment.yaml
# Check rollout status
kubectl rollout status deployment/myapp
# View pod logs
kubectl logs -l app=myapp --tail=50
# Exec into a pod for debugging
kubectl exec -it deployment/myapp -- /bin/sh
| Command | Purpose |
|---|---|
kubectl apply -f <file> |
Create or update resources |
kubectl get pods -w |
Watch pod status |
kubectl describe pod <name> |
Inspect pod details and events |
kubectl logs <pod> -f |
Stream container logs |
kubectl rollout undo deployment/<name> |
Roll back a deployment |
kubectl scale deployment/<name> --replicas=5 |
Scale replicas |
requests and limits for CPU and memorylivenessProbe and readinessProbe for every containermaxSurge and maxUnavailablekubectl logs <pod> --previous to see crash output; check resource limits and probe configurationkubectl describe pod <name> — look for insufficient resources or unschedulable nodeskubectl get endpoints <svc>kubernetes, k8s, kubectl, deployment, pod, service, ingress, configmap, secret, container orchestration