Skip to content

Instantly share code, notes, and snippets.

@clouedoc
Created January 17, 2023 09:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clouedoc/39090aa9c4eeeba10f875d0e1a7722bc to your computer and use it in GitHub Desktop.
Save clouedoc/39090aa9c4eeeba10f875d0e1a7722bc to your computer and use it in GitHub Desktop.

k8s

Adding nodes

Control plane

hostnamectl hostname controlplane
pacman -S wireguard-tools open-iscsi mosh git zsh
systemctl enable iscsid && systemctl start iscsi
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

curl -sLS https://dl.get-arkade.dev | sh
arkade get helm
cp ~/.arkade/bin/helm /usr/local/bin/
arkade get kubectl
mv ~/.arkade/bin/kubectl /usr/local/bin/
arkade get flux
mv /root/.arkade/bin/flux /usr/local/bin/
source <(kubectl completion zsh) && \
echo 'source <(kubectl completion zsh)' >> ~/.zshrc
. <(flux completion zsh)
echo ". <(flux completion zsh)" >> ~/.zshrc

curl -sfL https://get.k3s.io | sh -s - --flannel-backend wireguard
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
echo "export KUBECONFIG=/etc/rancher/k3s/k3s.yaml" >> ~/.zshrc

Worker

Arch Linux

pacman -Syu --noconfirm
pacman -S --noconfirm wireguard-tools open-iscsi mosh

export K3S_TOKEN=YOUR_K3S_TOKEN
export K3S_URL=https://master_node_url:6443

# note: disable iscsi for now
#systemctl enable iscsid && systemctl start iscsi

curl -sfL https://get.k3s.io | sh -

Ubuntu

apt update
apt install -y wireguard

export K3S_TOKEN=YOUR_K3S_TOKEN
export K3S_URL=https://master_node_url:6443
curl -sfL https://get.k3s.io | sh -

Required supporting software

  • ArgoCD
  • cert-manager
  • can't think of anything else... good luck!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment