You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/deploy/configurations.md
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -93,6 +93,7 @@ Currently, you can set only 1 namespace to watch in this flag. See [this Kuberne
93
93
|kubeconfig | string | in-cluster config | Path to the kubeconfig file containing authorization and API server information |
94
94
|leader-election-id | string | aws-load-balancer-controller-leader | Name of the leader election ID to use for this controller |
95
95
|leader-election-namespace | string | | Name of the leader election ID to use for this controller |
96
+
|load-balancer-class | string | service.k8s.aws/nlb| Name of the load balancer class specified in service `spec.loadBalancerClass` reconciled by this controller |
96
97
|log-level | string | info | Set the controller log level - info, debug |
97
98
|metrics-bind-addr | string | :8080 | The address the metric endpoint binds to |
98
99
|service-max-concurrent-reconciles | int | 3 | Maximum number of concurrently running reconcile loops for service |
@@ -140,5 +141,6 @@ They are a set of kye=value pairs that describe AWS load balance controller feat
140
141
141
142
|Features-gate Supported Key | Type | Default Value | Description |
Copy file name to clipboardExpand all lines: docs/deploy/installation.md
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,9 @@
19
19
- Ensure subnets are tagged appropriately for auto-discovery to work
20
20
- For IP targets, pods must have IPs from the VPC subnets. You can configure `amazon-vpc-cni-k8s` plugin for this purpose.
21
21
22
+
!!!note "security group configuration"
23
+
If you do not use `eksctl`, you need to ensure worker nodes security group permit access to TCP port 9443 from the kubernetes control plane for the webhook access.
24
+
22
25
## Using metadata server version 2 (IMDSv2)
23
26
If you are using the IMDSv2 you must set the hop limit to 2 or higher in order to allow the AWS Load Balancer Controller to perform the metadata introspection. Otherwise you have to manually specify the AWS region and the VPC via the controller flags `--aws-region` and `--aws-vpc-id`.
1. Edit the `--domain-filter` flag to include your hosted zone(s)
@@ -294,7 +294,7 @@ In this walkthrough, you'll
294
294
follow below steps if you want to use kube2iam to provide the AWS credentials
295
295
296
296
1. configure the proper policy
297
-
The policy to be used can be fetched from https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.0.0/docs/install/iam_policy.json
297
+
The policy to be used can be fetched from https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.4.0/docs/install/iam_policy.json
298
298
299
299
1. configure the proper role and create the trust relationship
300
300
You have to find which role is associated with your K8S nodes. Once you found take note of the full arn:
|[service.beta.kubernetes.io/aws-load-balancer-internal](#lb-internal)| boolean | false | deprecated, in favor of [aws-load-balancer-scheme](#lb-scheme)|
@@ -83,9 +83,13 @@ Traffic Routing can be controlled with following annotations:
83
83
- `instance` mode will route traffic to all EC2 instances within cluster on the [NodePort](https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport) opened for your service.
84
84
85
85
!!!note ""
86
-
service must be of type `NodePort` or `LoadBalancer` for `instance` targets
86
+
- service must be of type `NodePort` or `LoadBalancer` for `instance` targets
87
+
- for k8s 1.22 and later if `spec.allocateLoadBalancerNodePorts` is set to `false`, `NodePort` must be allocated manually
87
88
88
-
- `ip` mode will route traffic directly to the pod IP.
89
+
!!!note "default value"
90
+
If you configure `spec.loadBalancerClass`, the controller defaults to `instance` target type
91
+
92
+
- `ip` mode will route traffic directly to the pod IP.
89
93
90
94
!!!note ""
91
95
network plugin must use native AWS VPC networking configuration for pod IP, for example [Amazon VPC CNI plugin](https://github.com/aws/amazon-vpc-cni-k8s).
Copy file name to clipboardExpand all lines: docs/guide/service/nlb.md
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -59,6 +59,8 @@ NLB IP mode is determined based on the `service.beta.kubernetes.io/aws-load-bala
59
59
60
60
### Instance mode
61
61
Similar to the IP mode, the instance mode is based on the annotation `service.beta.kubernetes.io/aws-load-balancer-nlb-target-type` value `instance`. Here is a sample manifest snippet:
62
+
!!!warning "NodePort allocation"
63
+
k8s version 1.22 and later support disabling NodePort allocation by setting the service field `spec.allocateLoadBalancerNodePorts` to `false`. If the NodePort is not allocated for a service port, the controller will fail to reconcile instance mode NLB.
62
64
63
65
```yaml
64
66
metadata:
@@ -95,3 +97,10 @@ security groups, the controller expects only one security group tagged with the
95
97
| `kubernetes.io/cluster/${cluster-name}` | `owned` or `shared` |
96
98
97
99
`${cluster-name}`is the name of the kubernetes cluster
100
+
101
+
## Load Balancer Class
102
+
The AWS Load Balancer Controller supports `LoadBalancerClass` starting v2.4.0 release on k8s 1.22 or later clusters. The LoadBalancerClass provides a cloudprovider agnostic way of offloading the load balancer reconciliation to an external controller. This controller uses the `service.k8s.aws/nlb` as the default class,
103
+
you can configure it to a different value via the controller flag `--load-balancer-class`.
104
+
105
+
When you specify the `spec.loadBalancerClass` on a service of type `LoadBalancer` during service creation, this controller creates an internal NLB with instance targets by default. If the LoadBalancerClass is not the configured for this controller, this controller ignores the service resource completely regardless of the annotation
106
+
`service.beta.kubernetes.io/aws-load-balancer-type`. If you modify the service, with `spec.loadBalancerClass`, type from `LoadBalancer` to anything else, the controller will cleanup the NLB.
0 commit comments