Skip to content

Instantly share code, notes, and snippets.

@pedrofracassi
Last active October 21, 2020 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pedrofracassi/bad717f87ffdb201e2a7d1942d338789 to your computer and use it in GitHub Desktop.
Save pedrofracassi/bad717f87ffdb201e2a7d1942d338789 to your computer and use it in GitHub Desktop.
Switchblade Worker Node Setup

1. Update package list

sudo apt-get update

2. Install Docker

sudo apt-get install docker.io

3. Configure Docker to launch at boot

sudo systemctl enable docker
sudo systemctl start docker

4. Add Kubernetes Signing Key

curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add

5. Add Software Repositories

sudo apt-add-repository "deb http://apt.kubernetes.io/ kubernetes-xenial main"

6. Install Kubernetes Installation Tools

sudo apt-get install kubeadm kubelet kubectl
sudo apt-mark hold kubeadm kubelet kubectl

7. Disable Swap

This step didn't work for me when I first tried it. If it doesn't for you, go google a solution.

sudo swapoff –a

8. Set hostname

sudo hostnamectl set-hostname switchblade-PROVIDER-AIRPORT-RANDOM

PROVIDER is the abbreviation of the hosting provider name

Provider Abbreviation
Contabo ctb
Vultr vtr
Amazon Web Services aws
Google Cloud gcp
Oracle Cloud occ
Azure azr

AIRPORT is the code of the airport nearest to the machine, in lowercase

RANDOM is a random 5-character string of numbers and lowercase letters.

9. Join the cluster

Ask Pedro for the join command. It should look like this:

kubeadm join --discovery-token abcdef.1234567890abcdef --discovery-token-ca-cert-hash sha256:1234..cdef 1.2.3.4:6443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment