Skip to content

Instantly share code, notes, and snippets.

@dhoer
Last active July 22, 2020 18:12
Show Gist options
  • Save dhoer/16d54692719b3b755a0ed2c3e2fbb711 to your computer and use it in GitHub Desktop.
Save dhoer/16d54692719b3b755a0ed2c3e2fbb711 to your computer and use it in GitHub Desktop.

Rancher on Mac 10.15.x+

Prerequisites

Helm and kubctl installed

brew install helm
brew install kubectl

Kubernetes docker-destkop enabled and 8gb of memory configured in preferences

Installation

Ingress Controller

Ingress controllers are used to provide L7 (hostname or path base) http routing from the outside world to services running in Kubernetes.

helm repo add nginx-stable https://helm.nginx.com/stable
helm repo update
#kubectl create namespace ingress-nginx
helm install ingress-nginx nginx-stable/nginx-ingress

Cert Manager

The Cert-Manger project for Kubernetes will manage the SSL certs for our local Rancher install.

helm repo add jetstack https://charts.jetstack.io
helm repo update
kubectl create namespace cert-manager
helm install cert-manager jetstack/cert-manager \
    --namespace cert-manager \
    --version v0.12.0
kubectl -n cert-manager get pods
kubectl -n cert-manager get services

kubectl -n cert-manager logs -l app=cert-manager -f

Rancher Server

The default install will use Rancher’s built in self-signed SSL certificate. For additional details and install options check out Rancher’s HA Install Docs.

helm repo add rancher-stable https://releases.rancher.com/server-charts/stable
helm repo update
kubectl create namespace cattle-system
helm install rancher rancher-latest/rancher \
  --namespace cattle-system \
  --set hostname=rancher.localhost
kubectl -n cattle-system get services
kubectl -n cattle-system get pods

kubectl -n cattle-system logs -l app=rancher -f
kubectl -n cattle-system get ingresses

URL

https://rancher.localhost

Troubleshooting

Error

2020/07/21 23:15:14 [ERROR] ClusterController local [cluster-deploy] failed with : waiting for server-url setting to be set

Try

rm -rf ~/Library/Group\ Containers/group.com.docker/pki/
rm -rf ~/.kube

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment