Skip to content

Instantly share code, notes, and snippets.

@adrianord
Created May 7, 2026 21:30
Show Gist options
  • Select an option

  • Save adrianord/51c1df63c657a954589c220b6a59e938 to your computer and use it in GitHub Desktop.

Select an option

Save adrianord/51c1df63c657a954589c220b6a59e938 to your computer and use it in GitHub Desktop.
KIND getting started with traefik
# kind-cluster.yaml
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
# traefik-values.yaml
deployment:
kind: Deployment
replicas: 1
# Pin to the labeled control-plane node and tolerate its taint
nodeSelector:
ingress-ready: "true"
tolerations:
- key: node-role.kubernetes.io/control-plane
operator: Exists
effect: NoSchedule
# Use hostPort instead of LoadBalancer — kind doesn't have one by default
service:
enabled: true
type: ClusterIP
ports:
web:
port: 8000
exposedPort: 80
hostPort: 80
websecure:
port: 8443
exposedPort: 443
hostPort: 443
ingressClass:
enabled: true
isDefaultClass: true
providers:
kubernetesIngress:
enabled: true
kubernetesCRD:
enabled: true
allowCrossNamespace: false
# whoami-ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: whoami
spec:
ingressClassName: traefik
rules:
- host: whoami.localtest.me
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: whoami
port:
number: 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment