kubernetes-arch-install/master_node_install.sh

30 lines
637 B
Bash

#!/bin/bash
read -p "Be sure to have disabled swap! Press enter to continue..."
sudo pacman -Syu --noconfirm
sudo pacman -S --needed --noconfirm \
ca-certificates \
curl \
docker \
docker-buildx \
docker-compose \
kubeadm \
kubelet \
kubectl \
kubernetes-cnl
# Build Kubernetes Clulster
kubeadm init
echo "Be sure to copy the join command for the workers!"
# Get Config
mkdir -p $HOME/.kube
sudo cp -l /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
#Deploy Container Networking
kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
kubectl get nodes