Skip to content

LoadBalancedWorkload

Source: src/AWS/EKS/LoadBalancedWorkload.ts

Creates a workload exposed through a Kubernetes LoadBalancer service.

This helper is the ergonomic path for the common “run a deployment and make it reachable through the EKS-managed load balancer integration” flow.

const app = yield* LoadBalancedWorkload("api", {
cluster: cluster.cluster,
namespace: "default",
containers: [
{
name: "api",
image: "nginx:latest",
ports: [{ containerPort: 8080 }],
},
],
ports: [{ port: 80, targetPort: 8080 }],
});