Created
May 4, 2022 04:23
-
-
Save tarlan-huseynov/f288950d0898083ecdc44b250a45a76f to your computer and use it in GitHub Desktop.
Revisions
-
tarlan-huseynov renamed this gist
May 4, 2022 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
tarlan-huseynov created this gist
May 4, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ .PHONY: all setup init join cni reset uninstall kv ?= 1.22.4-00 dv ?= 5:20.10.14~3-0~ubuntu-jammy ha ?= 'false' cpe ?= none aaa ?= none all: init cni setup: @bash kubesetup --docker-version ${dv} --kube-version ${kv} -i init: setup @if [ ${ha} != 'true' ];then kubeadm init;else kubeadm init --control-plane-endpoint=${cpe} --upload-certs --apiserver-advertise-address=${aaa}; fi @echo "export KUBECONFIG=/etc/kubernetes/admin.conf" >> ~/.bashrc @source ~/.bashrc join: @kubeadm join ${cpe} --token ${token} --discovery-token-ca-cert-hash sha256:${hash} cni: @curl -O https://projectcalico.docs.tigera.io/manifests/calico.yaml @kubectl apply -f calico.yaml reset: @kubeadm reset @sed '/KUBECONFIG/d' ~/.bashrc @rm -rf /etc/cni uninstall: reset @bash kubesetup -rm