Skip to content

Amir-Ahmad/local-k8s-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

local-k8s-cluster

Local kubernetes cluster with kind, ingress-nginx, and working wildcard SSL locally. Useful for learning k8s or testing out things.

Dependencies:

  • kind to create the containerised cluster
  • mkcert to generate self signed certificates
  • Just as a task runner
  • kubectl

Get started

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.

  1. Create cert
just create-cert
  1. Create cluster
just create-cluster
  1. 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

What else

  • 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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published