forked from donspablo/Instant-Kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
1 lines (1 loc) · 1.64 KB
/
install.sh
1
sudo 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;sudo curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3;sudo chmod 700 get_helm.sh;sudo ./get_helm.sh;curl -sLS https://get.k3sup.dev | sh;sudo install k3sup /usr/local/bin/;sudo k3sup install --ip "$serverNode" --user rancher --merge --local-path "$HOME/.kube/config" --context my-k3s;export KUBECONFIG="$(pwd)/.kube/config";for key in "${!workerNodes[@]}"; do runtime=$(sudo k3sup join --ip $key --server-ip $serverNode --user ${workerNodes[$key]}) echo "$key => ${workerNodes[$key]}"; done;kubectl get nodes;helm repo add rancher-latest https://releases.rancher.com/server-charts/latest;kubectl create namespace cattle-system;kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.5.1/cert-manager.crds.yaml;helm repo add jetstack https://charts.jetstack.io;helm repo update;helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --version v1.5.1;kubectl -n cert-manager rollout status deploy/cert-manager;helm install rancher rancher-latest/rancher --namespace cattle-system --set hostname=rancher.wh0a.com --set replicas=3 --set ingress.tls.source=letsEncrypt --set [email protected] --set tls=external;kubectl -n cattle-system rollout status deploy/rancher;curl -sLS https://get.arkade.dev | sudo sh;helm repo add rancher-latest https://releases.rancher.com/server-charts/latest;kubectl create namespace cattle-system;arkade install --help