Local kubernetes cluster with kind, ingress-nginx, and working wildcard SSL locally. Useful for learning k8s or testing out things.
- kind to create the containerised cluster
- mkcert to generate self signed certificates
- Just as a task runner
- kubectl
This requires a wildcard domain name that points to 127.0.0.1. This is so we don't need to edit our /etc/hosts file.
By default it uses vcap.me (owned by CloudFoundry), but this can be overridden (see local_domain_name in the Justfile). Some other domains can be found here and here.
- Create cert
just create-cert
- Create cluster
just create-cluster
- Deploy ingress-nginx controller and a hello application
just deploy-ingress
just deploy-hello
You should now be able to access this at https://vcap.me/hello
- You can pass through kubectl commands using "just k", e.g.
just k get pod
. - Use the environment variable "CLUSTER_NAME" to create/manage additional clusters.
just delete-cluster
will delete the cluster