Creating Ingress Resources Based on Paths
Understand the definition of an Ingress resource and then create the objects based on this definition.
Defining an Ingress resource
We’ll try to make our go-demo-2-api Service available through port 80. We’ll do that by defining an Ingress resource with the rule to forward all requests with the path starting with /demo to the Service go-demo-2-api.
Looking into the definition
Let’s look at the Ingress’ YAML definition go-demo-2-ingress.yml:
- Line 5: This time,
metadatacontains a field we haven’t used before. Theannotationssection allows us to provide additional information to the Ingress controller. As you’ll see soon, the Ingress API specification is concise and limited. That is done on