From my-skills
Deploys containerized apps to local Minikube Kubernetes zero-shot: auto-detects services from Dockerfiles/docker-compose, generates Helm charts, builds/deploys multiples. Optional Dapr, cross-platform.
npx claudepluginhub rehan-ul-haq/my-skills --plugin my-skillsThis skill uses the workspace's default tool permissions.
Deploy ANY project to Minikube in a single iteration with automatic service detection and Helm chart generation.
assets/helm-chart-template/Chart.yamlassets/helm-chart-template/_helpers.tplassets/helm-chart-template/configmap.yamlassets/helm-chart-template/dapr-components/cron-binding.yamlassets/helm-chart-template/dapr-components/pubsub.yamlassets/helm-chart-template/dapr-components/statestore.yamlassets/helm-chart-template/namespace.yamlassets/helm-chart-template/secret.yamlassets/helm-chart-template/service-template/deployment.yamlassets/helm-chart-template/service-template/service.yamlassets/helm-chart-template/service-template/serviceaccount.yamlassets/helm-chart-template/values-local.yamlassets/helm-chart-template/values.yamlassets/scripts/check-prerequisites.shassets/scripts/cleanup-minikube.shassets/scripts/deploy-minikube.shassets/scripts/detect-dapr-need.shassets/scripts/detect-health-probes.shassets/scripts/setup-docker-env.shreferences/common-issues.mdSets up local Kubernetes clusters with kind, k3d, or minikube, including ingress, local registry, and Skaffold/Tilt integration for fast rebuild-redeploy cycles in development and testing.
Generates optimized multi-stage Dockerfiles and docker-compose configs for containerizing Node.js, Python, Go, Rust apps with health checks, volumes, and non-root security.
Guides Kubernetes deployment workflow: container prep with Docker, manifests, Helm charts, service mesh (Istio/Linkerd), security, observability (Prometheus/Grafana), and GitOps CI/CD.
Share bugs, ideas, or general feedback.
Deploy ANY project to Minikube in a single iteration with automatic service detection and Helm chart generation.
PREREQ → DETECT (services + Dapr) → GENERATE → BUILD → DEPLOY → VERIFY
Execute ALL steps without stopping. Only ask user if:
Run prerequisite check first to catch issues early:
# Check all requirements
.claude/skills/minikube-deploy/assets/scripts/check-prerequisites.sh
Or manually verify:
Cross-Platform Docker Setup:
# Linux/macOS/Git Bash
eval $(minikube docker-env)
# Windows PowerShell
& minikube docker-env --shell powershell | Invoke-Expression
# Windows CMD
@FOR /f "tokens=*" %i IN ('minikube docker-env --shell cmd') DO @%i
# Find all Dockerfiles
find . -name "Dockerfile" -o -name "Dockerfile.*" 2>/dev/null | grep -v node_modules | grep -v .git
# Check for docker-compose
ls docker-compose*.yml docker-compose*.yaml compose*.yml 2>/dev/null
# Find env files
find . -name ".env" -o -name ".env.example" 2>/dev/null | grep -v node_modules | head -5
For each Dockerfile, extract:
# Port
grep -i "^EXPOSE" <path> | awk '{print $2}' | head -1
# Service name = parent folder name
dirname <path> | xargs basename
Use the health probe detector or scan code:
# Auto-detect health endpoints
.claude/skills/minikube-deploy/assets/scripts/detect-health-probes.sh
Framework defaults if not detected:
| Framework | Default Health Path |
|---|---|
| FastAPI | /health |
| Next.js | /api/health |
| Express | /health |
| Spring | /actuator/health |
| Django | /health/ |
| Unknown | / |
PROJECT_NAME = <root-folder-name>
SERVICES = [
{name: "api", path: "apps/api", port: 8000, type: "backend", healthPath: "/health"},
{name: "frontend", path: "apps/frontend", port: 3000, type: "frontend", healthPath: "/"},
...
]
Type detection:
Run the Dapr detector to determine if Dapr should be enabled:
.claude/skills/minikube-deploy/assets/scripts/detect-dapr-need.sh
Auto-detection triggers (score-based):
| Indicator | Score | Meaning |
|---|---|---|
| Existing Dapr config | +10 | Dapr required |
| Kafka/Redpanda in compose | +3 | Event streaming |
| Redis in compose | +2 | Pub/sub or state |
| DaprClient in code | +5 | Already using Dapr |
| Pub/sub patterns | +2 | Event-driven code |
| 3+ services | +2 | Microservices |
Decision logic:
Set DAPR_ENABLED=true/false for subsequent steps.
PROJECT="<detected-name>"
mkdir -p helm/$PROJECT/templates
# helm/$PROJECT/Chart.yaml
apiVersion: v2
name: $PROJECT
description: Auto-generated chart for $PROJECT
type: application
version: 1.0.0
appVersion: "1.0.0"
Generate dynamically based on detected services:
# helm/$PROJECT/values.yaml
namespace: $PROJECT
imagePullPolicy: IfNotPresent
configMap:
NODE_ENV: "production"
# Dapr configuration (if DAPR_ENABLED=true)
dapr:
enabled: $DAPR_ENABLED # true or false based on Step 1.5
logLevel: "info"
pubsub:
type: "pubsub.redis" # or pubsub.kafka
statestore:
type: "state.redis"
# Repeat for EACH detected service:
$SERVICE_NAME:
enabled: true
replicaCount: 1
image:
repository: $SERVICE_NAME
tag: latest
service:
type: ClusterIP # NodePort for external
port: $DETECTED_PORT
resources:
requests: {cpu: 100m, memory: 128Mi}
limits: {cpu: 200m, memory: 256Mi}
probes:
enabled: true
path: /health # or / for frontends
_helpers.tpl:
{{- define "$PROJECT.fullname" -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- end }}
configmap.yaml:
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "$PROJECT.fullname" . }}-config
namespace: {{ .Values.namespace }}
data:
{{- range $key, $value := .Values.configMap }}
{{ $key }}: {{ $value | quote }}
{{- end }}
For EACH service, create templates/$SERVICE/deployment.yaml:
{{- if .Values.$SERVICE.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "$PROJECT.fullname" . }}-$SERVICE
namespace: {{ .Values.namespace }}
labels:
app.kubernetes.io/name: $SERVICE
app.kubernetes.io/instance: {{ .Release.Name }}
spec:
replicas: {{ .Values.$SERVICE.replicaCount }}
selector:
matchLabels:
app: $SERVICE
template:
metadata:
labels:
app: $SERVICE
app.kubernetes.io/name: $SERVICE
{{- if .Values.dapr.enabled }}
annotations:
dapr.io/enabled: "true"
dapr.io/app-id: "{{ include "$PROJECT.fullname" . }}-$SERVICE"
dapr.io/app-port: "{{ .Values.$SERVICE.service.port }}"
dapr.io/log-level: "{{ .Values.dapr.logLevel }}"
{{- end }}
spec:
containers:
- name: $SERVICE
image: "{{ .Values.$SERVICE.image.repository }}:{{ .Values.$SERVICE.image.tag }}"
imagePullPolicy: {{ .Values.imagePullPolicy }}
ports:
- containerPort: {{ .Values.$SERVICE.service.port }}
envFrom:
- configMapRef:
name: {{ include "$PROJECT.fullname" . }}-config
resources:
{{- toYaml .Values.$SERVICE.resources | nindent 12 }}
{{- end }}
For EACH service, create templates/$SERVICE/service.yaml:
{{- if .Values.$SERVICE.enabled }}
apiVersion: v1
kind: Service
metadata:
name: $SERVICE
namespace: {{ .Values.namespace }}
spec:
type: {{ .Values.$SERVICE.service.type }}
ports:
- port: {{ .Values.$SERVICE.service.port }}
targetPort: {{ .Values.$SERVICE.service.port }}
selector:
app: $SERVICE
{{- end }}
# Start minikube if needed
minikube status || minikube start --driver=docker --cpus=2 --memory=4096
# Use minikube's Docker daemon
eval $(minikube docker-env)
For EACH detected service:
docker build -t $SERVICE_NAME:latest -f $DOCKERFILE_PATH $CONTEXT_PATH
Context rules:
apps/api/Dockerfile → context = apps/api./Dockerfile → context = .services/worker/Dockerfile → context = services/workerdocker images | grep -E "service1|service2|..."
kubectl create namespace $PROJECT --dry-run=client -o yaml | kubectl apply -f -
Only if Dapr was detected/requested in Step 1.5:
# Add Dapr Helm repo
helm repo add dapr https://dapr.github.io/helm-charts/
helm repo update
# Install Dapr control plane
helm upgrade --install dapr dapr/dapr \
--namespace dapr-system \
--create-namespace \
--wait
# Verify Dapr is running
kubectl get pods -n dapr-system
# Expected: dapr-operator, dapr-sentry, dapr-sidecar-injector, dapr-placement
Install Redis for Dapr (if using Redis backend):
helm repo add bitnami https://charts.bitnami.com/bitnami
helm upgrade --install redis bitnami/redis \
--namespace $PROJECT \
--set auth.enabled=false \
--set architecture=standalone \
--wait
kubectl create secret generic $PROJECT-secrets \
--namespace=$PROJECT \
--from-env-file=.env \
--dry-run=client -o yaml | kubectl apply -f -
Create Dapr components for pub/sub and state store. See references/dapr-integration.md for templates.
helm upgrade --install $PROJECT ./helm/$PROJECT \
--namespace $PROJECT \
--wait --timeout 5m
# Pods
kubectl get pods -n $PROJECT
# Services
kubectl get svc -n $PROJECT
# Quick log check
kubectl logs -l app.kubernetes.io/instance=$PROJECT -n $PROJECT --tail=10
Provide port-forward commands:
# For each service that needs external access:
kubectl port-forward svc/$SERVICE $LOCAL_PORT:$SERVICE_PORT -n $PROJECT
Dapr is automatically detected in Step 1.5 and enabled if:
When Dapr is enabled:
dapr-system namespaceFor detailed Dapr setup: See references/dapr-integration.md
| Project Type | Detection | Services |
|---|---|---|
Monorepo apps/* | Multiple Dockerfiles in apps/ | One per app |
| Single app | One Dockerfile in root | Single service |
| docker-compose | Parse compose file | Match compose services |
| Microservices | services/ or packages/ | One per directory |
| Type | Port | NodePort |
|---|---|---|
| Frontend | 3000 | 30000 |
| API | 8000 | 30010 |
| Worker | N/A | N/A |
| Issue | Fix |
|---|---|
| ImagePullBackOff | eval $(minikube docker-env) before build |
| CrashLoopBackOff | kubectl logs <pod> -n <ns> |
| Connection refused | kubectl port-forward svc/<name> <port> |
| IPv6/ETIMEDOUT | See common-issues.md |
| Windows issues | See common-issues.md |
For detailed troubleshooting: See references/common-issues.md
If deployment fails:
kubectl logs <pod> -n <namespace> --previouskubectl get events -n <namespace> --sort-by='.lastTimestamp'helm uninstall <project> -n <namespace>
kubectl delete namespace <namespace>
# Fix issue, then re-run deployment
assets/scripts/check-prerequisites.sh - Validate environmentassets/scripts/setup-docker-env.sh - Cross-platform Docker setupassets/scripts/detect-health-probes.sh - Auto-detect health endpointsassets/scripts/detect-dapr-need.sh - Determine if Dapr is needed