This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export KIND_CLUSTER_NAME=$(whoami) | |
export INSTALL_K3S_VERSION=v1.19.5+k3s2 | |
export INSTALL_K3S_EXEC="--node-label cluster=${KIND_CLUSTER_NAME} --kubelet-arg=port=10260" | |
export K3S_TOKEN=K100eb593c7b4dcba3df04ffc638c7133bf66677599e3c5be1daca4bb7a7dedb27d::server:0b3300e83314273d0a4ffb08d4cb0144 | |
export K3S_URL=https://honk.jeefy.dev:6443 | |
cat <<EOF | kind create cluster --config=- | |
kind: Cluster | |
apiVersion: kind.x-k8s.io/v1alpha4 | |
nodes: | |
- role: control-plane | |
- role: worker | |
- role: worker | |
- role: worker | |
EOF | |
for i in $(kind get nodes); # works cause KIND_CLUSTER_NAME is already defined | |
do | |
docker exec -ti --env INSTALL_K3S_VERSION --env INSTALL_K3S_EXEC --env K3S_URL --env K3S_TOKEN $i bash -c "kubeadm reset -f && curl -sfL https://get.k3s.io | sh -s - ${INSTALL_K3S_EXEC}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment