Created
May 31, 2025 20:21
-
-
Save shantur/166f22c58cdc68e801a054b135b56129 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
sudo mkdir -p /etc/rancher/k3s/ | |
sudo cat << EOF | sudo tee /etc/rancher/k3s/config.yaml | |
write-kubeconfig-mode: "0644" | |
tls-san: | |
- "k.m.lab.rathore.me" | |
disable: | |
- servicelb | |
- local-storage | |
- traefik | |
- metrics-server | |
token: manag3m3ntClust3r | |
disable-network-policy: true | |
disable-kube-proxy: true | |
disable-cloud-controller: true | |
EOF | |
hostname=$(hostname) | |
[ "$hostname" == "node1" ] && curl -sfL https://get.k3s.io | sh -s - --cluster-init | |
[ "$hostname" != "node1" ] && curl -sfL https://get.k3s.io | sh -s - --server "https://node1:6443" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment