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.
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 address assigned to the Service is the next available address from CoreWeave’s default egress IP addresses for each Region.
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.