Skip to main content

Pierre Ozoux

Having a bit of fun with Hetzner free cloud and kubernetes before GOT

1 min read

Following this tutoriel from my GF's ubuntu :)

apt-get install pip
pip install pssh
cat > servers < script.sh <https://download.docker.com/linux/ubuntu/gpg | apt-key add -
cat </etc/apt/sources.list.d/docker.list
deb https://download.docker.com/linux/$(lsb_release -si | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable
EOF

curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat </etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF

apt-get update

apt-get install -y docker-ce=$(apt-cache madison docker-ce | grep 17.03 | head -1 | awk '{print $3}') kubelet kubeadm kubectl
EOS

pssh -O StrictHostKeyChecking=no -h servers -i -t 0 -I < ./script.sh

My master will be the 22

run this on this node:


kubeadm init --pod-network-cidr=10.244.0.0/16

Run this on the workers:

kubeadm join ... # the join command you got from the init

And again on the master:

export KUBECONFIG=/etc/kubernetes/admin.conf
kubectl apply -f https://raw.githubusercontent.com/projectcalico/canal/master/k8s-install/1.7/rbac.yaml
kubectl apply -f https://raw.githubusercontent.com/projectcalico/canal/master/k8s-install/1.7/canal.yaml

 voila :)

kubectl get no
kubectl get po --all-namespaces

ok, it took 1h30, and not 15min as expected at the beginning :/ So no GOT, but just H2G2, and dodo :)