About Traefik
The CoreWeave Traefik Helm chart is based on the upstream Traefik chart. The CoreWeave chart includes additional templating for configurations commonly used in CKS clusters. The chart’s default values are set to work best on the CoreWeave platform. All code examples in this repository assume the default values. If you install the chart with different namespaces or resource names, update the values to match.Configuration
The following sections describe the chart’s default Ingress behavior and how to enable TLS on Ingresses.Ingress DNS
By default, the chart applies a wildcard hostname through aservice.beta.kubernetes.io/external-hostname annotation:
*) with the appropriate domain name for your cluster. For Services that don’t route through Traefik, specific DNS hostnames still take precedence.
To retrieve the applied value at any time, use kubectl:
For more information on exposing Services, see How to: Expose a Service.
IngressRouteTCP and Kubernetes API proxy
The chart’s default values include a Traefik IngressRouteTCP TCP router for your cluster’s Kubernetes API server. This Service proxies HTTP traffic to your cluster over Direct Connect and provides TLS passthrough. To locate the hostname of this Service, run the following command:Configure client trust and authentication
The Traefik API proxy passes TLS through without terminating it, so clients connect directly to the Kubernetes API server. The API server presents a certificate signed by the cluster certificate authority (CA) and authenticates each request itself. A Managed Auth kubeconfig instead relies on a publicly trusted certificate and uses a CoreWeave API access token. If you change only the kubeconfig’sserver value, certificate verification fails with an error such as x509: certificate signed by unknown authority on Linux and Windows, or certificate is not trusted on macOS. Adding the cluster CA fixes verification, but the API server still rejects the CoreWeave API access token.
CKS publishes the cluster CA in the cluster-info ConfigMap in the kube-public namespace, which you can read without credentials. On a public cluster, read it from the unmanaged endpoint:
kubectl instead. Replace [CONTEXT] with that context’s name:
traefik-k8s hostname that uses the CA as its certificate-authority-data. Then create a context that pairs it with a user that authenticates through OIDC or an authentication webhook, such as the kubelogin user from Configure a kubectl context with kubelogin. Replace [USER] with that user’s name:
Create Ingresses with TLS
After you deploy the chart, you can use Traefik as theIngressClass for a Kubernetes Ingress with TLS. To create the TLS certificate, cert-manager uses the ClusterIssuer specified by the cert-manager.io/cluster-issuer annotation on the Ingress object.
Example chart
In this example manifest, the Ingress uses the default Let’s EncryptClusterIssuer from CoreWeave’s cert-issuer chart. You can also configure your own TLS certificate solution.
ingress-example.yaml - An example using Traefik with TLS and DNS
For more information on Traefik as a Kubernetes Ingress provider, see the official Traefik documentation.
Gateway API
The chart can also run Traefik as a Gateway API controller. When you enable the Gateway API provider, the chart creates aGatewayClass named traefik and a Gateway named traefik-gateway in the traefik namespace.
The Gateway uses the same traefik LoadBalancer Service as Ingress. Gateway API routes and Ingresses share one IP address and the cluster’s wildcard DNS name, so you can run both on the same Traefik Pods and move workloads from Ingress to Gateway API one at a time.
The Traefik version in the chart supports the Gateway API standard channel, including HTTPRoute, GRPCRoute, TLSRoute, and BackendTLSPolicy. The standard channel CRDs on this page don’t support TCPRoute with Traefik. To use TCPRoute, install the experimental channel CRDs instead and set traefik.providers.kubernetesGateway.experimentalChannel: true. For details, see the Traefik Kubernetes Gateway API provider documentation.
To follow these steps, you need kubectl and helm access to the cluster, with permissions to create cluster-scoped resources such as CRDs and the GatewayClass.
Each CKS cluster has one wildcard DNS name, and the
traefik Service claims it. Don’t install a second Gateway API controller that creates its own LoadBalancer Service with the wildcard hostname, because only one Service can hold it. The second Service reports a HostnameConflict. See Why is my Service not getting a DNS name?Install the Gateway API CRDs
Gateway API adds resource types through cluster-wide Custom Resource Definitions (CRDs) that every controller in the cluster shares. Install them before you enable the provider.- Separate install (recommended)
- Bundled with the chart
Apply the standard channel CRDs from the Gateway API release:Before you upgrade the chart, check the Requirements section of Traefik’s Kubernetes Gateway provider documentation for the Gateway API version that the new Traefik version supports, and upgrade the CRDs to match.The CRDs stay in the cluster if you later uninstall or reconfigure Traefik.If another component, such as Cilium or a service mesh, already installed a compatible Gateway API CRD bundle, skip this step. Otherwise, coordinate the CRD upgrade with the component that manages them. To check the installed bundle version, run:
Enable Gateway API support in cert-manager
As with Ingresses, cert-manager issues the TLS certificate for the Gateway from an annotation. Enable cert-manager’s Gateway API support and provide an existing issuer. The example usesletsencrypt-prod, which CoreWeave’s cert-manager chart creates when you enable the cert-issuers subchart. See Gateway API support on the cert-manager page.
The chart doesn’t automatically restart cert-manager when you change values in an existing controller configuration. After you change an existing configuration or install the CRDs after cert-manager, restart cert-manager and confirm that its gateway-shim controller is running, as described on that page.
Enable the Gateway API provider
Add the provider, certificate annotation, and listener configuration to your Traefik values file. Keep your existing chart settings, including the CRD values if you use the bundled installation. Replace[ORG-ID] and [CLUSTER-NAME] with your organization ID and cluster name:
traefik-gateway-values.yaml
- Each listener
portis a Traefik container port:8000forweband8443forwebsecure. ThetraefikService publishes them on ports80and443. The chart rejects listener ports that aren’t declared intraefik.ports. For a user-created Gateway, a listener whose port doesn’t match a configured Traefik entry point reportsAccepted=Falsewith the reasonPortUnavailable. namespacePolicy.from: Alllets routes in any namespace attach to the Gateway. By default, a Gateway accepts routes only from its own namespace.- With the
cert-manager.io/cluster-issuerannotation, cert-manager creates aCertificatefor thewebsecurelistener’s hostname and stores it in thegateway-wildcard-tlsSecret. The listener terminates TLS with that Secret. - This example requests one wildcard certificate for the Gateway listener. It covers every route hostname under
*.[ORG-ID]-[CLUSTER-NAME].coreweave.app, so routes don’t need their own certificates. For the Let’s Encrypt quota that applies to.coreweave.appcertificates, see cert-manager.
GatewayClass and programmed the Gateway:
ADDRESS is the IP address of the traefik LoadBalancer Service.
Traefik doesn’t create Pods or a Service for each Gateway. Every Gateway with
gatewayClassName: traefik configures the same Traefik Pods and reports the traefik Service’s address. Its listener ports must match Traefik’s entry points. You can create your own Gateways instead of, or in addition to, the one the chart creates. To disable the chart’s Gateway, set traefik.gateway.enabled: false.Certificate in the traefik namespace, with the same name as the Secret:
websecure listener reports ResolvedRefs: False with the reason InvalidCertificateRef. If no Certificate appears, check that cert-manager’s Gateway API support is enabled. To check the status of each listener, run:
Programmed=True:
Route traffic with an HTTPRoute
Before you create the route, deploy a backend Service namedmy-service in namespace1 that serves HTTP on port 80, or replace those values with an existing Service and namespace. Replace [ORG-ID] and [CLUSTER-NAME] in the examples with your organization ID and cluster name.
An HTTPRoute attaches to the Gateway through parentRefs and sends requests for its hostnames to a backend Service. In this example, the route sends traffic for app.[ORG-ID]-[CLUSTER-NAME].coreweave.app to the my-service Service on port 80:
httproute-example.yaml
sectionName, the route attaches to both listeners and serves HTTP and HTTPS. Because the wildcard DNS name and wildcard certificate cover the hostname, you don’t need a DNS record or a certificate for each route.
Apply the route and check that the Gateway accepted it:
Accepted=True ResolvedRefs=True. Then send a request:
Redirect HTTP to HTTPS
To serve a hostname over HTTPS only, attach one route to theweb listener that redirects requests, and another to the websecure listener that sends them to the backend. The sectionName field selects the listener:
httproute-https-redirect.yaml