k3s
Multi master with k3s
Start the first master
curl -sfL https://get.k3s.io | sh -s - --no-deploy=traefik --cluster-init
check the node (you should have one)
kubectl get nodes
Get the token
cat /var/lib/rancher/k3s/server/node-token
Start another master
curl -sfL https://get.k3s.io | sh -s - --no-deploy=traefik --server https://IP:6443 --token "TOKEN"
Enjoy :heart:
Archived
Cool links:
- https://medium.com/@rboulanouar/5fe6c3497a1e1
- https://ahmermansoor.blogspot.com/2019/05/install-lightweight-kubernetes-k3s-with-k3os.html
- https://github.com/rancher/k3os/blob/master/README.md
Questions ? (for me)
- Package manager ? (apt equivalent)
Installation
- Download executable (https://k3os.io/ not https://k3s.io/ if you want k3s as your OS)
- Boot
- Change rancher password :
sudo passwd rancher - Connect with ssh
Setup
- Install OS:
sudo os-config - Special part (Config system with cloud-init file?)
- Install as
server - token or cluster secret will be require when you want to add a new node to your cluster
- One you have installed k3s, you should rechange the password ! (First time you changed it to the OS loaded in ram)
- Try
kubectl get nodes. Finish !
Add ssh key
Here https://github.com/rancher/k3os/blob/master/README.md#configuration-reference there is an example of /var/lib/rancher/k3os/config.yaml which is a file readed at the boot of k3s. It allows you to specify public keys.
Read more →
kubernetes
k8s