Created
October 31, 2020 23:25
-
-
Save fmdlc/1b26a0c936775bae5bc4d4e79cec8208 to your computer and use it in GitHub Desktop.
Install K3s with ETCD backend
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
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
# Initial node | |
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
sudo curl -sfL https://get.k3s.io | \ | |
INSTALL_K3S_CHANNEL=testing \ | |
K3S_KUBECONFIG_MODE=644 sh -s - --cluster-init | |
- The initial token can be found in: /var/lib/rancher/k3s/server/node-token | |
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
# The other nodes | |
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
sudo curl -sfL https://get.k3s.io | \ | |
INSTALL_K3S_CHANNEL=testing \ | |
K3S_KUBECONFIG_MODE=644 \ | |
sh -s - --server https://192.168.0.200:6443 --token <TOKEN> | |
- Get .kube/config from: /etc/rancher/k3s/k3s.yam | |
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
# Verify cluster status | |
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
kubectl cluster-info | |
kubectl get nodes -o wide | |
kubectl get componentstatuses |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment