Last active
March 11, 2024 13:44
-
-
Save anabarasan/4e2434c56c2d8621492af82e7d33332c to your computer and use it in GitHub Desktop.
This file contains 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 characters
#!/usr/bin/env bash | |
set -ex | |
echo "Installing Docker 20.10" | |
curl -sL https://releases.rancher.com/install-docker/20.10.sh | sh | |
systemctl enable docker --now | |
echo "Installing kubectl" | |
curl -LO https://dl.k8s.io/release/v1.24.10/bin/linux/amd64/kubectl | |
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl | |
echo "Installing RKE v1.4.2" | |
curl -LO https://github.com/rancher/rke/releases/download/v1.4.2/rke_linux-amd64 | |
install rke_linux-amd64 /usr/local/bin/rke | |
echo "Installing Helm" | |
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash | |
echo "Creating SSH key for root" | |
ssh-keygen -f /root/.ssh/id_rsa -P "" | |
cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys | |
echo "Configuring KUBECONFIG" | |
cat <<EOF >/etc/profile.d/kubeconfig.sh | |
export KUBECONFIG=/root/kube_config_cluster.yml | |
EOF | |
echo "Adding bash completion for kubectl" | |
kubectl completion bash >> /etc/profile.d/kubeconfig.sh | |
echo "Installing make & bash completion" | |
dnf install -y make bash-completion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment