KIND (Kubernetes in Docker)
Run Laminar locally using KIND for development and testing.
Prerequisites
- Docker Desktop
- kubectl
- Helm 3.12+
- kind
- Taskfile (recommended)
Install KIND
brew install kindQuick Start with Taskfile
The easiest way to set up KIND is using the provided Taskfile:
cd laminar-infra/k8s
# Create cluster and install everything
task kind:up
# This creates:
# - KIND cluster with local registry
# - Ingress controller
# - Laminar core, monitoring, and productAfter completion, add to /etc/hosts:
echo "127.0.0.1 laminar.local" | sudo tee -a /etc/hostsAccess URLs:
- Laminar UI: http://laminar.local/console
- API: http://laminar.local/api
- Grafana: http://laminar.local/grafana
Manual Setup
Step 1: Create Local Registry
# Start local Docker registry
docker run -d --restart=always -p 5001:5000 --name kind-registry registry:2Step 2: Create KIND Cluster
Create kind-config.yaml:
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."localhost:5001"]
endpoint = ["http://kind-registry:5000"]
nodes:
- role: control-plane
extraPortMappings:
- containerPort: 30080
hostPort: 80
protocol: TCP
- containerPort: 30443
hostPort: 443
protocol: TCP# Create cluster
kind create cluster --name laminar-dev --image kindest/node:v1.30.0 --config kind-config.yaml
# Connect registry to kind network
docker network connect kind kind-registryStep 3: Build and Push Images
# Build backend
cd laminar
task docker:build
docker tag laminar/backend:latest localhost:5001/laminar/backend:latest
docker push localhost:5001/laminar/backend:latest
# Build console
cd ../laminar-frontend/console
task docker:build
docker tag laminar/console:latest localhost:5001/laminar/console:latest
docker push localhost:5001/laminar/console:latest
# Build product
cd ../product
task docker:build
docker tag laminar/product:latest localhost:5001/laminar/product:latest
docker push localhost:5001/laminar/product:latestStep 4: Install Laminar
cd laminar-infra/k8s
# Install dependencies (ingress controller)
task install-deps ENV=kind
# Install monitoring
task install-monitoring ENV=kind
# Install product UI
task install-product ENV=kind
# Install core for e6data tenant
task install-core ENV=kind TENANT=e6dataKIND Values
The KIND deployment uses values-kind.yaml with local settings:
# Console
console:
image:
repository: localhost:5001/laminar/console
tag: "latest"
pullPolicy: Always
devMode: false
# Ingress
ingress:
enabled: false
className: nginx
host: laminar.local
# Engine
engine:
# Local file paths (no S3)
artifactUrl: "file:///tmp/laminar/artifacts"
checkpointUrl: "file:///tmp/laminar/checkpoints"
image:
repository: localhost:5001/laminar/backend
tag: "latest"
pullPolicy: Always
controller:
resources:
limits:
memory: 512Mi
cpu: 1000m
worker:
resources:
limits:
memory: 1Gi
cpu: 1000m
slots: 2
# S3 not used in KIND
s3:
region: ""
# StorageClass disabled
storageClass:
enabled: falseConfigure Local DNS
Add to /etc/hosts:
echo "127.0.0.1 laminar.local" | sudo tee -a /etc/hostsOn Windows, edit C:\Windows\System32\drivers\etc\hosts.
Verify Installation
# Check pods
kubectl get pods -n laminar-deps
kubectl get pods -n laminar-monitoring
kubectl get pods -n laminar-product
kubectl get pods -n tenant-e6data
# Check status
task kind:statusUseful Commands
# Show cluster status
task kind:status
# Restart all deployments
task kind:restart
# Set kubectl context
task kind:kubecontext
# Rebuild and push images
task kind:push-all
# View logs
kubectl logs -n tenant-e6data -l app=laminar-controller -f
# Port forward specific service
kubectl port-forward -n tenant-e6data svc/laminar-core-engine 8000:8000
# Uninstall (keep cluster)
task kind:down
# Delete cluster completely
task kind:deleteResource Configuration
KIND runs in Docker, so resources are limited. Recommended Docker settings:
| Resource | Minimum | Recommended |
|---|---|---|
| CPUs | 4 | 6+ |
| Memory | 8 GB | 12+ GB |
| Disk | 20 GB | 50+ GB |
Troubleshooting
Pods Pending
# Check node resources
kubectl describe nodes
# Check events
kubectl get events -n tenant-e6data --sort-by='.lastTimestamp'Images Not Found
# Verify registry is running
docker ps | grep kind-registry
# Verify images are pushed
curl -s http://localhost:5001/v2/_catalog
# Re-push images
task kind:push-allIngress Not Working
# Verify ingress controller
kubectl get pods -n laminar-deps
# Check ingress resource
kubectl describe ingress -n laminar-productRegistry Connection Issues
# Verify registry is on kind network
docker network inspect kind | grep kind-registry
# Reconnect if needed
docker network connect kind kind-registryNext Steps
- Helm Installation - Full Helm configuration
- Configuration - Customize your deployment