Skip to content

Instantly share code, notes, and snippets.

@kizzx2
Last active February 18, 2020 06:49
Show Gist options
  • Save kizzx2/f9120bdfe2949bf2ee05a648d3bbf498 to your computer and use it in GitHub Desktop.
Save kizzx2/f9120bdfe2949bf2ee05a648d3bbf498 to your computer and use it in GitHub Desktop.
Setting up k3d with Helm/Tiller 2
# Optionally delete the existing cluster first if you have it
# k3d d
# Work around "pods being evicted" issue
# https://github.com/rancher/k3d/issues/133
k3d c \
--server-arg '--kubelet-arg=eviction-hard=imagefs.available<1%,nodefs.available<1%' \
--server-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1%'
# Wait until the base system nodes are running
watch kubectl get po --all-namespaces
# Set up helm
kubectl -n kube-system create serviceaccount tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller --output yaml | sed 's@apiVersion: extensions/v1beta1@apiVersion: apps/v1@' | sed 's@ replicas: 1@ replicas: 1\n selector: {"matchLabels": {"app": "helm", "name": "tiller"}}@' | kubectl apply -f -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment