From a18561b0b568a35cba39c566f7353439ec0d7af5 Mon Sep 17 00:00:00 2001 From: victor Date: Tue, 22 Oct 2024 13:13:29 +0200 Subject: [PATCH] fixed kubectl installation --- base_scripts/install_kubectl.sh | 3 +- start_cluster..sh | 89 --------------------------------- 2 files changed, 2 insertions(+), 90 deletions(-) delete mode 100755 start_cluster..sh diff --git a/base_scripts/install_kubectl.sh b/base_scripts/install_kubectl.sh index 155a4f7..0bfe70e 100755 --- a/base_scripts/install_kubectl.sh +++ b/base_scripts/install_kubectl.sh @@ -1,2 +1,3 @@ #!/bin/bash -curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \ No newline at end of file +curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" +sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl diff --git a/start_cluster..sh b/start_cluster..sh deleted file mode 100755 index 1e8bf62..0000000 --- a/start_cluster..sh +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/sh -set -o errexit -# 0. install kind -# For AMD64 / x86_64 -[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.24.0/kind-linux-amd64 -# For ARM64 -[ $(uname -m) = aarch64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.24.0/kind-linux-arm64 -chmod +x ./kind -sudo mv ./kind /usr/local/bin/kind -# 1. Create registry container unless it already exists -reg_name='kind-registry' -reg_port='5001' -if [ "$(docker inspect -f '{{.State.Running}}' "${reg_name}" 2>/dev/null || true)" != 'true' ]; then - docker run \ - -d --restart=always -p "127.0.0.1:${reg_port}:5000" --network bridge --name "${reg_name}" \ - registry:2 -fi - -# 2. Create kind cluster with containerd registry config dir enabled -# TODO: kind will eventually enable this by default and this patch will -# be unnecessary. -# -# See: -# https://github.com/kubernetes-sigs/kind/issues/2875 -# https://github.com/containerd/containerd/blob/main/docs/cri/config.md#registry-configuration -# See: https://github.com/containerd/containerd/blob/main/docs/hosts.md -kind create cluster --config manifests/kind-cluster-config.yaml -# cat <