Kubernetes Ingress
Using the Istio Gateway, rather than Ingress, is recommended to make use of the full feature set that Istio offers, such as rich traffic management and security features.
Follow the instructions in the Before you begin and sections of the Ingress Gateways task.
A Kubernetes Ingress Resources exposes HTTP and HTTPS routes from outside the cluster to services within the cluster.
Let’s see how you can configure a Ingress
on port 80 for HTTP traffic.
-
The
kubernetes.io/ingress.class
annotation is required to tell the Istio gateway controller that it should handle thisIngress
, otherwise it will be ignored. Access any other URL that has not been explicitly exposed. You should see an HTTP 404 error:
By default, Istio will treat paths as exact matches, unless they end in /*
or .*
, in which case they will become prefix matches. Other regular expressions are not supported.
In Kubernetes 1.18, a new field, pathType
, was added. This allows explicitly declaring a path as or Prefix
.
In Kubernetes 1.18, a new resource, IngressClass
, was added, replacing the kubernetes.io/ingress.class
annotation on the Ingress
resource. If you are using this resource, you will need to set the controller
field to . For example:
Delete the Ingress
configuration, and shutdown the httpbin service: