k3s In Ubuntu Server¶
ufw disable
- Not Recommendedcurl -sfL https://get.k3s.io | sh -
sudo k3s kubectl get node
sudo chmod 644 /etc/rancher/k3s/k3s.yaml
- makes the file readable by all userssudo chown $(whoami):$(whoami) /etc/rancher/k3s/k3s.yaml
- allows a specific group to access the file
k3s With Docker¶
- By default
k3s
doesn't come withdocker
support. curl -sfL https://get.k3s.io | sh -s - --docker
- Install k3s with docker as container runtime.sudo /usr/local/bin/k3s-uninstall.sh
To uninstalled any previously installedk3s
Copy the k3s.yaml
to home Directory¶
sudo cp /etc/rancher/k3s/k3s.yaml ~
sudo chown hyperoot:hyperoot ~/k3s.yaml
And don't forget to change the ownership to current user instead of root
. We will further copy this Kubernetes config to our workstation using scp
.
cd
scp [email protected]:/home/hyperoot/k3s.yaml .
This will allow us to control the cluster from our workstation instead of SSHing into the server again and again.