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
+54-46Lines changed: 54 additions & 46 deletions
Original file line number
Diff line number
Diff line change
@@ -1,42 +1,42 @@
1
-
# Load Balancer Controller Installation
1
+
# AWS Load Balancer Controller installation
2
2
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.
3
+
The AWS 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
4
5
-
The LBC is supported by AWS. Some clusters may using legacy "in-tree" functionality to provision AWS load balancers. The AWS Load Balancer Controller should be installed instead.
5
+
The LBC is supported by AWS. Some clusters may be using the legacy "in-tree" functionality to provision AWS load balancers. The AWS Load Balancer Controller should be installed instead.
* 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.
21
+
* For IP targets, pods must have IPs from the VPC subnets. You can configure the [`amazon-vpc-cni-k8s`](https://github.com/aws/amazon-vpc-cni-k8s#readme) plugin for this purpose.
22
22
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.
23
+
### Using the Amazon EC2 instance 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), set the hop limit to 2 or higher in order to allow the LBC to perform the metadata introspection.
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`.
31
+
Instead of depending on IMDSv2, you can specify the AWS Region and the VPC via the controller flags `--aws-region` and `--aws-vpc-id`.
32
32
33
33
## Configure IAM
34
34
35
-
The controller runs on the worker nodes, so it needs access to the AWS ALB/NLB APIs via IAM permissions.
35
+
The controller runs on the worker nodes, so it needs access to the AWS ALB/NLB APIs with IAM permissions.
36
36
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.
37
+
The IAM permissions can either be setup using[IAM roles for service accounts (IRSA)](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html) or can be attached directly to the worker node IAM roles. This is the recommended method if you're using Amazon EKS. If you're using kOps or self-hosted Kubernetes, you must manually attach polices to node instances.
38
38
39
-
### Option A: IAM Roles for Service Accounts (IRSA)
39
+
### Option A: IAM roles for service accounts (IRSA)
40
40
41
41
The reference IAM policies contain the following permissive configuration:
42
42
```
@@ -50,7 +50,7 @@ The reference IAM policies contain the following permissive configuration:
50
50
},
51
51
```
52
52
53
-
We recommend to further scope down this configuration based on the VPC ID or cluster name resource tag.
53
+
We recommend further scoping down this configuration based on the VPC ID or cluster name resource tag.
54
54
55
55
Example condition for VPC ID:
56
56
```
@@ -70,28 +70,37 @@ Example condition for cluster name resource tag:
70
70
}
71
71
```
72
72
73
-
1. Create IAM OIDC provider
73
+
1. Create an IAM OIDC provider. You can skip this step if you already have one for your cluster.
74
74
```
75
75
eksctl utils associate-iam-oidc-provider \
76
76
--region <region-code> \
77
77
--cluster <your-cluster-name> \
78
78
--approve
79
79
```
80
80
81
-
1. Download IAM policy for the AWS Load Balancer Controller
81
+
2. Download an IAM policy for the LBC using one of the following commands:<p>
1. Create an IAM policy called AWSLoadBalancerControllerIAMPolicy
95
+
3. Create an IAM policy named `AWSLoadBalancerControllerIAMPolicy`. If you downloaded a different policy, replace `iam-policy` with the name of the policy that you downloaded.
*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:*
121
+
The following IAM permissions subset is for those using `TargetGroupBinding` only and don't plan to use the LBC 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 9443 from the kubernetes control plane. This is needed for webhook access.
148
+
Review the [worker nodes security group](https://docs.aws.amazon.com/eks/latest/userguide/sec-group-reqs.html) docs. Your node security group must permit incoming traffic on TCP port 9443 from the Kubernetes control plane. This is needed for webhook access.
142
149
143
150
If you use [eksctl](https://eksctl.io/usage/vpc-networking/), this is the default configuration.
144
151
145
-
## Add Controller to Cluster
152
+
## Add controller to cluster
146
153
147
-
We recommend using the Helm chart. This supports Fargate and facilitates updating the controller.
154
+
We recommend using the Helm chart to install the controller. The chart supports Fargate and facilitates updating the controller.
148
155
149
-
=== "Via Helm"
156
+
=== "Helm"
150
157
151
-
If you want to run the controller on Fargate, use the Helm chart since it does not depend on the cert-manager.
158
+
If you want to run the controller on Fargate, use the Helm chart, since it doesn't depend on the `cert-manager`.
152
159
153
-
### Detailed Instructions
154
-
Follow the instructions in [aws-load-balancer-controller](https://github.com/aws/eks-charts/tree/master/stable/aws-load-balancer-controller) helm chart.
160
+
### Detailed instructions
161
+
Follow the instructions in the [aws-load-balancer-controller](https://github.com/aws/eks-charts/tree/master/stable/aws-load-balancer-controller) Helm chart.
1. Edit the saved yaml file, go to the Deployment spec, and set the controller --cluster-name arg value to your EKS cluster name
203
+
2. Edit the saved yaml file, go to the Deployment spec, and set the controller `--cluster-name` arg value to your EKS cluster name
196
204
```
197
205
apiVersion: apps/v1
198
206
kind: Deployment
@@ -207,20 +215,20 @@ We recommend using the Helm chart. This supports Fargate and facilitates updatin
207
215
- args:
208
216
- --cluster-name=<INSERT_CLUSTER_NAME>
209
217
```
210
-
1. If you use IAM roles for service accounts, we recommend that you delete the ServiceAccount from the yaml spec. This will preserve the eksctl created iamserviceaccount if you delete the installation section from the yaml spec.
218
+
3. If you use IAM roles for service accounts, we recommend that you delete the `ServiceAccount` from the yaml spec. If you delete the installation section from the yaml spec, deleting the `ServiceAccount` preserves the `eksctl` created `iamserviceaccount`.
211
219
```
212
220
apiVersion: v1
213
221
kind: ServiceAccount
214
222
```
215
-
1. Apply the yaml file
223
+
4. Apply the yaml file
216
224
```
217
225
kubectl apply -f v2_4_7_full.yaml
218
226
```
219
-
1. Optionally download the default ingressclass and ingressclass params
227
+
5. Optionally download the default ingressclass and ingressclass params
0 commit comments