skaffold-helm-tutorial icon indicating copy to clipboard operation
skaffold-helm-tutorial copied to clipboard

Calls to install might not be correct

Open barbarebelge opened this issue 1 year ago • 0 comments

https://github.com/Kapernikov/skaffold-helm-tutorial/blob/b58b7c63698253176a4f161ebc91a433dd9a85d0/chapters/03-install-k3s.md?plain=1#L23-L48

The calls to install command need to explicitely put the name of the copied item in the destination path:

export TMP_K8S_DIR="/home/$USER/k8s-tuto-tmp"
export INSTALL_DIR="/usr/local/bin"

mkdir -p "$TMP_K8S_DIR" && cd "$TMP_K8S_DIR"

curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
sudo install kubectl "$INSTALL_DIR/kubectl"

curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash

curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/latest/skaffold-linux-amd64 && \
sudo install skaffold "$INSTALL_DIR/skaffold"

curl -Lo kubeseal.tgz https://github.com/bitnami-labs/sealed-secrets/releases/download/v0.17.5/kubeseal-0.17.5-linux-amd64.tar.gz && \
tar -f kubeseal.tgz -x kubeseal && \
sudo install kubeseal "$INSTALL_DIR/kubeseal"

curl -Lo k9s.tgz https://github.com/derailed/k9s/releases/download/v0.26.7/k9s_Linux_x86_64.tar.gz && \
tar -xf k9s.tgz  && \
sudo install k9s "$INSTALL_DIR/k9s"

curl -Lo kubectx https://github.com/ahmetb/kubectx/releases/download/v0.9.3/kubectx && \
sudo install kubectx "$INSTALL_DIR/kubectx"

cat << END | sudo tee -a /etc/sysctl.conf
fs.inotify.max_user_watches=1048576
fs.inotify.max_user_instances=1000000

END

sudo sysctl --system

rm -rf "$TMP_K8S_DIR"

In the proposed fix we also propose to put every downloaded artifact into a temp directory, easily removing them at the end and not poluting the home directory.

barbarebelge avatar Oct 24 '23 14:10 barbarebelge