-
Notifications
You must be signed in to change notification settings - Fork 96
Add blog local-cloud-controller-manager-for-load-balancers #954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rfranzke
wants to merge
3
commits into
master
Choose a base branch
from
blog/2026-04-29-local-cloud-controller-manager-for-load-balancers
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
website/blog/2026/04/04-29-local-cloud-controller-manager-for-load-balancers.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| --- | ||
| title: "Local cloud-controller-manager for Load Balancers" | ||
| linkTitle: "Local cloud-controller-manager for Load Balancers" | ||
| newsSubtitle: April 29, 2026 | ||
| publishdate: 2026-04-29 | ||
| authors: | ||
| - avatar: https://avatars.githubusercontent.com/u/46341950?v=4 | ||
| email: timebertt@gmail.com | ||
| login: timebertt | ||
| name: Tim Ebert | ||
| tags: | ||
| - extensions | ||
| - feature-announcement | ||
| - networking | ||
| aliases: ["/blog/2026/04/29/local-cloud-controller-manager-for-load-balancers"] | ||
| --- | ||
|
|
||
| Gardener's local development setup now includes a proper cloud-controller-manager that implements `LoadBalancer` services dynamically — replacing the previous hard-coded port mapping hacks and enabling load balancers in local shoot clusters for the first time. | ||
|
|
||
| ## The Problem | ||
|
|
||
| The previous implementation of load balancers in the local setup relied on a service controller in `gardener-extension-provider-local` that patched services to well-known node ports statically mapped on the kind container. This approach was: | ||
|
|
||
| - **Inflexible** — only pre-configured services could get a load balancer; adding new ones required code changes. | ||
| - **Kind-cluster only** — load balancers in local shoot clusters were not supported at all. | ||
| - **Hard to maintain** — hard-coded port mappings and static provisioning made the setup brittle and difficult to extend. | ||
|
|
||
| ## The New Approach | ||
|
|
||
| The new `cloud-controller-manager-local` draws inspiration from [cloud-provider-kind](https://github.com/kubernetes-sigs/cloud-provider-kind) by the Kubernetes SIG. It uses the standard Kubernetes cloud-provider library to implement a proper service controller that dynamically provisions load balancers. | ||
|
|
||
| Here's how it works: | ||
|
|
||
| 1. **Loopback IP range** — During kind cluster creation, a range of 32 external IPs is configured as loopback device aliases on the host machine. | ||
| 2. **Docker socket mounting** — The cloud-controller-manager mounts the Docker socket and creates dedicated Envoy containers for each `LoadBalancer` service. | ||
| 3. **Dynamic port mapping** — Each Envoy container binds to an available loopback IP and forwards traffic to the service's node ports on the kind cluster nodes. | ||
| 4. **Envoy with dynamic config** — Envoy is configured with file-based dynamic resources, allowing backends to be updated when nodes are added or removed. | ||
|
|
||
| The cloud-controller-manager is deployed in two places: | ||
|
|
||
| - In the `kube-system` namespace of the kind cluster itself (for infrastructure-level services like the Gardener API server ingress). | ||
| - In each shoot control plane namespace as part of the `ControlPlane` reconciliation of `gardener-extension-provider-local`. | ||
|
|
||
| ## Load Balancers in Shoots | ||
|
|
||
| With the cloud-controller-manager also running for shoots, `LoadBalancer` services in local shoot clusters work for the first time. Since shoot nodes aren't directly reachable from the Envoy containers, additional IP routes are configured to route traffic via the kind nodes to reach the shoot worker nodes. | ||
|
|
||
| This means developers can now test load balancer behavior in shoots locally — including features like `externalTrafficPolicy: Local` — without needing a cloud provider. | ||
|
|
||
| ## Links | ||
|
|
||
| - [Recording (demo starts at 23:36)](https://youtu.be/xUINvwIt9Kk?t=1416) | ||
| - [PR: Implement cloud-controller-manager-local with support for load balancers](https://github.com/gardener/gardener/pull/14415) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.