This directory contains a sample ingress as well as the definition for the Kubernetes manifests for the ingress controller.
This sample requires two applications to be deployed:
- An Ingress (this application)
- A Kubernetes Ingress Monitor (a process listening for changes in k8s and dispatching the Yarp configuration to ingress instances)
NOTE: Yarp Kubernetes can also be configured as a combined (single) deployable. See the combined README.md for more information.
From the base directory for this repo (where the .sln file is), run the commands:
docker build -t yarp-monitor:latest -f ./samples/KubernetesIngress.Sample/Monitor/Dockerfile .
docker build -t yarp-ingress:latest -f ./samples/KubernetesIngress.Sample/Ingress/Dockerfile .
- Open the ingress-monitor.yaml file
- Modify the container image to match the name used when building the image, e.g. change
<REGISTRY_NAME>/yarp-monitor:<TAG>toyarp-monitor:latest - Run the command
kubectl apply -f ./samples/KubernetesIngress.Sample/Monitor/ingress-monitor.yaml - Open the ingress.yaml file
- Modify the container image to match the name used when building the image, e.g. change
<REGISTRY_NAME>/yarp-ingress:<TAG>toyarp-ingress:latest - Run the command
kubectl apply -f ./samples/KubernetesIngress.Sample/Ingress/ingress.yaml
To undeploy the ingress, run the commands
kubectl delete -f ./samples/KubernetesIngress.Sample/Ingress/ingress.yaml
kubectl delete -f ./samples/KubernetesIngress.Sample/Monitor/ingress-monitor.yaml