Background

This document captures my "copy/paste" and other details as I try to setup a k3 cluster.

Walkthrough

walkthrough
# Get k3 binary, by default it looks like x86_64 version
wget https://github.com/k3s-io/k3s/releases/download/v1.23.6%2Bk3s1/k3s

Using the k3s-ansible repository

There is a k3s-ansible repository that may be easier to work with. ย I'll fork it and then use it as a basis of my own version.


# get helm
https://github.com/helm/helm/releases

# get the linux amd64 version
wget https://get.helm.sh/helm-v3.8.2-linux-amd64.tar.gz
tar -zxvf helm-v3.8.2-linux-amd64.tar.gz
cd linux-amd64
mv helm /sbin
cd ..
rm -rf linux-amd64

# add helm stable repo
helm repo add rancher-stable https://releases.rancher.com/server-charts/stable

# add namespace
kubectl create namespace cattle-system

# helm needs to know location of kubeconfig file
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml

# setup
helm install rancher rancher-stable/rancher \
  --namespace cattle-system \
  --set hostname=rancher.tenzin.io \
  --set replicas=3 \
  --set ingress.tls.source=secret

# DNS was created for rancher.tenzin.io and CNAMEd to kube-1, the master node.
# VMware vSwitch needs to be configured with promiscuous mode, forged transmits and MAC changes.


Appendix

  • No labels