-# Ret up the Kubernetes master
-sudo -E kubeadm init --token-ttl 0 --pod-network-cidr=192.168.0.0/16 || \
- { echo "Failed to init kubeadm"; exit 1; }
-
-# Make cgroup non-exclusive for CPU and MEM
-sudo cgset -r cpuset.cpu_exclusive=0 /kubepods
-sudo cgset -r cpuset.mem_exclusive=0 /kubepods
-
-rm -rf $HOME/.kube
-mkdir -p $HOME/.kube
-sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
-sudo chown $(id -u):$(id -g) $HOME/.kube/config
-
-# Apply resources
-kubectl apply -f ${K8S_CALICO} || \
- { echo "Failed to apply Calico resources"; exit 1; }
-kubectl apply -f ${K8S_CSIT} || \
- { echo "Failed to apply CSIT resource"; exit 1; }
-
-# Update the taints
-kubectl taint nodes --all node-role.kubernetes.io/master- || \
- { echo "Failed to taint nodes"; exit 1; }
-
-# Dump Kubernetes objects ...
-kubectl get all --all-namespaces
-
-echo Kubernetes is ready