Skip to content

Demo of Nginx Ingress Controller on a kind k8s cluster

License

Notifications You must be signed in to change notification settings

icqparty/k8s-kind-ingress-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

k8s-kind-ingress-demo

Setting up an ingress controller on a kind k8s cluster

Prerequisites

Cluster setup

  • Prepare kind cluster with port mappings:
kind create cluster --config="cluster-config.yml"

Note: To support running as rootless Docker/Podman we bind http (80) to port 1080 on localhost and https (443) to port 1443 on localhost

Usage

  1. Deploy nginx ingress controller to cluster
kubectl apply -f kind-nginx-ingress.yml

kubectl wait --namespace ingress-nginx \
  --for=condition=ready pod \
  --selector=app.kubernetes.io/component=controller \
  --timeout=90s
  1. Deploy the example workloads (pods, services and ingress)
kubectl apply -f workloads.yml

kubectl wait \
  --for=condition=ready pod \
  --selector=workload=ingress-demo \
  --timeout=90s
  1. Run curl against the ingress controller on the specified ports/paths
curl localhost:1080/foo

curl localhost:1080/bar

Output:

'hello world! this is foo!'
'hello world! this is bar!'

Clean up

  • Run kubectl delete -f workloads.yml if you want to remove the example workloads
  • Run kubectl delete -f kind-nginx-ingress.yml if you want to remove the ingress controller
  • Run kind delete cluster to remove the full cluster

Acknowledgements

About

Demo of Nginx Ingress Controller on a kind k8s cluster

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%