Contour — High-Performance Kubernetes Ingress Controller Using Envoy
Route traffic into Kubernetes clusters with Contour. Built on Envoy proxy, it provides a powerful HTTPProxy CRD for advanced routing, TLS delegation, and rate limiting beyond standard Ingress.
Agent 可直接安装
这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。
npx -y tokrepo@latest install e916ebd5-3939-11f1-9bc6-00163e2b0d79 --target codex先 dry-run 确认安装计划,再运行此命令。
What it is
Contour is a Kubernetes ingress controller that uses Envoy proxy as its data plane. It provides a custom HTTPProxy CRD that goes beyond standard Ingress with features like TLS delegation, rate limiting, and weighted routing.
Contour targets platform engineers running Kubernetes who need more routing control than the standard Ingress resource provides, without the complexity of a full service mesh like Istio.
How it saves time or tokens
Contour provides advanced routing features through a single CRD instead of requiring annotations, config maps, or multiple resources. TLS certificate delegation lets teams manage their own certificates without cluster-admin access. This reduces operational overhead and support tickets.
How to use
- Install Contour on your cluster:
# kubectl quickstart
kubectl apply -f https://projectcontour.io/quickstart/contour.yaml
# Or with Helm
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install contour bitnami/contour -n projectcontour --create-namespace
- Verify pods are running:
kubectl get pods -n projectcontour.
- Create HTTPProxy resources to route traffic to your services.
Example
# HTTPProxy with TLS and weighted routing
apiVersion: projectcontour.io/v1
kind: HTTPProxy
metadata:
name: my-app
spec:
virtualhost:
fqdn: app.example.com
tls:
secretName: app-tls
routes:
- conditions:
- prefix: /
services:
- name: app-v1
port: 80
weight: 90
- name: app-v2
port: 80
weight: 10
Related on TokRepo
- DevOps Tools -- Kubernetes and infrastructure tooling
- Self-Hosted Tools -- Self-hosted infrastructure components
Common pitfalls
- Contour requires Envoy pods running alongside it. Ensure sufficient cluster resources for both Contour control plane and Envoy data plane pods.
- HTTPProxy and standard Ingress resources can conflict if both are applied to the same host. Use one or the other per domain.
- TLS certificate delegation requires the TLSCertificateDelegation resource to be created in the certificate namespace first.
常见问题
Contour uses Envoy as its proxy (high performance, xDS configuration) while NGINX Ingress uses NGINX. Contour provides HTTPProxy CRD for multi-team delegation and advanced routing. NGINX Ingress uses annotations for configuration.
HTTPProxy is a Contour-specific custom resource that extends beyond standard Kubernetes Ingress. It supports route delegation across namespaces, weighted backends, TLS passthrough, rate limiting, and header-based routing in a single resource.
Yes. Contour processes both standard Ingress resources and HTTPProxy CRDs. However, avoid applying both to the same hostname to prevent routing conflicts.
Yes. Contour supports both local and global rate limiting through the HTTPProxy spec. Local rate limiting is configured per-route. Global rate limiting requires an external rate limit service.
Yes. Contour is a CNCF incubating project maintained by VMware and the broader community. It follows the CNCF governance model.
引用来源 (3)
- Contour GitHub— Contour is a Kubernetes ingress controller using Envoy proxy
- Project Contour Docs— Contour documentation and HTTPProxy reference
- Envoy Documentation— Envoy proxy architecture and xDS API
讨论
相关资产
Envoy Proxy — Cloud-Native High-Performance Service Proxy
Envoy is a cloud-native high-performance edge, middle, and service proxy. Originally built at Lyft, now a CNCF graduated project. The data plane behind Istio, AWS App Mesh, and many service mesh implementations. Written in C++ for maximum performance.
ZeroMQ — High-Performance Asynchronous Messaging Library
ZeroMQ (0MQ) is a high-performance asynchronous messaging library for distributed applications. It provides socket-like abstractions for message passing patterns — pub/sub, request/reply, push/pull — without the complexity of a full message broker.
Apache Dubbo — High-Performance Java RPC Framework
A guide to Apache Dubbo, the high-performance RPC framework for building scalable microservices with service discovery, load balancing, and traffic management.
Echo — High Performance Minimalist Go Web Framework
Echo is a high performance, minimalist Go web framework. Clean API, automatic TLS, HTTP/2, data binding, middleware, and group routing. A strong alternative to Gin with excellent documentation and built-in features.