Supporting the Evolving Ingress Specification in Kubernetes 1.18
Authors: Alex Gervais (Datawire.io)
Earlier this year, the Kubernetes team released
When deploying your applications in Kubernetes, one of the first challenges many people encounter is how to get traffic into their cluster.
There are three significant additions to the Ingress API in Kubernetes 1.18: The new The You can read more about these changes, as well as the support for wildcards in hostnames in more detail in . Every Ambassador release goes through rigorous testing. Therefore, we also contributed an
Following a test-driven development approach, the first step we took in supporting Ingress improvements in Ambassador was to translate the revised specification -- both in terms of API and behavior -- into a comprehensible test suite. The test suite, although still under heavy development and going through multiple iterations, was rapidly added to the Ambassador CI infrastructure and acceptance criteria. This means every change to the Ambassador codebase going forward will be compliant with the Ingress API and be tested end-to-end in a lightweight
With a global comprehension of additions to Ingress introduced in Kubernetes 1.18 and a test suite on hand, we tackled the task of adapting the Ambassador code so that it would support translating the high-level Ingress API resources into Envoy configurations and constructs. Luckily Ambassador already supported previous versions of ingress functionalities so the development effort was incremental. We settled on a controller name of Paths can now define different matching behaviors using the A comprehensive
Check out the following resources:What is Kubernetes Ingress
NodePort
to expose your application on a port across each of your nodesLoadBalancer
service to create an external load balancer that points to a Kubernetes service in your clusterWhat’s new in Kubernetes 1.18 Ingress
pathType
fieldIngressClass
resourcepathType
field allows you to specify how Ingress paths should match.
The field supports three types: ImplementationSpecific
(default), exact
, and prefix
. Explicitly defining the expected behavior of path matching will allow every ingress-controller to support a user’s needs and will increase portability between ingress-controller implementation solutions.IngressClass
resource specifies how Ingresses should be implemented by controllers. This was added to formalize the commonly used but never standardized kubernetes.io/ingress.class
annotation and allow for implementation-specific extensions and configuration.Supporting Kubernetes ingress
Adopting a new specification
getambassador.io/ingress-controller
. This value, consistent with Ambassador's domain and CRD versions, must be used to tie in an IngressClass spec.controller
with an Ambassador deployment. The new IngressClass resource allows for extensibility by setting a spec.parameters
field. At the moment Ambassador makes no use of this field and its usage is reserved for future development.pathType
field. The field will default to a value of ImplementationSpecific
, which uses the same matching rules as the
Kubernetes Ingress Controllers