From 1a1d6b8dfcfab7a658e525aa4550c77de13a5c8a Mon Sep 17 00:00:00 2001 From: Eliezer Croitoru Date: Sat, 27 Jan 2024 19:58:22 +0000 Subject: [PATCH] 8 --- Makefile | 3 +++ REFERENCES.md | 1 + initialize-k8s-ctrlr.sh | 3 +++ reset-ctrlr.sh | 9 +++++++++ 4 files changed, 16 insertions(+) create mode 100755 initialize-k8s-ctrlr.sh create mode 100755 reset-ctrlr.sh diff --git a/Makefile b/Makefile index 55fda85..ed02fe4 100644 --- a/Makefile +++ b/Makefile @@ -18,3 +18,6 @@ common-tools: upgrade: bash upgrade.sh + +clear-ctrlr: + bash reset-ctrlr.sh diff --git a/REFERENCES.md b/REFERENCES.md index da7efd7..e076f96 100644 --- a/REFERENCES.md +++ b/REFERENCES.md @@ -1 +1,2 @@ * +* diff --git a/initialize-k8s-ctrlr.sh b/initialize-k8s-ctrlr.sh new file mode 100755 index 0000000..1861c92 --- /dev/null +++ b/initialize-k8s-ctrlr.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +kubeadm init --control-plane-endpoint=172.16.250.216 --node-name controller --pod-network-cidr=10.244.0.0/16 diff --git a/reset-ctrlr.sh b/reset-ctrlr.sh new file mode 100755 index 0000000..d157c12 --- /dev/null +++ b/reset-ctrlr.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +kubeadm reset -f + +apt purge -y -f kubeadm kubectl kubelet kubernetes-cni kube* --allow-change-held-packages + +apt autoremove -y --allow-change-held-packages + +rm -rf ~/.kube