This is just a place for some config (mostly shell scripts) that stands up a simple little dev management cluster of sorts for playing around with Kubernetes Orchestration, GitOps, etc.
I've been testing with kind just for the speed but these configs would feasibly work with minimal modification for any cluster.
Install KIND if you don't have it already, for macOS:
brew install kindCreate a cluster with ingress support:
kind create cluster --name sandbox-mgmt --config manifests/kind/clustery.yamlThe cluster-install.sh script sets up the management cluster. By default it installs the core components (NGINX, cert-manager, and Rancher). You can optionally add monitoring, logging, or GitOps tools.
Basic install:
./cluster-install.shInstall everything:
./cluster-install.sh --allInstall with monitoring:
./cluster-install.sh --with-monitoringThe script is idempotent so you can run it multiple times without issues. It'll skip anything already installed.
Access Rancher at http://rancher.localhost with username admin and password admin (or whatever you set via RANCHER_PASSWORD).
Use import-cluster.sh to bring external clusters into Rancher management.
From kubeconfig context:
./import-cluster.sh kubeconfig docker-desktopFrom GKE:
./import-cluster.sh gke my-project my-cluster us-central1From AKS:
./import-cluster.sh aks my-resource-group prod-clusterEnable monitoring on imported cluster:
./import-cluster.sh enable-monitoring c-m-12345678The cluster ID comes from Rancher UI after import.
You can enable Keycloak SSO to provide centralized authentication with proper RBAC for Rancher and ArgoCD:
./cluster-install.sh --with-keycloak --with-argocdThis sets up:
- Keycloak identity provider with OIDC
- Self-signed CA for TLS certificates
- Pre-configured realm with admin and viewer groups
- OIDC clients for Rancher and ArgoCD
See KEYCLOAK_SSO_SETUP.md for complete setup instructions, including:
- How to configure Rancher and ArgoCD OIDC authentication
- Distributing the CA certificate
- Managing users and permissions
- Preventing teammates from breaking your stuff (viewers group)
Services use HTTPS with a private CA. Install ./certs/ca.crt to avoid browser warnings:
macOS:
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ./certs/ca.crtLinux (Ubuntu/Debian):
sudo cp ./certs/ca.crt /usr/local/share/ca-certificates/cluster-ca.crt
sudo update-ca-certificatesLinux (RHEL/Fedora):
sudo cp ./certs/ca.crt /etc/pki/ca-trust/source/anchors/
sudo update-ca-trustWindows (PowerShell as admin):
Import-Certificate -FilePath ".\certs\ca.crt" -CertStoreLocation Cert:\LocalMachine\RootAfter installation you can access:
- Rancher: https://rancher.localhost
- ArgoCD: https://argocd.localhost (if installed)
- Keycloak: https://keycloak.localhost (if installed)