Kubernetes: Ingress

Ingress in one of the ways to expose HTTP and HTTPS routes of your internal services.

Single rule:

kubectl create ingress <ingress-name> --rule "<domain-name>/*=<svc>:<port>"

Multiple rules:

kubectl create ingress <ingress-name>\
    --rule "<domain-name>/*=<svc1>:<port>"\
    --rule "<domain-name>/some-dir/*=<svc2>:<port>"

This will froward /index.html, /about.html to svc1 and /some-dir/index.html, /some-dir/others.html to svc2.

References:


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *