[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M73C33FRMY1TS3JDACWT0V58":3,"skill-same:01M73C33FRMY1TS3JDACWT0V58":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M73C33FRMY1TS3JDACWT0V58","setup-local-kubernetes",null,"Set up a local Kubernetes development environment using kind, k3d, or minikube for fast inner-loop development. Covers cluster creation, ingress configuration, local registry setup, and integration with development tools like Skaffold and Tilt for automatic rebuild and redeploy workflows. Use when needing a local Kubernetes environment for development, testing manifests or Helm charts before production deployment, wanting fast automatic rebuild-and-redeploy cycles, or learning Kubernetes without cloud costs.","roohe\u002Fagentic-super-skills","roohe","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99054084?v=4","01M734WCDFP6RZVT5CNM00QR26","01M734WCE4BD0T4NZS5PCV9V5F",10,"MIT","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fsetup-local-kubernetes\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: setup-local-kubernetes\nlocale: caveman-lite\nsource_locale: en\nsource_commit: 82c77053\ntranslator: \"Julius Brussee homage — caveman\"\ntranslation_date: \"2026-04-19\"\ndescription: >\n  Set up a local Kubernetes development environment using kind, k3d, or minikube for fast\n  inner-loop development. Covers cluster creation, ingress configuration, local registry\n  setup, and integration with development tools like Skaffold and Tilt for automatic\n  rebuild and redeploy workflows. Use when needing a local Kubernetes environment for\n  development, testing manifests or Helm charts before production deployment, wanting fast\n  automatic rebuild-and-redeploy cycles, or learning Kubernetes without cloud costs.\nlicense: MIT\nallowed-tools: Read Write Edit Bash Grep Glob\nmetadata:\n  author: Philipp Thoss\n  version: \"1.0\"\n  domain: devops\n  complexity: basic\n  language: multi\n  tags: kind, k3d, minikube, local-development, skaffold, tilt, docker, kubernetes\n---\n\n# Setup Local Kubernetes\n\nCreate a local Kubernetes development environment for fast iteration and testing.\n\n## When to Use\n\n- Need local Kubernetes environment for application development\n- Want to test Kubernetes manifests and Helm charts before deploying to production\n- Require fast inner-loop development with automatic rebuild and redeploy\n- Testing multi-service applications with service dependencies\n- Learning Kubernetes without cloud costs\n- CI\u002FCD pipeline testing locally before pushing changes\n- Need isolated environment for experimentation and debugging\n\n## Inputs\n\n- **Required**: Docker Desktop or Docker Engine installed\n- **Required**: At least 4GB RAM available for cluster\n- **Required**: Choice of local cluster tool (kind, k3d, or minikube)\n- **Optional**: Application source code to deploy\n- **Optional**: Kubernetes version preference\n- **Optional**: Development tool preference (Skaffold, Tilt, or manual)\n- **Optional**: Number of worker nodes needed\n\n## Procedure\n\n> See [Extended Examples](references\u002FEXAMPLES.md) for complete configuration files and templates.\n\n### Step 1: Install Local Kubernetes Cluster Tool\n\nChoose and install kind, k3d, or minikube based on your requirements.\n\n**Install kind (Kubernetes in Docker):**\n```bash\n# Linux example\ncurl -Lo .\u002Fkind https:\u002F\u002Fkind.sigs.k8s.io\u002Fdl\u002Fv0.20.0\u002Fkind-linux-amd64\nchmod +x .\u002Fkind\nsudo mv .\u002Fkind \u002Fusr\u002Flocal\u002Fbin\u002Fkind\n\n# Verify installation\nkind version\n```\n\n**Install k3d (k3s in Docker):**\n```bash\n# Linux\u002FmacOS\ncurl -s https:\u002F\u002Fraw.githubusercontent.com\u002Fk3d-io\u002Fk3d\u002Fmain\u002Finstall.sh | bash\n\n# Verify installation\nk3d version\n```\n\n**Install minikube:**\n```bash\n# Linux example\ncurl -LO https:\u002F\u002Fstorage.googleapis.com\u002Fminikube\u002Freleases\u002Flatest\u002Fminikube-linux-amd64\nsudo install minikube-linux-amd64 \u002Fusr\u002Flocal\u002Fbin\u002Fminikube\n\n# Verify installation\nminikube version\n```\n\nInstall kubectl if not already present:\n```bash\n# Linux example\ncurl -LO \"https:\u002F\u002Fdl.k8s.io\u002Frelease\u002F$(curl -L -s https:\u002F\u002Fdl.k8s.io\u002Frelease\u002Fstable.txt)\u002Fbin\u002Flinux\u002Famd64\u002Fkubectl\"\nchmod +x kubectl\nsudo mv kubectl \u002Fusr\u002Flocal\u002Fbin\u002F\nkubectl version --client\n```\n\n> See references\u002FEXAMPLES.md for macOS and Windows installation commands.\n\n**Expected:** Tool binary installed and in PATH. Version command returns expected version. kubectl available for cluster interaction.\n\n**On failure:**\n- Ensure Docker is running: `docker ps`\n- Check system PATH includes installation directory\n- For permission issues, verify sudo\u002Fadmin rights\n- On macOS, may need to allow binary in Security & Privacy settings\n- Windows users: ensure running terminal as Administrator\n\n### Step 2: Create Local Cluster with Configuration\n\nCreate a multi-node cluster with ingress and local registry support.\n\n**Create kind cluster:**\n```yaml\n# kind-config.yaml (abbreviated)\nkind: Cluster\napiVersion: kind.x-k8s.io\u002Fv1alpha4\nname: dev-cluster\nlocale: caveman-lite\nsource_locale: en\nsource_commit: 82c77053\ntranslator: \"Julius Brussee homage — caveman\"\ntranslation_date: \"2026-04-19\"\nnodes:\n- role: control-plane\n  extraPortMappings:\n  - containerPort: 80\n    hostPort: 80\n  - containerPort: 443\n    hostPort: 443\n- role: worker\n- role: worker\n```\n\n```bash\n# Create cluster\nkind create cluster --config kind-config.yaml\n\n# Install ingress-nginx\nkubectl apply -f https:\u002F\u002Fraw.githubusercontent.com\u002Fkubernetes\u002Fingress-nginx\u002Fmain\u002Fdeploy\u002Fstatic\u002Fprovider\u002Fkind\u002Fdeploy.yaml\n\n# Create local registry\ndocker run -d --restart=always -p 5000:5000 --name kind-registry registry:2\ndocker network connect kind kind-registry\n```\n\n> See references\u002FEXAMPLES.md for complete kind-config.yaml with registry mirrors and ingress configuration.\n\n**Create k3d cluster:**\n```bash\n# Create cluster with ingress and registry\nk3d cluster create dev-cluster \\\n  --port \"80:80@loadbalancer\" \\\n  --port \"443:443@loadbalancer\" \\\n  --agents 2 \\\n  --registry-create k3d-registry:5000\n```\n\n**Create minikube cluster:**\n```bash\n# Create cluster with multiple nodes\nminikube start \\\n  --nodes=3 \\\n  --cpus=2 \\\n  --memory=4096 \\\n  --driver=docker \\\n  --addons=ingress,registry,metrics-server\n```\n\nTest cluster:\n```bash\n# Deploy test application\nkubectl create deployment hello --image=k8s.gcr.io\u002Fechoserver:1.4\nkubectl expose deployment hello --type=NodePort --port=8080\nkubectl port-forward service\u002Fhello 8080:8080\n\n# Clean up test\nkubectl delete deployment,service hello\n```\n\n**Expected:** Multi-node cluster running with control plane and worker nodes. Ingress controller installed and ready. Local registry accessible at localhost:5000. kubectl context set to new cluster. Test deployment successful.\n\n**On failure:**\n- Check Docker has sufficient resources (4GB+ memory recommended)\n- Verify no port conflicts: `lsof -i :80,443,5000,6550`\n- For kind: ensure Docker desktop Kubernetes is disabled (conflicts)\n- For k3d: check Docker network connectivity\n- For minikube: try different driver (virtualbox, hyperv, kvm2)\n- Review cluster creation logs: `kind get clusters`, `k3d cluster list`, `minikube logs`\n\n### Step 3: Configure Development Workflow Tools\n\nSet up Skaffold or Tilt for automated rebuild and redeploy.\n\n**Install Skaffold:**\n```bash\n# Linux example\ncurl -Lo skaffold https:\u002F\u002Fstorage.googleapis.com\u002Fskaffold\u002Freleases\u002Flatest\u002Fskaffold-linux-amd64\nchmod +x skaffold\nsudo mv skaffold \u002Fusr\u002Flocal\u002Fbin\nskaffold version\n```\n\n**Create Skaffold configuration:**\n```yaml\n# skaffold.yaml (abbreviated)\napiVersion: skaffold\u002Fv4beta7\nkind: Config\nmetadata:\n  name: my-app\nbuild:\n# ... (see EXAMPLES.md for complete configuration)\n```\n\n> See references\u002FEXAMPLES.md for complete skaffold.yaml with profiles, file sync, and port forwarding.\n\n**Install Tilt:**\n```bash\n# Linux\u002FmacOS\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Ftilt-dev\u002Ftilt\u002Fmaster\u002Fscripts\u002Finstall.sh | bash\ntilt version\n```\n\n**Create Tiltfile:**\n```python\n# Tiltfile (abbreviated)\nallow_k8s_contexts('kind-dev-cluster')\n\ndocker_build(\n  'localhost:5000\u002Fmy-app',\n  '.',\n  live_update=[\n    sync('.\u002Fsrc', '\u002Fapp\u002Fsrc'),\n  ]\n)\n\nk8s_yaml(['k8s\u002Fdeployment.yaml', 'k8s\u002Fservice.yaml'])\nk8s_resource('my-app', port_forwards='8080:8080')\n```\n\n> See references\u002FEXAMPLES.md for complete Tiltfile with live updates, Helm charts, and custom buttons.\n\nCreate sample Kubernetes manifests:\n```yaml\n# k8s\u002Fdeployment.yaml (abbreviated)\napiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: my-app\nspec:\n  replicas: 1\n  template:\n    spec:\n      containers:\n      - name: app\n        image: localhost:5000\u002Fmy-app\n        ports:\n        - containerPort: 8080\n```\n\n> See references\u002FEXAMPLES.md for complete manifests with service, ingress, and resource limits.\n\nTest development workflow:\n```bash\n# Using Skaffold\nskaffold dev --port-forward\n\n# Using Tilt\ntilt up\n\n# Add entry to \u002Fetc\u002Fhosts for ingress\necho \"127.0.0.1 my-app.local\" | sudo tee -a \u002Fetc\u002Fhosts\ncurl http:\u002F\u002Fmy-app.local\n```\n\n**Expected:** Skaffold or Tilt watching for file changes. Code changes trigger automatic rebuild and redeploy. Hot reload working for supported languages. Port forwarding allows local access. Logs streaming in terminal\u002FUI. Build caching makes rebuilds fast.\n\n**On failure:**\n- Verify Docker daemon accessible: `docker ps`\n- Check if local registry reachable: `curl http:\u002F\u002Flocalhost:5000\u002Fv2\u002F_catalog`\n- For file sync issues, ensure paths in config match actual structure\n- Review Skaffold\u002FTilt logs for build errors\n- Ensure Dockerfile has proper base image and builds successfully: `docker build .`\n- Check resource limits not causing OOMKills: `kubectl describe pod -l app=my-app`\n\n### Step 4: Set Up Local Storage and Databases\n\nConfigure persistent storage and deploy database services for testing.\n\n**Create local storage class:**\n```yaml\n# local-storage.yaml (abbreviated)\napiVersion: storage.k8s.io\u002Fv1\nkind: StorageClass\nmetadata:\n  name: local-path\nprovisioner: rancher.io\u002Flocal-path\n# ... (see EXAMPLES.md for complete configuration)\n```\n\n> See references\u002FEXAMPLES.md for complete storage configuration with PVC templates.\n\n**Deploy PostgreSQL for development:**\n```yaml\n# postgres-dev.yaml (abbreviated)\napiVersion: apps\u002Fv1\nkind: StatefulSet\nmetadata:\n  name: postgres\nspec:\n  serviceName: postgres\n  template:\n    spec:\n      containers:\n      - name: postgres\n        image: postgres:15-alpine\n        envFrom:\n        - secretRef:\n            name: postgres-secret\n```\n\n> See references\u002FEXAMPLES.md for complete PostgreSQL StatefulSet with secrets and volume templates.\n\n**Deploy Redis for caching:**\n```bash\n# Using Helm\nhelm install redis bitnami\u002Fredis \\\n  --set auth.enabled=false \\\n  --set replica.replicaCount=0\n```\n\n> See references\u002FEXAMPLES.md for kubectl-based Redis deployment.\n\nTest database connectivity:\n```bash\n# Apply manifests\nkubectl apply -f local-storage.yaml\nkubectl apply -f postgres-dev.yaml\n\n# Wait for PostgreSQL\nkubectl wait --for=condition=ready pod -l app=postgres --timeout=60s\n\n# Test connection\nkubectl exec -it postgres-0 -- psql -U devuser -d devdb -c \"SELECT version();\"\n```\n\n**Expected:** Storage class configured for dynamic provisioning. Database pods running and ready. Services accessible via port-forward or from other pods. Data persists across pod restarts. Resource usage appropriate for development (small limits).\n\n**On failure:**\n- Check if storage provisioner installed: `kubectl get storageclass`\n- Verify PVC bound to PV: `kubectl get pvc,pv`\n- Review pod events for mounting errors: `kubectl describe pod postgres-0`\n- For permission issues, check if hostPath directory exists and is writable\n- Test database startup: `kubectl logs postgres-0` for PostgreSQL errors\n- Ensure no port conflicts for port-forwarding\n\n### Step 5: Configure Observability for Local Development\n\nAdd minimal monitoring and logging for debugging.\n\n**Deploy lightweight monitoring stack:**\n```bash\n# Install metrics-server\nkubectl apply -f https:\u002F\u002Fgithub.com\u002Fkubernetes-sigs\u002Fmetrics-server\u002Freleases\u002Flatest\u002Fdownload\u002Fcomponents.yaml\n\n# For local clusters, disable TLS verification\nkubectl patch deployment metrics-server -n kube-system --type='json' -p='[\n  {\"op\": \"add\", \"path\": \"\u002Fspec\u002Ftemplate\u002Fspec\u002Fcontainers\u002F0\u002Fargs\u002F-\", \"value\": \"--kubelet-insecure-tls\"}\n]'\n\n# Verify metrics\nkubectl top nodes\nkubectl top pods -A\n```\n\n**Set up local logging:**\n```bash\n# Install stern (multi-pod log tailing)\ncurl -Lo stern https:\u002F\u002Fgithub.com\u002Fstern\u002Fstern\u002Freleases\u002Fdownload\u002Fv1.26.0\u002Fstern_1.26.0_linux_amd64.tar.gz\ntar -xzf stern_1.26.0_linux_amd64.tar.gz\nsudo mv stern \u002Fusr\u002Flocal\u002Fbin\u002F\n\n# Usage\nstern my-app --since 1m\n```\n\n> See references\u002FEXAMPLES.md for development dashboard ConfigMaps and useful aliases.\n\n**Expected:** Metrics-server providing resource usage data. kubectl top commands working. k9s or dashboard showing cluster status. Logs accessible via stern or kubectl logs. Low overhead monitoring suitable for development.\n\n**On failure:**\n- For metrics-server TLS errors, apply insecure TLS flag patch\n- Check if metrics-server pod running: `kubectl get pods -n kube-system -l k8s-app=metrics-server`\n- Verify heapster API available: `kubectl get apiservices | grep metrics`\n- For stern, ensure kubectl context is set correctly\n- Test basic kubectl access before debugging observability tools\n\n### Step 6: Document Workflow and Create Helpers\n\nCreate scripts and documentation for team onboarding.\n\n**Create setup script:**\n```bash\n#!\u002Fbin\u002Fbash\n# setup-local-cluster.sh (abbreviated)\nset -e\n\necho \"=== Local Kubernetes Cluster Setup ===\"\n\n# ... (see EXAMPLES.md for complete configuration)\n```\n\n> See references\u002FEXAMPLES.md for complete setup script with service deployment and verification.\n\n**Create teardown script:**\n```bash\n#!\u002Fbin\u002Fbash\n# teardown-local-cluster.sh (abbreviated)\necho \"=== Tearing Down Local Cluster ===\"\n\nif kind get clusters 2>\u002Fdev\u002Fnull | grep -q dev-cluster; then\n  kind delete cluster --name dev-cluster\n  docker stop kind-registry && docker rm kind-registry\nfi\n\ndocker system prune -f\n```\n\n> See references\u002FEXAMPLES.md for complete teardown script and README template.\n\n**Expected:** Setup script creates cluster in one command. Teardown script cleans everything up. README provides clear instructions for common tasks. Team members can get productive quickly.\n\n**On failure:**\n- Test scripts manually before distributing\n- Add error handling for each step\n- Provide troubleshooting section in README\n- Create video walkthrough for complex setups\n- Maintain scripts as cluster tool versions update\n\n## Validation\n\n- [ ] Local cluster created with multiple nodes\n- [ ] Ingress controller installed and responding\n- [ ] Local registry accessible and accepting pushes\n- [ ] Sample application deploys successfully\n- [ ] File sync working (changes reflected without full rebuild)\n- [ ] Port forwarding allows local access to services\n- [ ] Database services running and accessible\n- [ ] Metrics server providing resource usage\n- [ ] Logs accessible via kubectl\u002Fstern\u002FTilt\n- [ ] Setup\u002Fteardown scripts work reliably\n- [ ] Documentation clear and up-to-date\n- [ ] Team members can onboard in \u003C30 minutes\n\n## Common Pitfalls\n\n- **Insufficient Resources**: Local clusters need 4GB+ RAM, 2+ CPU cores. Check Docker Desktop settings. Reduce replicas and resource requests for development.\n\n- **Port Conflicts**: Ports 80, 443, 5000 commonly used. Check with `lsof -i :\u003Cport>` before cluster creation. Adjust port mappings if needed.\n\n- **Slow Rebuilds**: Without proper caching, Docker rebuilds are slow. Use multi-stage builds, .dockerignore, and BuildKit. Enable Skaffold\u002FTilt caching.\n\n- **Context Confusion**: Multiple kubectl contexts cause confusion. Use `kubectl config current-context` and `kubectx` tool to switch clearly.\n\n- **File Sync Not Working**: Path mismatches between host and container break sync. Verify paths in skaffold.yaml\u002FTiltfile match Dockerfile WORKDIR.\n\n- **Ingress Not Resolving**: Forgot to add entry to \u002Fetc\u002Fhosts. Or ingress controller not ready. Wait for controller pods before testing.\n\n- **Database Data Loss**: Default storage ephemeral. Use PersistentVolumes for data that should survive restarts. Be explicit about storage class.\n\n- **Resource Limits Too High**: Don't copy production resource specs to local. Reduce limits significantly for local development to fit in Docker Desktop.\n\n- **Network Isolation**: Local cluster can't always reach host services. Use `host.docker.internal` (Docker Desktop) or ngrok for reverse proxying.\n\n- **Version Skew**: Local cluster version differs from production. Explicitly set Kubernetes version during creation to match production.\n\n## Related Skills\n\n- `deploy-to-kubernetes` - Application deployment patterns tested locally first\n- `write-helm-chart` - Helm charts tested in local cluster\n- `setup-prometheus-monitoring` - Monitoring setup tested locally\n- `configure-ingress-networking` - Ingress configuration validated locally\n- `implement-gitops-workflow` - GitOps tested with local cluster\n- `optimize-cloud-costs` - Cost optimization strategies developed locally\n","# Setup Local Kubernetes\n\nCreate a local Kubernetes development environment for fast iteration and testing.\n\n## When to Use\n\n- Need local Kubernetes environment for application development\n- Want to test Kubernetes manifests and Helm charts before deploying to production\n- Require fast inner-loop development with automatic rebuild and redeploy\n- Testing multi-service applications with service dependencies\n- Learning Kubernetes without cloud costs\n- CI\u002FCD pipeline testing locally before pushing changes\n- Need isolated environment for experimentation and debugging\n\n## Inputs\n\n- **Required**: Docker Desktop or Docker Engine installed\n- **Required**: At least 4GB RAM available for cluster\n- **Required**: Choice of local cluster tool (kind, k3d, or minikube)\n- **Optional**: Application source code to deploy\n- **Optional**: Kubernetes version preference\n- **Optional**: Development tool preference (Skaffold, Tilt, or manual)\n- **Optional**: Number of worker nodes needed\n\n## Procedure\n\n> See [Extended Examples](references\u002FEXAMPLES.md) for complete configuration files and templates.\n\n### Step 1: Install Local Kubernetes Cluster Tool\n\nChoose and install kind, k3d, or minikube based on your requirements.\n\n**Install kind (Kubernetes in Docker):**\n```bash\n# Linux example\ncurl -Lo .\u002Fkind https:\u002F\u002Fkind.sigs.k8s.io\u002Fdl\u002Fv0.20.0\u002Fkind-linux-amd64\nchmod +x .\u002Fkind\nsudo mv .\u002Fkind \u002Fusr\u002Flocal\u002Fbin\u002Fkind\n\n# Verify installation\nkind version\n```\n\n**Install k3d (k3s in Docker):**\n```bash\n# Linux\u002FmacOS\ncurl -s https:\u002F\u002Fraw.githubusercontent.com\u002Fk3d-io\u002Fk3d\u002Fmain\u002Finstall.sh | bash\n\n# Verify installation\nk3d version\n```\n\n**Install minikube:**\n```bash\n# Linux example\ncurl -LO https:\u002F\u002Fstorage.googleapis.com\u002Fminikube\u002Freleases\u002Flatest\u002Fminikube-linux-amd64\nsudo install minikube-linux-amd64 \u002Fusr\u002Flocal\u002Fbin\u002Fminikube\n\n# Verify installation\nminikube version\n```\n\nInstall kubectl if not already present:\n```bash\n# Linux example\ncurl -LO \"https:\u002F\u002Fdl.k8s.io\u002Frelease\u002F$(curl -L -s https:\u002F\u002Fdl.k8s.io\u002Frelease\u002Fstable.txt)\u002Fbin\u002Flinux\u002Famd64\u002Fkubectl\"\nchmod +x kubectl\nsudo mv kubectl \u002Fusr\u002Flocal\u002Fbin\u002F\nkubectl version --client\n```\n\n> See references\u002FEXAMPLES.md for macOS and Windows installation commands.\n\n**Expected:** Tool binary installed and in PATH. Version command returns expected version. kubectl available for cluster interaction.\n\n**On failure:**\n- Ensure Docker is running: `docker ps`\n- Check system PATH includes installation directory\n- For permission issues, verify sudo\u002Fadmin rights\n- On macOS, may need to allow binary in Security & Privacy settings\n- Windows users: ensure running terminal as Administrator\n\n### Step 2: Create Local Cluster with Configuration\n\nCreate a multi-node cluster with ingress and local registry support.\n\n**Create kind cluster:**\n```yaml\n# kind-config.yaml (abbreviated)\nkind: Cluster\napiVersion: kind.x-k8s.io\u002Fv1alpha4\nname: dev-cluster\nlocale: caveman-lite\nsource_locale: en\nsource_commit: 82c77053\ntranslator: \"Julius Brussee homage — caveman\"\ntranslation_date: \"2026-04-19\"\nnodes:\n- role: control-plane\n  extraPortMappings:\n  - containerPort: 80\n    hostPort: 80\n  - containerPort: 443\n    hostPort: 443\n- role: worker\n- role: worker\n```\n\n```bash\n# Create cluster\nkind create cluster --config kind-config.yaml\n\n# Install ingress-nginx\nkubectl apply -f https:\u002F\u002Fraw.githubusercontent.com\u002Fkubernetes\u002Fingress-nginx\u002Fmain\u002Fdeploy\u002Fstatic\u002Fprovider\u002Fkind\u002Fdeploy.yaml\n\n# Create local registry\ndocker run -d --restart=always -p 5000:5000 --name kind-registry registry:2\ndocker network connect kind kind-registry\n```\n\n> See references\u002FEXAMPLES.md for complete kind-config.yaml with registry mirrors and ingress configuration.\n\n**Create k3d cluster:**\n```bash\n# Create cluster with ingress and registry\nk3d cluster create dev-cluster \\\n  --port \"80:80@loadbalancer\" \\\n  --port \"443:443@loadbalancer\" \\\n  --agents 2 \\\n  --registry-create k3d-registry:5000\n```\n\n**Create minikube cluster:**\n```bash\n# Create cluster with multiple nodes\nminikube start \\\n  --nodes=3 \\\n  --cpus=2 \\\n  --memory=4096 \\\n  --driver=docker \\\n  --addons=ingress,registry,metrics-server\n```\n\nTest cluster:\n```bash\n# Deploy test application\nkubectl create deployment hello --image=k8s.gcr.io\u002Fechoserver:1.4\nkubectl expose deployment hello --type=NodePort --port=8080\nkubectl port-forward service\u002Fhello 8080:8080\n\n# Clean up test\nkubectl delete deployment,service hello\n```\n\n**Expected:** Multi-node cluster running with control plane and worker nodes. Ingress controller installed and ready. Local registry accessible at localhost:5000. kubectl context set to new cluster. Test deployment successful.\n\n**On failure:**\n- Check Docker has sufficient resources (4GB+ memory recommended)\n- Verify no port conflicts: `lsof -i :80,443,5000,6550`\n- For kind: ensure Docker desktop Kubernetes is disabled (conflicts)\n- For k3d: check Docker network connectivity\n- For minikube: try different driver (virtualbox, hyperv, kvm2)\n- Review cluster creation logs: `kind get clusters`, `k3d cluster list`, `minikube logs`\n\n### Step 3: Configure Development Workflow Tools\n\nSet up Skaffold or Tilt for automated rebuild and redeploy.\n\n**Install Skaffold:**\n```bash\n# Linux example\ncurl -Lo skaffold https:\u002F\u002Fstorage.googleapis.com\u002Fskaffold\u002Freleases\u002Flatest\u002Fskaffold-linux-amd64\nchmod +x skaffold\nsudo mv skaffold \u002Fusr\u002Flocal\u002Fbin\nskaffold version\n```\n\n**Create Skaffold configuration:**\n```yaml\n# skaffold.yaml (abbreviated)\napiVersion: skaffold\u002Fv4beta7\nkind: Config\nmetadata:\n  name: my-app\nbuild:\n# ... (see EXAMPLES.md for complete configuration)\n```\n\n> See references\u002FEXAMPLES.md for complete skaffold.yaml with profiles, file sync, and port forwarding.\n\n**Install Tilt:**\n```bash\n# Linux\u002FmacOS\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Ftilt-dev\u002Ftilt\u002Fmaster\u002Fscripts\u002Finstall.sh | bash\ntilt version\n```\n\n**Create Tiltfile:**\n```python\n# Tiltfile (abbreviated)\nallow_k8s_contexts('kind-dev-cluster')\n\ndocker_build(\n  'localhost:5000\u002Fmy-app',\n  '.',\n  live_update=[\n    sync('.\u002Fsrc', '\u002Fapp\u002Fsrc'),\n  ]\n)\n\nk8s_yaml(['k8s\u002Fdeployment.yaml', 'k8s\u002Fservice.yaml'])\nk8s_resource('my-app', port_forwards='8080:8080')\n```\n\n> See references\u002FEXAMPLES.md for complete Tiltfile with live updates, Helm charts, and custom buttons.\n\nCreate sample Kubernetes manifests:\n```yaml\n# k8s\u002Fdeployment.yaml (abbreviated)\napiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: my-app\nspec:\n  replicas: 1\n  template:\n    spec:\n      containers:\n      - name: app\n        image: localhost:5000\u002Fmy-app\n        ports:\n        - containerPort: 8080\n```\n\n> See references\u002FEXAMPLES.md for complete manifests with service, ingress, and resource limits.\n\nTest development workflow:\n```bash\n# Using Skaffold\nskaffold dev --port-forward\n\n# Using Tilt\ntilt up\n\n# Add entry to \u002Fetc\u002Fhosts for ingress\necho \"127.0.0.1 my-app.local\" | sudo tee -a \u002Fetc\u002Fhosts\ncurl http:\u002F\u002Fmy-app.local\n```\n\n**Expected:** Skaffold or Tilt watching for file changes. Code changes trigger automatic rebuild and redeploy. Hot reload working for supported languages. Port forwarding allows local access. Logs streaming in terminal\u002FUI. Build caching makes rebuilds fast.\n\n**On failure:**\n- Verify Docker daemon accessible: `docker ps`\n- Check if local registry reachable: `curl http:\u002F\u002Flocalhost:5000\u002Fv2\u002F_catalog`\n- For file sync issues, ensure paths in config match actual structure\n- Review Skaffold\u002FTilt logs for build errors\n- Ensure Dockerfile has proper base image and builds successfully: `docker build .`\n- Check resource limits not causing OOMKills: `kubectl describe pod -l app=my-app`\n\n### Step 4: Set Up Local Storage and Databases\n\nConfigure persistent storage and deploy database services for testing.\n\n**Create local storage class:**\n```yaml\n# local-storage.yaml (abbreviated)\napiVersion: storage.k8s.io\u002Fv1\nkind: StorageClass\nmetadata:\n  name: local-path\nprovisioner: rancher.io\u002Flocal-path\n# ... (see EXAMPLES.md for complete configuration)\n```\n\n> See references\u002FEXAMPLES.md for complete storage configuration with PVC templates.\n\n**Deploy PostgreSQL for development:**\n```yaml\n# postgres-dev.yaml (abbreviated)\napiVersion: apps\u002Fv1\nkind: StatefulSet\nmetadata:\n  name: postgres\nspec:\n  serviceName: postgres\n  template:\n    spec:\n      containers:\n      - name: postgres\n        image: postgres:15-alpine\n        envFrom:\n        - secretRef:\n            name: postgres-secret\n```\n\n> See references\u002FEXAMPLES.md for complete PostgreSQL StatefulSet with secrets and volume templates.\n\n**Deploy Redis for caching:**\n```bash\n# Using Helm\nhelm install redis bitnami\u002Fredis \\\n  --set auth.enabled=false \\\n  --set replica.replicaCount=0\n```\n\n> See references\u002FEXAMPLES.md for kubectl-based Redis deployment.\n\nTest database connectivity:\n```bash\n# Apply manifests\nkubectl apply -f local-storage.yaml\nkubectl apply -f postgres-dev.yaml\n\n# Wait for PostgreSQL\nkubectl wait --for=condition=ready pod -l app=postgres --timeout=60s\n\n# Test connection\nkubectl exec -it postgres-0 -- psql -U devuser -d devdb -c \"SELECT version();\"\n```\n\n**Expected:** Storage class configured for dynamic provisioning. Database pods running and ready. Services accessible via port-forward or from other pods. Data persists across pod restarts. Resource usage appropriate for development (small limits).\n\n**On failure:**\n- Check if storage provisioner installed: `kubectl get storageclass`\n- Verify PVC bound to PV: `kubectl get pvc,pv`\n- Review pod events for mounting errors: `kubectl describe pod postgres-0`\n- For permission issues, check if hostPath directory exists and is writable\n- Test database startup: `kubectl logs postgres-0` for PostgreSQL errors\n- Ensure no port conflicts for port-forwarding\n\n### Step 5: Configure Observability for Local Development\n\nAdd minimal monitoring and logging for debugging.\n\n**Deploy lightweight monitoring stack:**\n```bash\n# Install metrics-server\nkubectl apply -f https:\u002F\u002Fgithub.com\u002Fkubernetes-sigs\u002Fmetrics-server\u002Freleases\u002Flatest\u002Fdownload\u002Fcomponents.yaml\n\n# For local clusters, disable TLS verification\nkubectl patch deployment metrics-server -n kube-system --type='json' -p='[\n  {\"op\": \"add\", \"path\": \"\u002Fspec\u002Ftemplate\u002Fspec\u002Fcontainers\u002F0\u002Fargs\u002F-\", \"value\": \"--kubelet-insecure-tls\"}\n]'\n\n# Verify metrics\nkubectl top nodes\nkubectl top pods -A\n```\n\n**Set up local logging:**\n```bash\n# Install stern (multi-pod log tailing)\ncurl -Lo stern https:\u002F\u002Fgithub.com\u002Fstern\u002Fstern\u002Freleases\u002Fdownload\u002Fv1.26.0\u002Fstern_1.26.0_linux_amd64.tar.gz\ntar -xzf stern_1.26.0_linux_amd64.tar.gz\nsudo mv stern \u002Fusr\u002Flocal\u002Fbin\u002F\n\n# Usage\nstern my-app --since 1m\n```\n\n> See references\u002FEXAMPLES.md for development dashboard ConfigMaps and useful aliases.\n\n**Expected:** Metrics-server providing resource usage data. kubectl top commands working. k9s or dashboard showing cluster status. Logs accessible via stern or kubectl logs. Low overhead monitoring suitable for development.\n\n**On failure:**\n- For metrics-server TLS errors, apply insecure TLS flag patch\n- Check if metrics-server pod running: `kubectl get pods -n kube-system -l k8s-app=metrics-server`\n- Verify heapster API available: `kubectl get apiservices | grep metrics`\n- For stern, ensure kubectl context is set correctly\n- Test basic kubectl access before debugging observability tools\n\n### Step 6: Document Workflow and Create Helpers\n\nCreate scripts and documentation for team onboarding.\n\n**Create setup script:**\n```bash\n#!\u002Fbin\u002Fbash\n# setup-local-cluster.sh (abbreviated)\nset -e\n\necho \"=== Local Kubernetes Cluster Setup ===\"\n\n# ... (see EXAMPLES.md for complete configuration)\n```\n\n> See references\u002FEXAMPLES.md for complete setup script with service deployment and verification.\n\n**Create teardown script:**\n```bash\n#!\u002Fbin\u002Fbash\n# teardown-local-cluster.sh (abbreviated)\necho \"=== Tearing Down Local Cluster ===\"\n\nif kind get clusters 2>\u002Fdev\u002Fnull | grep -q dev-cluster; then\n  kind delete cluster --name dev-cluster\n  docker stop kind-registry && docker rm kind-registry\nfi\n\ndocker system prune -f\n```\n\n> See references\u002FEXAMPLES.md for complete teardown script and README template.\n\n**Expected:** Setup script creates cluster in one command. Teardown script cleans everything up. README provides clear instructions for common tasks. Team members can get productive quickly.\n\n**On failure:**\n- Test scripts manually before distributing\n- Add error handling for each step\n- Provide troubleshooting section in README\n- Create video walkthrough for complex setups\n- Maintain scripts as cluster tool versions update\n\n## Validation\n\n- [ ] Local cluster created with multiple nodes\n- [ ] Ingress controller installed and responding\n- [ ] Local registry accessible and accepting pushes\n- [ ] Sample application deploys successfully\n- [ ] File sync working (changes reflected without full rebuild)\n- [ ] Port forwarding allows local access to services\n- [ ] Database services running and accessible\n- [ ] Metrics server providing resource usage\n- [ ] Logs accessible via kubectl\u002Fstern\u002FTilt\n- [ ] Setup\u002Fteardown scripts work reliably\n- [ ] Documentation clear and up-to-date\n- [ ] Team members can onboard in \u003C30 minutes\n\n## Common Pitfalls\n\n- **Insufficient Resources**: Local clusters need 4GB+ RAM, 2+ CPU cores. Check Docker Desktop settings. Reduce replicas and resource requests for development.\n\n- **Port Conflicts**: Ports 80, 443, 5000 commonly used. Check with `lsof -i :\u003Cport>` before cluster creation. Adjust port mappings if needed.\n\n- **Slow Rebuilds**: Without proper caching, Docker rebuilds are slow. Use multi-stage builds, .dockerignore, and BuildKit. Enable Skaffold\u002FTilt caching.\n\n- **Context Confusion**: Multiple kubectl contexts cause confusion. Use `kubectl config current-context` and `kubectx` tool to switch clearly.\n\n- **File Sync Not Working**: Path mismatches between host and container break sync. Verify paths in skaffold.yaml\u002FTiltfile match Dockerfile WORKDIR.\n\n- **Ingress Not Resolving**: Forgot to add entry to \u002Fetc\u002Fhosts. Or ingress controller not ready. Wait for controller pods before testing.\n\n- **Database Data Loss**: Default storage ephemeral. Use PersistentVolumes for data that should survive restarts. Be explicit about storage class.\n\n- **Resource Limits Too High**: Don't copy production resource specs to local. Reduce limits significantly for local development to fit in Docker Desktop.\n\n- **Network Isolation**: Local cluster can't always reach host services. Use `host.docker.internal` (Docker Desktop) or ngrok for reverse proxying.\n\n- **Version Skew**: Local cluster version differs from production. Explicitly set Kubernetes version during creation to match production.\n\n## Related Skills\n\n- `deploy-to-kubernetes` - Application deployment patterns tested locally first\n- `write-helm-chart` - Helm charts tested in local cluster\n- `setup-prometheus-monitoring` - Monitoring setup tested locally\n- `configure-ingress-networking` - Ingress configuration validated locally\n- `implement-gitops-workflow` - GitOps tested with local cluster\n- `optimize-cloud-costs` - Cost optimization strategies developed locally\n",{"name":5,"locale":23,"license":14,"metadata":24,"translator":31,"description":32,"allowed-tools":33,"source_commit":34,"source_locale":35,"translation_date":36},"caveman-lite",{"tags":25,"author":26,"domain":27,"version":28,"language":29,"complexity":30},"kind, k3d, minikube, local-development, skaffold, tilt, docker, kubernetes","Philipp Thoss","devops","1.0","multi","basic","Julius Brussee homage — caveman","Set up a local Kubernetes development environment using kind, k3d, or minikube for fast inner-loop development. Covers cluster creation, ingress configuration, local registry setup, and integration with development tools like Skaffold and Tilt for automatic rebuild and redeploy workflows. Use when needing a local Kubernetes environment for development, testing manifests or Helm charts before production deployment, wanting fast automatic rebuild-and-redeploy cycles, or learning Kubernetes without cloud costs.\n","Read Write Edit Bash Grep Glob","82c77053","en","2026-04-19","master","f483e54f3ad5f202a77d45f2e57f8d970b71195f","skills_library\u002Fsetup-local-kubernetes",2,"https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills","https:\u002F\u002Fgithub.com\u002Froohe","yoou.link","2026-05-19 15:56:07",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add roohe\u002Fagentic-super-skills --skill setup-local-kubernetes",{"tool":51,"command":52},"bunx","bunx skills add roohe\u002Fagentic-super-skills --skill setup-local-kubernetes",{"tool":54,"command":55},"pnpm","pnpm dlx skills add roohe\u002Fagentic-super-skills --skill setup-local-kubernetes","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fsetup-local-kubernetes\u002FSKILL.md",true,[59],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"references\u002FEXAMPLES.md","REFERENCE","参考文档",16483,"https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fsetup-local-kubernetes\u002Freferences\u002FEXAMPLES.md",[66,73,80,87,94,101],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M73D865CZME2FCMKA4PQM348","zarr-python","Chunked N-D arrays for cloud storage. Compressed arrays, parallel I\u002FO, S3\u002FGCS integration, NumPy\u002FDask\u002FXarray compatible, for large-scale scientific computing pipelines.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fzarr-python\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M73D7Z64J4ABWZJD7P44XBBF","youtube-downloader","Download and process YouTube content for research. Use when: downloading competitor videos for analysis; extracting audio for podcasts; getting transcripts for content repurposing; archiving webinars; research content curation","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyoutube-downloader\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M73D7K8778TGZV3GJFR3703D","yc-pitch-deck","Create a compelling startup pitch deck that follows the structure proven to raise billions from top investors. Master the YC and Sequoia formats that get founders funded. Use when: **Fundraising** to create investor pitch decks; **YC application** to structure your narrative; **Demo Day prep** to craft your 2-minute pitch; **Angel investors** to communicate your opportunity; **Partnership pitches** to structure compelling asks","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fyc-pitch-deck\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":18},"01M73D70KJSE0E8Z28YMNNRT04","x-twitter-scraper","Use when the user needs X (Twitter) data or confirmation-gated X actions through Xquik: tweet search, user lookup, follower extraction, media download, monitoring, webhooks, MCP, SDKs, posting, likes, DMs, and profile updates. Requires a Xquik API key. Never ask for X login material.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fx-twitter-scraper\u002FSKILL.md",[],[],{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":18},"01M73D6ED01GV077R7K4NZNFZJ","write-vignette","Create R package vignettes using R Markdown or Quarto. Covers vignette setup, YAML configuration, code chunk options, building and testing, and CRAN requirements for vignettes. Use when adding a Getting Started tutorial, documenting complex workflows spanning multiple functions, creating domain-specific guides, or when CRAN submission requires user-facing documentation beyond function help pages.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-vignette\u002FSKILL.md",[],[],{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":18},"01M73D69YJR0BK3NFHE0CYG3EF","write-validation-documentation","Write IQ\u002FOQ\u002FPQ validation documentation for computerized systems in regulated environments. Covers protocols, reports, test scripts, deviation handling, and approval workflows. Use when validating R or other software for regulated use, preparing for a regulatory audit, documenting qualification of computing environments, or creating and updating validation protocols and reports for new or re-qualified systems.","https:\u002F\u002Fgithub.com\u002Froohe\u002Fagentic-super-skills\u002Fblob\u002Fmaster\u002Fskills_library\u002Fwrite-validation-documentation\u002FSKILL.md",[],[]]