Installing k3s

We will install K3s using ansible.

Download or clone thek3s-ansiblerepository, modify the playbook inventory, and run it:

  1. Download using the 'Download ZIP' link on GitHub on
  2. Edit the Ansible inventory fileinventory/hosts.ini, and replace the examples with the IPs orhostnamesof your master and nodes. This file describes the K3s masters and nodes to Ansible as it installs K3s.
  3. Edit theinventory/group_vars/all.ymlfile and change theansible_usertopirate.
  4. Runansible-playbook site.yml -i inventory/hosts.iniand wait.

To connect to the cluster, once it's built, you need to grab thekubectlconfiguration from the master:

scp pirate@turing-master:~/.kube/config ~/.kube/config-turing-pi

Make sure you havekubectlinstalled on your computer (you can install it followingthese directions).

Then set theKUBECONFIGenvironment variable, and start runningkubectlcommands:

export KUBECONFIG=~/.kube/config-turing-pi
kubectl get nodes

You should get a list of all the Pi servers; if you do, congratulations! Your cluster is up and running.

This guide is based on the articleInstalling K3s Kubernetes on the Turing Piby Jeff Geerling

Was this article helpful?

0 out of 0 found this helpful
Have more questions? Submit a request

Comments (0 comments)

Article is closed for comments.