Contour

Contour is a high-performance, cloud-native ingress controller for Kubernetes, built on Envoy Proxy. It is widely used in AWS, Azure, GCP, and hybrid environments for advanced HTTP/HTTPS routing, TLS termination, and integration with the Gateway API. Contour supports both traditional Ingress and modern Gateway API resources, making it a flexible choice for DevOps teams.


Installation Options

Option 1: YAML (Quick Start)

Install Contour and Envoy using the official YAML manifest:

kubectl apply -f https://projectcontour.io/quickstart/contour.yaml

Verify the Contour pods are ready:

kubectl get pods -n projectcontour -o wide

You should see:

  • 2 Contour pods (Running, 1/1 Ready)

  • 1+ Envoy pods (Running, 2/2 Ready)

Install with Helm for versioned, repeatable deployments:

helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm install my-release bitnami/contour --namespace projectcontour --create-namespace

Verify Contour and Envoy:

You should see:

  • pod/my-release-contour-contour (Running, 1/1 Ready)

  • pod/my-release-contour-envoy (Running, 2/2 Ready)

  • service/my-release-contour, service/my-release-contour-envoy

Option 3: Contour Gateway Provisioner (Gateway API)

Provision Contour+Envoy dynamically using the Gateway API:

Verify the deployment:

Create a GatewayClass and Gateway:

Apply with:

Verify Gateway and pods:


Real-Life Example: Exposing a Web Application

1. Deploy a Sample App (httpbin)

Verify resources:

You should see:

  • 3 pods/httpbin (Running, 1/1 Ready)

  • 1 service/httpbin (port 80)

  • 1 Ingress (port 80)

2. Set IngressClass (if using Helm)

3. Port-Forward to Envoy (for local testing)

4. Test the Application

In a browser or with curl:

You should see the httpbin home page.


Best Practices

  • Use Helm for production and GitOps workflows

  • Store all manifests and Helm values in Git

  • Use Gateway API for future-proof, flexible routing

  • Monitor Contour and Envoy with Prometheus/Grafana

  • Restrict external access with network policies and firewalls


References

Tip: Integrate Contour with CI/CD (GitHub Actions, ArgoCD, Flux) for automated ingress and API gateway management in multi-cloud environments.

Last updated