Image Overview: contour

Overview: contour Chainguard Image

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.

Download this Image

The image is available on cgr.dev:

docker pull cgr.dev/chainguard-private/contour:latest

Usage

To deploy Contour with our image, modify the contour.yaml file and apply it using kubectl:

curl -s https://projectcontour.io/quickstart/contour.yaml \
    | sed "s|ghcr.io/projectcontour/contour:.*|cgr.dev/chainguard/contour:latest|g" \
    | kubectl apply -f -

Test it out!

You should see the following:

  • 2 Contour pods each with status Running and 1/1 Ready
  • 1+ Envoy pod(s), each with the status Running and 2/2 Ready

Now that you have installed Contour and Envoy, let’s install a web application workload and get some traffic flowing to the backend.

To install httpbin, run the following:

kubectl apply -f https://projectcontour.io/examples/httpbin.yaml

Verify the pods and services are running:

kubectl get po,svc,ing -l app=httpbin

You should see the following:

  • 3 instances of pods/httpbin, each with status Running and 1/1 Ready
  • 1 service/httpbin CLUSTER-IP listed on port 80
  • 1 Ingress on port 80

Next, we can kubectl port-forward to get traffic to Envoy:

kubectl -n projectcontour port-forward service/envoy 8888:80

In a browser or via curl, make a request to http://local.projectcontour.io:8888

curl -s http://local.projectcontour.io:8888/

Congratulations, you have installed Contour, deployed a backend application, created an Ingress to route traffic to the application, and successfully accessed the app with Contour!

For further next steps, you can also continue with official docs to play around

Last updated: 2024-06-25 00:42