commit 336aa998ad6d65489a46783fe4af2955c1ac2be2 Author: Eliezer Croitoru Date: Sat Jan 27 17:33:25 2024 +0000 1 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e660fd9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +bin/ diff --git a/REFERENCES.md b/REFERENCES.md new file mode 100644 index 0000000..da7efd7 --- /dev/null +++ b/REFERENCES.md @@ -0,0 +1 @@ +* diff --git a/install-containerd.sh b/install-containerd.sh new file mode 100644 index 0000000..dbf9618 --- /dev/null +++ b/install-containerd.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env + +apt install -y containerd + +mkdir -p /etc/containerd + +containerd config default | tee /etc/containerd/config.toml + +sed -i -e "s@SystemdCgroup = false@SystemdCgroup = true@g" /etc/containerd/config.toml + +echo "net.ipv4.ip_forward=1" > /etc/sysctl.d/010-k8s.conf +echo "br_netfilter" > /etc/modules-load.d/k8s.conf + +sysctl --system +modpobe br_netfilter + +systemctl restart containerd diff --git a/install-kube-from-repo.sh b/install-kube-from-repo.sh new file mode 100755 index 0000000..9d85e20 --- /dev/null +++ b/install-kube-from-repo.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +apt install -y apt-transport-https ca-certificates curl gpg + +curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.29/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg + +echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /' | \ + tee /etc/apt/sources.list.d/kubernetes.list + +apt update + +apt-get install -y kubelet kubeadm kubectl + +apt-mark hold kubelet kubeadm kubectl diff --git a/install-kubectl.sh b/install-kubectl.sh new file mode 100755 index 0000000..2f36d2a --- /dev/null +++ b/install-kubectl.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +apt install -y apt-transport-https ca-certificates curl wget + +mkdir -p bin + +wget "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \ + -O ./bin/kubectl + +wget "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl.sha256" \ + -O ./bin/kubectl.sha256 + +echo "$(cat ./bin/kubectl.sha256) ./bin/kubectl" | sha256sum --check + +install -o root -g root -m 0755 ./bin/kubectl /usr/local/bin/kubectl + +kubectl version --client + + +wget "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl-convert" \ + -O ./bin/kubectl-convert + +wget "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl-convert.sha256" \ + -O ./bin/kubectl-convert.sha256 + +echo "$(cat ./bin/kubectl-convert.sha256) ./bin/kubectl-convert" | sha256sum --check + + +install -o root -g root -m 0755 ./bin/kubectl-convert /usr/local/bin/kubectl-convert