example of ingress resources
Ralf T. Μεντ?
LF Kubernetes Trainer / Coach & Enthusiast | CKA | Cloud Native Nerd | What you have to learn to do, you learn by doing. Aristotle
An Ingress resource in Kubernetes is a collection of rules that allow inbound connections to reach the Kubernetes cluster services. It acts as a reverse proxy and routing rules for external traffic to access the services inside the cluster. Here is an example of an Ingress resource:
This Ingress resource routes traffic for the host myapp.example.com to the services my-api-service and my-web-service based on the path. The "/api" path routes to my-api-service and the "/" path routes to my-web-service. It also uses annotation to rewrite the target path.
It is worth noting that Ingress resources are not natively supported by all Kubernetes distributions and requires an Ingress controller to be installed in the cluster. Some of the most popular ingress controllers are Nginx, Istio, Traefik.
In this example, I've used Nginx Ingress controller, but you can use any ingress controller you like and the configuration may vary.