Skip to content

Commit beb89ec

Browse files
cherry pick kubernetes-sigs#3121 and update the version to 2.4.7 (kubernetes-sigs#3122)
Co-authored-by: Jim Dial <[email protected]>
1 parent 2ba14d1 commit beb89ec

File tree

1 file changed

+54
-46
lines changed

1 file changed

+54
-46
lines changed

docs/deploy/installation.md

Lines changed: 54 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
1-
# Load Balancer Controller Installation
1+
# AWS Load Balancer Controller installation
22

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.
44

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.
66

77
!!!question "Existing AWS ALB Ingress Controller users"
8-
AWS ALB Ingress controller must be uninstalled before installing AWS Load Balancer Controller.
9-
Please follow our [migration guide](upgrade/migrate_v1_v2.md) to do migration.
8+
The AWS ALB Ingress controller must be uninstalled before installing the AWS Load Balancer Controller.
9+
Please follow our [migration guide](upgrade/migrate_v1_v2.md) to do a migration.
1010

11-
## Supported Kubernetes Versions
11+
## Supported Kubernetes versions
1212
* AWS Load Balancer Controller v2.0.0~v2.1.3 requires Kubernetes 1.15+
1313
* AWS Load Balancer Controller v2.2.0~v2.3.1 requires Kubernetes 1.16-1.21
1414
* AWS Load Balancer Controller v2.4.0+ requires Kubernetes 1.19+
1515

16-
## Deployment Considerations
16+
## Deployment considerations
1717

18-
### Additional Requirements for non-EKS clusters:
18+
### Additional requirements for non-EKS clusters:
1919

2020
* 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.
2222

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.
2525

2626
You can set the IMDSv2 hop limit as follows:
2727
```
2828
aws ec2 modify-instance-metadata-options --http-put-response-hop-limit 2 --region <region> --instance-id <instance-id>
2929
```
3030

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`.
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`.
3232

3333
## Configure IAM
3434

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.
3636

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.
3838

39-
### Option A: IAM Roles for Service Accounts (IRSA)
39+
### Option A: IAM roles for service accounts (IRSA)
4040

4141
The reference IAM policies contain the following permissive configuration:
4242
```
@@ -50,7 +50,7 @@ The reference IAM policies contain the following permissive configuration:
5050
},
5151
```
5252

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.
5454

5555
Example condition for VPC ID:
5656
```
@@ -70,28 +70,37 @@ Example condition for cluster name resource tag:
7070
}
7171
```
7272

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.
7474
```
7575
eksctl utils associate-iam-oidc-provider \
7676
--region <region-code> \
7777
--cluster <your-cluster-name> \
7878
--approve
7979
```
8080
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>
82+
If your cluster is in a US Gov Cloud region:
8283
```
83-
curl -o iam-policy.json https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.4.7/docs/install/iam_policy.json
84+
curl -o iam-policy.json https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.4.7/docs/install/iam_policy_us-gov.json
85+
```
86+
If your cluster is in a China region:
87+
```
88+
curl -o iam-policy.json https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.4.7/docs/install/iam_policy_cn.json
89+
```
90+
If your cluster is in any other region:
91+
```
92+
curl -o iam-policy.json https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.4.7/docs/install/iam_policy.json
8493
```
8594
86-
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.
8796
```
8897
aws iam create-policy \
8998
--policy-name AWSLoadBalancerControllerIAMPolicy \
9099
--policy-document file://iam-policy.json
91100
```
92-
Take note of the policy ARN that is returned
101+
Take note of the policy ARN that's returned.
93102
94-
1. Create a IAM role and ServiceAccount for the AWS Load Balancer controller, use the ARN from the step above
103+
4. Create an IAM role and Kubernetes `ServiceAccount` for the LBC. Use the ARN from the previous step.
95104
```
96105
eksctl create iamserviceaccount \
97106
--cluster=<cluster-name> \
@@ -103,13 +112,13 @@ Example condition for cluster name resource tag:
103112
--approve
104113
```
105114
106-
### Option B: Attach IAM Policies to Nodes
107-
If not setting up IAM for ServiceAccount, apply the IAM policies from the following URL at minimum.
115+
### Option B: Attach IAM policies to nodes
116+
If you're not setting up IAM roles for service accounts, apply the IAM policies from the following URL at a minimum.
108117
```
109118
curl -o iam-policy.json https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.4.7/docs/install/iam_policy.json
110119
```
111120
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:*
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:
113122
114123
```
115124
{
@@ -134,32 +143,30 @@ curl -o iam-policy.json https://raw.githubusercontent.com/kubernetes-sigs/aws-lo
134143
}
135144
```
136145
146+
## Network configuration
137147
138-
139-
## Network Configuration
140-
141-
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.
142149
143150
If you use [eksctl](https://eksctl.io/usage/vpc-networking/), this is the default configuration.
144151
145-
## Add Controller to Cluster
152+
## Add controller to cluster
146153
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.
148155
149-
=== "Via Helm"
156+
=== "Helm"
150157
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`.
152159
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.
155162
156163
### Summary
157164
158-
1. Add the EKS chart repo to helm
165+
1. Add the EKS chart repo to Helm
159166
```
160167
helm repo add eks https://aws.github.io/eks-charts
161168
```
162-
1. Install the TargetGroupBinding CRDs if upgrading the chart via `helm upgrade`.
169+
2. If upgrading the chart via `helm upgrade`, install the `TargetGroupBinding` CRDs.
163170
```
164171
kubectl apply -k "github.com/aws/eks-charts/stable/aws-load-balancer-controller//crds?ref=master"
165172
```
@@ -180,19 +187,20 @@ We recommend using the Helm chart. This supports Fargate and facilitates updatin
180187
181188
182189
183-
=== "Via YAML manifests"
184-
### Install cert-manager
190+
=== "YAML manifests"<p>
191+
192+
### Install `cert-manager`
185193
186194
```
187195
kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.5.4/cert-manager.yaml
188196
```
189197
190198
### Apply YAML
191-
1. Download spec for load balancer controller.
199+
1. Download the spec for the LBC.
192200
```
193201
wget https://github.com/kubernetes-sigs/aws-load-balancer-controller/releases/download/v2.4.7/v2_4_7_full.yaml
194202
```
195-
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
196204
```
197205
apiVersion: apps/v1
198206
kind: Deployment
@@ -207,20 +215,20 @@ We recommend using the Helm chart. This supports Fargate and facilitates updatin
207215
- args:
208216
- --cluster-name=<INSERT_CLUSTER_NAME>
209217
```
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`.
211219
```
212220
apiVersion: v1
213221
kind: ServiceAccount
214222
```
215-
1. Apply the yaml file
223+
4. Apply the yaml file
216224
```
217225
kubectl apply -f v2_4_7_full.yaml
218226
```
219-
1. Optionally download the default ingressclass and ingressclass params
227+
5. Optionally download the default ingressclass and ingressclass params
220228
```
221229
wget https://github.com/kubernetes-sigs/aws-load-balancer-controller/releases/download/v2.4.7/v2_4_7_ingclass.yaml
222230
```
223-
1. Apply the ingressclass and params
231+
6. Apply the ingressclass and params
224232
```
225233
kubectl apply -f v2_4_7_ingclass.yaml
226234
```
@@ -229,4 +237,4 @@ We recommend using the Helm chart. This supports Fargate and facilitates updatin
229237
230238
The controller doesn't receive security updates automatically. You need to manually upgrade to a newer version when it becomes available.
231239
232-
This can be done using [`helm upgrade`](https://helm.sh/docs/helm/helm_upgrade/) or another strategy to manage the controller deployment.
240+
You can upgrade using [`helm upgrade`](https://helm.sh/docs/helm/helm_upgrade/) or another strategy to manage the controller deployment.

0 commit comments

Comments
 (0)