Skip to main content

Mini Kubernetes Solutions

Set up lightweight Kubernetes environments for local development, testing, and edge simulation.

Minikube

# Install and start minikube
minikube start --memory=4096 --cpus=2
minikube addons enable ingress
minikube addons enable metrics-server

Kind (Kubernetes in Docker)

# Create cluster with custom config
kind create cluster --config=kind-config.yaml

K3s (Lightweight Kubernetes)

# Install K3s
curl -sfL https://get.k3s.io | sh -

Configuration Examples

Kind Config

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
kubeadmConfigPatches:
- |
kind: InitConfiguration
nodeRegistration:
kubeletExtraArgs:
node-labels: "ingress-ready=true"
extraPortMappings:
- containerPort: 80
hostPort: 80
protocol: TCP
- containerPort: 443
hostPort: 443
protocol: TCP

Best Practices

  1. Resource Allocation: Allocate sufficient memory and CPU.
  2. Addon Management: Install necessary addons for development.
  3. Port Forwarding: Set up proper port mappings.
  4. Cleanup: Regularly clean up unused resources.

Next Steps