containers-skill
Docker and Kubernetes - containerization, orchestration, and production deployment.
When & Why to Use This Skill
This Claude skill empowers developers and DevOps engineers to master containerization and orchestration using Docker and Kubernetes. It provides comprehensive support for building, deploying, debugging, and optimizing containerized applications, ensuring scalable, reliable, and secure cloud-native infrastructure management.
Use Cases
- Streamlining the containerization process by creating optimized, multi-stage Dockerfiles that reduce image size and enhance security.
- Orchestrating complex microservices deployments on Kubernetes clusters using best practices for Deployments, Services, and Ingress controllers.
- Rapidly diagnosing and resolving production-level container issues such as CrashLoopBackOff, ImagePullBackOff, and OOMKilled errors using structured troubleshooting checklists.
- Managing application configurations and sensitive credentials securely across environments using Kubernetes ConfigMaps and Secrets.
- Implementing robust health checks and resource management strategies to ensure high availability and efficient utilization of cloud resources.
| name | containers-skill |
|---|---|
| description | Docker and Kubernetes - containerization, orchestration, and production deployment. |
| sasmp_version | "1.3.0" |
| bonded_agent | 03-containers-orchestration |
| bond_type | PRIMARY_BOND |
| - name | operation |
| type | string |
| required | true |
| enum | ["build", "deploy", "debug", "optimize", "secure"] |
| default | "both" |
| strategy | exponential_backoff |
| initial_delay_ms | 1000 |
| max_retries | 3 |
| logging | structured |
| metrics | enabled |
Containers & Orchestration Skill
Overview
Master Docker and Kubernetes for production deployments.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| platform | string | No | both | docker/kubernetes |
| operation | string | Yes | - | Operation type |
Core Topics
MANDATORY
- Docker fundamentals (images, containers, volumes)
- Dockerfile best practices (multi-stage, security)
- Docker Compose
- Kubernetes architecture
- Deployments, Services, Ingress
- Health checks
OPTIONAL
- Helm charts
- ConfigMaps and Secrets
- Persistent storage
- Network policies
ADVANCED
- Custom operators
- Service mesh
- Multi-cluster strategies
Quick Reference
# Docker
docker build -t app:v1 .
docker run -d -p 8080:80 --name app app:v1
docker logs -f container
docker exec -it container sh
docker system prune -af
# Docker Compose
docker compose up -d
docker compose logs -f
docker compose down -v
# Kubernetes
kubectl get pods -A
kubectl describe pod pod-name
kubectl logs -f pod-name
kubectl exec -it pod-name -- sh
kubectl apply -f manifest.yaml
kubectl rollout status deployment/app
kubectl rollout undo deployment/app
# Debugging
kubectl get events --sort-by='.lastTimestamp'
kubectl top pods
kubectl run debug --rm -it --image=busybox -- sh
# Helm
helm install release chart
helm upgrade release chart
helm rollback release 1
Troubleshooting
Common Failures
| Symptom | Root Cause | Solution |
|---|---|---|
| ImagePullBackOff | Image not found | Verify name, check creds |
| CrashLoopBackOff | Container crashing | Check logs, verify CMD |
| Pending | Cannot schedule | Check resources, selectors |
| OOMKilled | Out of memory | Increase limits |
Debug Checklist
- Pod status:
kubectl get pods -o wide - Events:
kubectl describe pod - Logs:
kubectl logs pod --previous - Resources:
kubectl top pods
Recovery Procedures
CrashLoopBackOff
- Get logs:
kubectl logs pod --previous - Check events:
kubectl describe pod - Test locally:
docker run -it image sh