initial commit with basic vagrant stuff

This commit is contained in:
2024-05-30 14:30:09 +02:00
parent 8b4e92fbae
commit 18662bae87
6 changed files with 234 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
#!/bin/bash
echo "[TASK 1] Pull required containers"
kubeadm config images pull >/dev/null
echo "[TASK 2] Initialize Kubernetes Cluster"
kubeadm init --apiserver-advertise-address=172.16.16.100 --pod-network-cidr=192.168.0.0/16 >> /root/kubeinit.log 2>/dev/null
echo "[TASK 3] Deploy Calico network"
kubectl --kubeconfig=/etc/kubernetes/admin.conf create -f https://raw.githubusercontent.com/projectcalico/calico/v3.27.0/manifests/tigera-operator.yaml >/dev/null
kubectl --kubeconfig=/etc/kubernetes/admin.conf create -f https://raw.githubusercontent.com/projectcalico/calico/v3.27.0/manifests/custom-resources.yaml >/dev/null
echo "[TASK 4] Generate and save cluster join command to /joincluster.sh"
kubeadm token create --print-join-command > /joincluster.sh