Much of the code here is based on an example repo from Nick Janetakis.
This repository contains the infrastructure config for a locally hosted Kubernetes cluster with two Nginx pods.
The pods are configured to run on separate namespaces, as they both set up an ingress.
- Install Kind.
- Install
kubectl
, the Kubernetes CLI tool. - Install Terraform.
- Run
terraform apply
. - Confirm the changes are acceptable.
After all steps are complete, you can configure kubectl
to use your local cluster and check for the running pods:
- Run
kubectl config set-cluster kind-demo-local
- Run
kubectl get pods --all-namespaces | grep nginx
. You should see a pod in each ingress namespace.
You can create further pods and services to use the ingress in each namespace.