Getting started with HTTPProxy basics, Contour's alternative API for Ingress

From official doc, the goal of the HTTPProxy Custom Resource Definition (CRD) is to expand upon the functionality of the Ingress API to allow for a richer user experience as well addressing the limitations of the latter’s use in multi tenant environments. Key HTTPProxy Benefits Safely supports multi-team Kubernetes clusters, with the ability to limit which Namespaces may configure virtual hosts and TLS credentials. Enables including of routing configuration for a path or domain from another HTTPProxy, possibly in another Namespace. Accepts multiple services within a single route and load balances traffic across them. Natively allows defining service weighting and load balancing strategy without annotations. Validation of HTTPProxy objects at creation time and status reporting for post-creation validity. So, without these complicated definitions of HTTPProxy, let’s just write some manifests and test it out for ourselves! ...

May 5, 2024 · 6 min · 1223 words · Saber Shahhoseini

Install and setup Contour ingress controller

Today we’ll install and setup Contour ingress controller. But what is Contour? From what official docs say, Contour is an ingress controller for Kubernetes that works by deploying the Envoy proxy as a reverse proxy and load balancer. Contour supports dynamic configuration updates out of the box while maintaining a lightweight profile. Contour APIs Contour supports multiple configuration APIs in order to meet the needs of as many users as possible: Ingress - A stable upstream API that enables basic ingress use cases. HTTPProxy - Contour’s Custom Resource Definition (CRD) which expands upon the functionality of the Ingress API to allow for a richer user experience as well as solve shortcomings in the original design. Gateway API - A new CRD-based API managed by the Kubernetes SIG-Network community that aims to evolve Kubernetes service networking APIs in a vendor-neutral way. I’ve mostly used HTTPProxy and Ingress and haven’t had the pleasure to use Gateway API yet. From my experience HTTPProxy is a feature-rich API which you can do almost anything you want! You can find more docs here. ...

May 5, 2024 · 2 min · 299 words · Saber Shahhoseini

Setup TLS Ingress rule using Contour ingress controller

Today we’ll setup an ingress rule using Contour. You can follow this guide to setup Contour ingress controller on your K8s cluster. First, we’ll create a simple Ingress rule to handle plain HTTP requests to our service for us. Simple HTTP Ingress apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: http-ingress spec: ingressClassName: contour rules: - host: "example.org" http: paths: - backend: service: name: app-svc port: number: 8181 path: / pathType: Prefix By applying this Ingress rule, Contour will be notified and will command Envoy to setup required configuration on each Envoy pod to be able to redirect traffic destined to example.org to any pod behind app-svc:8181 service. ...

May 5, 2024 · 2 min · 382 words · Saber Shahhoseini