Skip to content

Commit 836eec0

Browse files
Merge pull request #208 from linode/shared-ip
[feat] - add support for cilium-backed loadbalancers
2 parents 72421ec + 74db96c commit 836eec0

17 files changed

+1371
-191
lines changed

README.md

+45-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,13 @@ Kubernetes 1.9+
2929
## Usage
3030

3131
### LoadBalancer Services
32-
Kubernetes Services of type `LoadBalancer` will be served through a [Linode NodeBalancer](https://www.linode.com/nodebalancers) which the Cloud Controller Manager will provision on demand. For general feature and usage notes, refer to the [Getting Started with Linode NodeBalancers](https://www.linode.com/docs/platform/nodebalancer/getting-started-with-nodebalancers/) guide.
32+
Kubernetes Services of type `LoadBalancer` will be served through a [Linode NodeBalancer](https://www.linode.com/nodebalancers) by default which the Cloud Controller Manager will provision on demand.
33+
For general feature and usage notes, refer to the [Getting Started with Linode NodeBalancers](https://www.linode.com/docs/platform/nodebalancer/getting-started-with-nodebalancers/) guide.
34+
35+
#### Using IP Sharing instead of NodeBalancers
36+
Alternatively, the Linode CCM can integrate with [Cilium's BGP Control Plane](https://docs.cilium.io/en/stable/network/bgp-control-plane/)
37+
to perform load-balancing via IP sharing on labeled Nodes. This option does not create a backing NodeBalancer and instead
38+
provisions a new IP on an ip-holder Nanode to share for the desired region. See [Shared IP LoadBalancing](#shared-ip-load-balancing).
3339

3440
#### Annotations
3541
The Linode CCM accepts several annotations which affect the properties of the underlying NodeBalancer deployment.
@@ -78,6 +84,44 @@ Key | Values | Default | Description
7884
`proxy-protocol` | `none`, `v1`, `v2` | `none` | Specifies whether to use a version of Proxy Protocol on the underlying NodeBalancer. Overwrites `default-proxy-protocol`.
7985
`tls-secret-name` | string | | Specifies a secret to use for TLS. The secret type should be `kubernetes.io/tls`.
8086

87+
#### Shared IP Load-Balancing
88+
**NOTE:** This feature requires contacting [Customer Support](https://www.linode.com/support/contact/) to enable provisioning additional IPs.
89+
90+
Services of `type: LoadBalancer` can receive an external IP not backed by a NodeBalancer if `--bgp-node-selector` is set on the Linode CCM and `--load-balancer-type` is set to `cilium-bgp`. Additionally, the `LINODE_URL` environment variable in the linode CCM needs to be set to "https://api.linode.com/v4beta" for IP sharing to work.
91+
92+
This feature requires the Kubernetes cluster to be using [Cilium](https://cilium.io/) as the CNI with the `bgp-control-plane` feature enabled.
93+
94+
##### Example Daemonset configuration:
95+
96+
```
97+
apiVersion: apps/v1
98+
kind: DaemonSet
99+
metadata:
100+
name: ccm-linode
101+
namespace: kube-system
102+
spec:
103+
template:
104+
spec:
105+
containers:
106+
- image: linode/linode-cloud-controller-manager:latest
107+
name: ccm-linode
108+
env:
109+
- name: LINODE_URL
110+
value: https://api.linode.com/v4beta
111+
args:
112+
- --bgp-node-selector=cilium-bgp-peering=true
113+
- --load-balancer-type=cilium-bgp
114+
...
115+
```
116+
117+
##### Example Helm chart configuration:
118+
119+
```
120+
sharedIPLoadBalancing:
121+
loadBalancerType: cilium-bgp
122+
bgpNodeSelector: cilium-bgp-peering=true
123+
```
124+
81125
#### Firewalls
82126
Firewall rules can be applied to the CCM Managed NodeBalancers in two distinct ways.
83127

cloud/annotations/annotations.go

+2
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,6 @@ const (
3131

3232
AnnLinodeNodePrivateIP = "node.k8s.linode.com/private-ip"
3333
AnnLinodeHostUUID = "node.k8s.linode.com/host-uuid"
34+
35+
AnnLinodeNodeIPSharingUpdated = "node.k8s.linode.com/ip-sharing-updated"
3436
)

0 commit comments

Comments
 (0)