Skip to content

Instantly share code, notes, and snippets.

@revant
Last active December 5, 2021 08:46
Show Gist options
  • Select an option

  • Save revant/0c235b13dcf01cd75c59f594e5dc2bc6 to your computer and use it in GitHub Desktop.

Select an option

Save revant/0c235b13dcf01cd75c59f594e5dc2bc6 to your computer and use it in GitHub Desktop.
Commands to install k8s cluster using k3d for local use
  1. Install devcluster, publish ports without traefik.
k3d cluster create devcluster \
  --api-port 127.0.0.1:6443 \
  -p 80:80@loadbalancer \
  -p 443:443@loadbalancer \
  --k3s-arg "--disable=traefik@server:0"
  1. Install kubernetes nginx ingress controller (replace v0.42.0 with latest version, refer kubernetes/ingress-nginx)
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.0/deploy/static/provider/cloud/deploy.yaml
  1. Export KUBECONFIG
k3d kubeconfig get devcluster > $HOME/k3d/kubeconfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment