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/installation.md
+78-59Lines changed: 78 additions & 59 deletions
Original file line number
Diff line number
Diff line change
@@ -1,72 +1,74 @@
1
1
# Load Balancer Controller Installation
2
2
3
-
## Kubernetes version requirements
3
+
The Load Balancer controller (LBC) provisions AWS Network Load Balancer (NLB) and Application Load Balancer (ALB) resources. The LBC watches for new service or ingress kubernetes resources, and configures AWS resources.
4
+
5
+
The LBC is supported by AWS. Some clusters may using legeacy "in-tree" functionality to provision AWS load balancers. The AWS Load Balancer Controller should be installed instead.
AWS ALB Ingress controller must be uninstalled before installing AWS Load Balancer controller.
10
-
Please follow our [migration guide](upgrade/migrate_v1_v2.md) to do migration.
16
+
## Deployment Considerations
11
17
12
-
!!!note "Security updates"
13
-
The controller doesn't receive security updates automatically. You need to manually upgrade to a newer version when it becomes available.
18
+
### Additional Requirements for non-EKS clusters:
14
19
15
-
!!!note "non-EKS cluster"
16
-
You can run the controller on a non-EKS cluster, for example kops or vanilla k8s. Here are the things to consider -
20
+
* Ensure subnets are tagged appropriately for auto-discovery to work
21
+
* For IP targets, pods must have IPs from the VPC subnets. You can configure `amazon-vpc-cni-k8s` plugin for this purpose.
17
22
18
-
- In lieu of IAM for service account, you will have to manually attach the IAM permissions to your worker nodes IAM roles
19
-
- Ensure subnets are tagged appropriately for auto-discovery to work
20
-
- For IP targets, pods must have IPs from the VPC subnets. You can configure `amazon-vpc-cni-k8s` plugin for this purpose.
23
+
### Using metadata server version 2 (IMDSv2)
24
+
If you are using the [IMDSv2](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html) you must set the hop limit to 2 or higher in order to allow the AWS Load Balancer Controller to perform the metadata introspection.
21
25
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.
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`.
31
+
Instead of depending on IMDSv2, you alternatively may specify the AWS region and the VPC via the controller flags `--aws-region` and `--aws-vpc-id`.
The controller runs on the worker nodes, so it needs access to the AWS ALB/NLB APIs via IAM permissions.
34
36
35
-
##IAM Permissions
37
+
The IAM permissions can either be setup via [IAM roles for ServiceAccount (IRSA)](https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/setting-up-enable-IAM.html) or can be attached directly to the worker node IAM roles. If you are using kops or vanilla k8s, polices must be manually attached to node instances.
36
38
37
-
#### Setup IAM role for service accounts
38
-
The controller runs on the worker nodes, so it needs access to the AWS ALB/NLB resources via IAM permissions.
39
-
The IAM permissions can either be setup via IAM roles for ServiceAccount or can be attached directly to the worker node IAM roles.
39
+
### Option A: IAM Roles for Service Accounts (IRSA)
40
40
41
-
!!!warning "Permissions with the least privileges"
42
-
The reference IAM policies contain the following permissive configuration:
43
-
```
44
-
{
45
-
"Effect": "Allow",
46
-
"Action": [
47
-
"ec2:AuthorizeSecurityGroupIngress",
48
-
"ec2:RevokeSecurityGroupIngress"
49
-
],
50
-
"Resource": "*"
51
-
},
52
-
```
53
-
We recommend to further scope down this configuration based on the VPC ID. Replace REGION, ACCOUNT and VPC-ID with appropriate values
OR restrict access to the security groups tagged for the particular k8s cluster. Replace CLUSTER-NAME with the name of your k8s cluster and add it to the above IAM permissions.
##### IAM permission subset for those who use *TargetGroupBinding* only and don't plan to use the AWS Load Balancer Controller to manage security group rules:
112
+
*IAM permission subset for those who use *TargetGroupBinding* only and don't plan to use the AWS Load Balancer Controller to manage security group rules:*
Review the [worker nodes security group](https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html) docs. The node security group must permit incoming traffic on TCP port 9943 from the kubernetes control plane. This is needed for webhook access.
142
+
143
+
If you use [eksctl](https://eksctl.io/usage/vpc-networking/), this is the default configuration.
144
+
133
145
## Add Controller to Cluster
134
146
135
-
!!!note "Use Fargate"
136
-
If you want to run the controller on Fargate, use Helm chart since it does not depend on the cert-manager.
147
+
We recommend using the Helm chart. This supports Fargate and facilitates updating the controller.
137
148
138
149
=== "Via Helm"
139
150
151
+
If you want to run the controller on Fargate, use the Helm chart since it does not depend on the cert-manager.
152
+
140
153
### Detailed Instructions
141
154
Follow the instructions in [aws-load-balancer-controller](https://github.com/aws/eks-charts/tree/master/stable/aws-load-balancer-controller) helm chart.
The `helm install` command automatically applies the CRDs, but `helm upgrade` doesn't.
156
170
157
-
!!!tip
158
-
Only run one of the two following `helm install` commands depending on whether or not your cluster uses IAM roles for service accounts.
159
171
160
-
1. Install the helm chart if using IAM roles for service accounts. **NOTE** you need to specify both of the chart values `serviceAccount.create=false` and `serviceAccount.name=aws-load-balancer-controller`
0 commit comments