Skip to content

Instantly share code, notes, and snippets.

@fmdlc
Created October 31, 2020 23:25
Show Gist options
  • Save fmdlc/1b26a0c936775bae5bc4d4e79cec8208 to your computer and use it in GitHub Desktop.
Save fmdlc/1b26a0c936775bae5bc4d4e79cec8208 to your computer and use it in GitHub Desktop.
Install K3s with ETCD backend
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# 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