Clone this repo into /srv
on the machine that will serve as your salt-master
This file contains admin tasks not covered by another sls
- Disables swap files
This file runs the kubeadm init command and then sets a grain to prevent us from running it a second time
This file runs the kubeadm join command and then sets a grain to prevent us from running it a second time
This is the main sls file that specifies which minions get which config files
This file sets up our admin user account.
- Ensures the user
pi
exists, and creates it if it does not - Disables password-based authentication
- Sets up ssh authentication and copies our ssh key over
This file contains docker-specific setup
- Installs packages required for docker
- Configures the docker daemon
- Enables the docker service
This file contains kubernetes-specific setup
- Sets up the managed k8s repo
- Installs k8s
This file contains some configurations specific to raspberry pi 4b 64bit nodes
This sets up a salt mine function to get and store the hostname of the k8s master
This is the main pillar top file taht specifies which pillars run on which minions
This pillar module grabs the kube cert hash from the certificate generated in kubeadm init
and stores it in a pillar called kubecert
This pillar module grabs the kube token from the output of kubeadm token list
and stores it in a pillar called kubetoken
This orchestration sets up a node as the k8s-master
This is used by running: sudo salt-run state.orch orch.setup-k8s-master pillar='{"target-minion": "minion-name-here"}'
This orchestration sets up a node as a k8s-minion
This should be used only AFTER you have setup a k8s-master
This is used by running: sudo salt-run state.orch orch.setup-k8s-minion pillar='{"target-minion": "minion-name-here"}'
This orchestration gets the server ready to run Kubernetes and Docker by running the following states:
- admin_tasks.sls
- users.sls
- docker/setup.sls
- kubernetes/install.sls
This orchestration sets up a raspberry pi device to be used.
- Sets the
sbc:rpi-4b-64bit
grain for targeting within salt - Runs the
rpi-4b-64bit.sls
state - Reboots the device
- Runs the
setup-server.sls
orchestration
This is used by running: sudo salt-run state.orch orch.setup-raspberrypi-4b-64bit pillar='{"target-minion": "minion-name-here"}'
This is the calico manifest file needed for networking within the k8s cluster