LoadBalancer Service. Use this approach when you need workloads in your cluster to be reachable from outside the cluster over a public IPv4 address, and optionally a public DNS name.
One way to expose Pods on CKS to the public Internet is to use a LoadBalancer Service. These Services expose Pods to the Internet through public IPv4 addresses. You can also assign public DNS names to them.
HTTP and HTTPS quickstart
Choose the approach that matches the traffic you need to expose:- Plain TCP, or HTTP without edge TLS: use a
LoadBalancerService, which exposes a Pod over a public IPv4 address on any TCP or UDP port. Use this for plain TCP workloads such as SSH, or for HTTP services that don’t need TLS termination at the edge. TheLoadBalancerService manifest on this page covers the HTTP case: setportandtargetPortto your application’s HTTP port instead of the SSH port shown. - HTTP or HTTPS routed by hostname, with TLS termination: use a Traefik Ingress, which routes traffic by hostname with TLS termination. Traefik terminates TLS using a certificate that
cert-managerissues, so you don’t expose each backend Service directly. For setup, see Traefik and Cert-manager. To assign a stable public DNS name, see Create a public DNS name.
LoadBalancer Service.
Create a Load Balancer Service
To expose your Pods, you must create aLoadBalancer Service manifest and deploy it to your cluster. The following sections walk through each part of that process.
Create the manifest
To create a Service oftype: LoadBalancer, deploy a Service manifest onto CKS. The following sample manifest defines a LoadBalancer Service that exposes an sshd Pod on port 22:
loadbalancer-example.yaml
- The Service (
example-sshd) is configured astype: LoadBalancer. - The
coreweave-load-balancer-typeannotation ispublic.
The public address assigned to the Service comes from CoreWeave’s public LoadBalancer address pool for the Region and remains stable for the lifetime of the Service. This pool is separate from the Region’s NAT egress range, which governs only outbound traffic.
Deploy the manifest
After you save the manifest, apply it to your cluster so that CKS provisions the Load Balancer. Apply the manifest withkubectl. For example:
Locate the IPv4 address
After you deploy the Service, you need its assigned public IPv4 address to reach the Pods from outside the cluster. After you apply the manifest, usedescribe to see the deployed Service. For example:
LoadBalancer Ingress field. With this address, the Pods that the Service selects are now reachable from the public Internet on the ports that the manifest defines.
For more information, see the official Kubernetes documentation.
Choose public or private addressing
Theservice.beta.kubernetes.io/coreweave-load-balancer-type annotation controls whether the Service gets a public or a private address:
public: assigns an internet-facing public IP from the Region’s public LoadBalancer pool. Use this when external clients must reach the Service.- Annotation absent: assigns a private (RFC 1918) address. This address is reachable from within the cluster, and over a connected VPC or Direct Connect, but not from the public Internet.
internal. CoreWeave doesn’t recognize internal as a value, and a Service with that value can stay in <Pending> indefinitely. To request a private address, omit the annotation entirely.
Pin a Service to an address pool
On clusters with multiple LoadBalancer address pools, the first pool is the default and Services allocate from it automatically. To allocate from a non-default pool, add the address-pool label to the Service:pool_selector_mismatch and the condition cilium.io/IPAMRequestSatisfied: False. Add the lb.coreweave.com/address-pool label that selects the pool containing the IP.
To request a specific IP, use the Cilium annotation:
metallb.universe.tf/address-pool: public annotation. On those clusters, if the dedicated pool is exhausted, you can switch a Service to the shared pool by replacing that annotation with service.beta.kubernetes.io/coreweave-load-balancer-type: public.
LoadBalancer IP stability
A LoadBalancer Service IP is pinned for the lifetime of the Service object. The following actions release the IP, with no guarantee that you get the same address back:- Deleting the Service.
- Changing the Service type away from
LoadBalancer. - Removing the
coreweave-load-balancer-type: publicannotation from a public Service.
Layer 4 and Layer 7 traffic
CoreWeave LoadBalancer Services operate at Layer 4 (TCP and UDP). For Layer 7 features such as path-based routing or TLS termination, run an ingress controller such as Traefik behind the LoadBalancer.Troubleshoot an unreachable service
If the Service doesn’t respond after you deploy it, check the following:- No external IP yet. Run
kubectl describe services example-sshdand confirm theLoadBalancer Ingressfield shows an address. CKS assigns the address from the Region’s public LoadBalancer address pool. If the field is empty, the Load Balancer is still provisioning. Confirm theservice.beta.kubernetes.io/coreweave-load-balancer-type: publicannotation is present so the Service requests a public address. - Wrong
externalTrafficPolicy. WithexternalTrafficPolicy: Local, traffic only reaches Nodes that run a Pod the Service selects. Confirm the Serviceselectormatches your Pod labels and that at least one selected Pod is running andReady. If no selected Pod runs on a Node, that Node drops the traffic. - DNS not resolved. If you assigned a public DNS name, the fully qualified domain name (FQDN) can take time to propagate. Confirm the record resolves before you rely on it, and retrieve the allocated name from the Service status. For details, see Create a public DNS name.