Created
October 31, 2019 19:32
-
-
Save gmlp/5f490aa0fd4af811fcb04654992dbcbe to your computer and use it in GitHub Desktop.
rancher-lab.sh
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
######################################## | |
## ## | |
## Rancher Lab ## | |
## ## | |
######################################### | |
######################################### | |
## Requirements: ## | |
## - Docker for mac and k8s enabled ## | |
## - Helm ## | |
## - KIND ## | |
######################################### | |
#This option install Rancher with rancher generated certificates | |
helm install stable/nginx-ingress --namespace nginx-ingress --name nginx-ingress | |
#Add rancher stable helm repo | |
helm repo add rancher-stable https://releases.rancher.com/server-charts/stable | |
kubectl apply -f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.9/deploy/manifests/00-crds.yaml | |
kubectl create namespace cert-manager | |
kubectl label namespace cert-manager certmanager.k8s.io/disable-validation=true | |
helm repo add jetstack https://charts.jetstack.io | |
helm repo update | |
helm install \ | |
--name cert-manager \ | |
--namespace cert-manager \ | |
--version v0.9.1 \ | |
jetstack/cert-manager | |
kubectl -n cert-manager rollout status deployment cert-manager | |
## replace x.x.x.x by your private ip | |
helm upgrade -i rancher rancher-stable/rancher \ | |
--namespace cattle-system \ | |
--set hostname=rancher.x.x.x.x.nip.io | |
#helm install rancher-stable/rancher \ | |
# --name rancher \ | |
# --namespace cattle-system \ | |
# --set hostname=rancher.127-0-0-1.nip.io | |
kubectl -n cattle-system rollout status deploy/rancher | |
# Bring up stage cluster | |
kind create cluster --name=stage --image kindest/node:v1.14.2 | |
# Connect to stage cluster | |
export KUBECONFIG="$(kind get kubeconfig-path --name="stage")" | |
# Bring up test cluster | |
kind create cluster --name=test --image kindest/node:v1.14.2 | |
# Connect to test cluster | |
export KUBECONFIG="$(kind get kubeconfig-path --name="test")" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment