Skip to content

Commit 97b3841

Browse files
geoffclineM00nF1sh
authored andcommitted
promote install instructions to top level menu item, enable mkdocs gh action (kubernetes-sigs#1681)
* refactor install instructions, add new top tab refactor to add deploy and examples top level nav * move install materials back * move how-it-works under home * update docs to ref v2.1.0 branch Co-authored-by: Yang Yang <[email protected]>
1 parent 5f383d8 commit 97b3841

File tree

15 files changed

+146
-88
lines changed

15 files changed

+146
-88
lines changed
File renamed without changes.

docs/guide/controller/configurations.md renamed to docs/deploy/configurations.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# AWS Load Balancer controller configuration options
1+
# Controller configuration options
22
This document covers configuration of the AWS Load Balancer controller
33

44
## AWS API Access
@@ -51,7 +51,8 @@ spec:
5151
- --watch-namespace=default
5252
```
5353

54-
> Currently, you can set only 1 namespace to watch in this flag. See [this Kubernetes issue](https://github.com/kubernetes/contrib/issues/847) for more details.
54+
!!!note ""
55+
Currently, you can set only 1 namespace to watch in this flag. See [this Kubernetes issue](https://github.com/kubernetes/contrib/issues/847) for more details.
5556

5657
## Controller command line flags
5758

@@ -90,5 +91,7 @@ spec:
9091
WAF Regional:^AssociateWebACL|DisassociateWebACL=0.5:1,WAF Regional:^GetWebACLForResource|ListResourcesForWebACL=1:1,WAFV2:^AssociateWebACL|DisassociateWebACL=0.5:1,WAFV2:^GetWebACLForResource|ListResourcesForWebACL=1:1
9192
```
9293
94+
AWS Web Application Firewall (WAF)
95+
9396
### Instance metadata
9497
If running on EC2, the default values are obtained from the instance metadata service.

docs/deploy/installation.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# Load Balancer Controller Installation
2+
3+
!!!warning "Existing AWS ALB Ingress Controller users"
4+
AWS ALB Ingress controller must be uninstalled before installing AWS Load Balancer controller.
5+
Please follow our [migration guide](upgrade/migrate_v1_v2.md) to do migration.
6+
7+
!!!note "Security updates"
8+
The controller doesn't receive security updates automatically. You need to manually updgrade to a newer version when it becomes available.
9+
10+
## IAM Permissions
11+
12+
#### Setup IAM role for service accounts
13+
The controller runs on the worker nodes, so it needs access to the AWS ALB/NLB resources via IAM permissions.
14+
The IAM permissions can either be setup via IAM roles for ServiceAccount or can be attached directly to the worker node IAM roles.
15+
16+
1. Create IAM OIDC provider
17+
```
18+
eksctl utils associate-iam-oidc-provider \
19+
--region <region-code> \
20+
--cluster <your-cluster-name> \
21+
--approve
22+
```
23+
24+
1. Download IAM policy for the AWS Load Balancer Controller
25+
```
26+
curl -o iam-policy.json https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.1.0/docs/install/iam_policy.json
27+
```
28+
29+
1. Create an IAM policy called AWSLoadBalancerControllerIAMPolicy
30+
```
31+
aws iam create-policy \
32+
--policy-name AWSLoadBalancerControllerIAMPolicy \
33+
--policy-document file://iam-policy.json
34+
```
35+
Take note of the policy ARN that is returned
36+
37+
1. Create a IAM role and ServiceAccount for the AWS Load Balancer controller, use the ARN from the step above
38+
```
39+
eksctl create iamserviceaccount \
40+
--cluster=<cluster-name> \
41+
--namespace=kube-system \
42+
--name=aws-load-balancer-controller \
43+
--attach-policy-arn=arn:aws:iam::<AWS_ACCOUNT_ID>:policy/AWSLoadBalancerControllerIAMPolicy \
44+
--approve
45+
```
46+
Setup IAM manually
47+
If not setting up IAM for ServiceAccount, apply the IAM policies from the following URL at minimum.
48+
```
49+
curl -o iam-policy.json https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.1.0/docs/install/iam_policy.json
50+
```
51+
## Add Controller to Cluster
52+
53+
=== "Via Helm"
54+
### Detailed Instructions
55+
Follow the instructions in [aws-load-balancer-controller](https://github.com/aws/eks-charts/tree/master/stable/aws-load-balancer-controller) helm chart.
56+
57+
### Summary
58+
59+
1. Add the EKS chart repo to helm
60+
```
61+
helm repo add eks https://aws.github.io/eks-charts
62+
```
63+
1. Install the TargetGroupBinding CRDs
64+
```
65+
kubectl apply -k "github.com/aws/eks-charts/stable/aws-load-balancer-controller//crds?ref=master"
66+
```
67+
1. Install the helm chart
68+
```
69+
helm install eks/aws-load-balancer-controller
70+
```
71+
72+
73+
74+
=== "Via YAML manifests"
75+
### Install cert-manager
76+
- For Kubernetes 1.16+:
77+
```
78+
kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.0.2/cert-manager.yaml
79+
```
80+
- For Kubernetes <1.16:
81+
```
82+
kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v1.0.2/cert-manager-legacy.yaml
83+
```
84+
85+
### Apply YAML
86+
1. Download spec for load balancer controller.
87+
```
88+
wget https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.1.0/docs/install/v2_1_0_full.yaml
89+
```
90+
1. Edit the saved yaml file, go to the Deployment spec, and set the controller --cluster-name arg value to your EKS cluster name
91+
```
92+
apiVersion: apps/v1
93+
kind: Deployment
94+
. . .
95+
name: aws-load-balancer-controller
96+
namespace: kube-system
97+
spec:
98+
. . .
99+
template:
100+
spec:
101+
containers:
102+
- args:
103+
- --cluster-name=<INSERT_CLUSTER_NAME>
104+
```
105+
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.
106+
```
107+
apiVersion: v1
108+
kind: ServiceAccount
109+
```
110+
1. Apply the yaml file
111+
```
112+
kubectl apply -f v2_1_0_full.yaml
113+
```
114+
115+
File renamed without changes.

docs/guide/upgrade/migrate_v1_v2.md renamed to docs/deploy/upgrade/migrate_v1_v2.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ It supports existing AWS resources provisioned by AWSALBIngressController(>=v1.1
3939
|--------|----------|----------|---------------------------|----------------------|
4040
|All TCP |TCP |0 - 65535 |sg-008c920b1(managed LB SG)|elbv2.k8s.aws/targetGroupBinding=shared| |
4141

42-
3. If you have used podReadinessGate feature, please refer [PodReadinessGate](../controller/pod_readiness_gate.md) for the guide about new readinessGate configuration.
42+
3. If you have used podReadinessGate feature, please refer [PodReadinessGate](../pod_readiness_gate.md) for the guide about new readinessGate configuration.
4343

4444
!!!tip "old pod readinessGate"
4545
once configured properly, AWS Load Balancer Controller will automatically inject the new format of podReadinessGates into your pods, and remove old podReadinessGates if any.
@@ -61,7 +61,7 @@ foo@bar:~$ kubectl describe deployment -n kube-system alb-ingress-controller |
6161
Existing Ingress resources do not need to be deleted.
6262

6363
3. Install new AWSLoadBalancerController
64-
1. Install AWSLoadBalancerController(v2.0.1) by following the [installation instructions](../controller/installation.md)
64+
1. Install AWSLoadBalancerController(v2.0.1) by following the [installation instructions](../installation.md)
6565
2. Grant [additional IAM policy](../../install/iam_policy_v1_to_v2_additional.json) needed for migration to the controller.
6666

6767
4. Verify all Ingresses works as expected.

docs/guide/walkthrough/echo_server.md renamed to docs/examples/echo_server.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ In this walkthrough, you'll
4040
```
4141

4242
## Setup the AWS Load Balancer controller
43-
1. Refer to the [installation instructions](../controller/installation.md) to setup the controller
43+
1. Refer to the [installation instructions](../deploy/installation.md) to setup the controller
4444

4545
1. Verify the deployment was successful and the controller started.
4646

@@ -158,7 +158,7 @@ In this walkthrough, you'll
158158
159159
An example of a subnet with the correct tags for the cluster `joshcalico` is as follows.
160160
161-
![subnet-tags](../../assets/images/subnet-tags.png)
161+
![subnet-tags](../assets/images/subnet-tags.png)
162162
163163
1. Deploy the ingress resource for echoserver
164164
File renamed without changes.

docs/guide/controller/installation.md

Lines changed: 0 additions & 65 deletions
This file was deleted.

docs/guide/ingress/annotations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ Traffic Routing can be controlled with following annotations:
185185
You must specify at least two subnets in different AZ. both subnetID or subnetName(Name tag on subnets) can be used.
186186

187187
!!!tip
188-
You can enable subnet auto discovery to avoid specify this annotation on every Ingress. See [Subnet Discovery](../controller/subnet_discovery.md) for instructions.
188+
You can enable subnet auto discovery to avoid specify this annotation on every Ingress. See [Subnet Discovery](../../deploy/subnet_discovery.md) for instructions.
189189

190190
!!!example
191191
```

docs/guide/service/annotations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Traffic Routing can be controlled with following annotations:
4444
the NLB will route traffic to. See [Network Load Balancers](https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#availability-zones) for more details.
4545

4646
!!!tip
47-
Subnets are auto-discovered if this annotation is not specified, see [Subnet Discovery](../controller/subnet_discovery.md) for further details.
47+
Subnets are auto-discovered if this annotation is not specified, see [Subnet Discovery](../../deploy/subnet_discovery.md) for further details.
4848

4949
!!!note ""
5050
You must specify at least one subnet in any of the AZs, both subnetID or subnetName(Name tag on subnets) can be used.

docs/guide/tasks/cognito_authentication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Configure Cognito for use with AWS Load Balancer Controller using the following
1919

2020
## AWS Load Balancer Controller Setup
2121

22-
Install the AWS Load Balancer Controller using the [install instructions](../controller/installation.md) with the following caveats.
22+
Install the AWS Load Balancer Controller using the [install instructions](../../deploy/installation.md) with the following caveats.
2323

2424
* When setting up IAM Role Permissions, add the `cognito-idp:DescribeUserPoolClient` permission to the example policy.
2525

docs/guide/controller/how-it-works.md renamed to docs/how-it-works.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
The following diagram details the AWS components this controller creates. It also demonstrates the route ingress traffic takes from the ALB to the Kubernetes cluster.
66

7-
![controller-design](../../assets/images/controller-design.png)
7+
![controller-design](assets/images/controller-design.png)
88

99
### Ingress Creation
1010

mkdocs.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,35 @@ repo_url: https://github.com/kubernetes-sigs/aws-alb-ingress-controller
44
strict: true
55

66
nav:
7-
- Home: index.md
7+
- Home:
8+
- Welcome: index.md
9+
- How it works: how-it-works.md
10+
- Deployment:
11+
- Installation Guide: deploy/installation.md
12+
- Configurations: deploy/configurations.md
13+
- Subnet Discovery: deploy/subnet_discovery.md
14+
- Pod Readiness Gate: deploy/pod_readiness_gate.md
15+
- Upgrade:
16+
- Migrate v1 to v2: deploy/upgrade/migrate_v1_v2.md
817
- Guide:
9-
- Controller:
10-
- Installation: guide/controller/installation.md
11-
- Configurations: guide/controller/configurations.md
12-
- Subnet Discovery: guide/controller/subnet_discovery.md
13-
- Pod Readiness Gate: guide/controller/pod_readiness_gate.md
1418
- Ingress:
1519
- Annotations: guide/ingress/annotations.md
16-
- Spec: guide/ingress/spec.md
20+
- Specification: guide/ingress/spec.md
1721
- Certificate Discovery: guide/ingress/cert_discovery.md
1822
- Service:
1923
- NLB-IP mode: guide/service/nlb_ip_mode.md
2024
- Annotations: guide/service/annotations.md
2125
- TargetGroupBinding:
2226
- TargetGroupBinding: guide/targetgroupbinding/targetgroupbinding.md
23-
- Spec: guide/targetgroupbinding/spec.md
27+
- Specification: guide/targetgroupbinding/spec.md
2428
- Tasks:
2529
- Cognito Authentication: guide/tasks/cognito_authentication.md
2630
- SSL Redirect: guide/tasks/ssl_redirect.md
27-
- Walkthrough:
28-
- EchoServer: guide/walkthrough/echo_server.md
29-
- Upgrade:
30-
- Migrate v1 to v2: guide/upgrade/migrate_v1_v2.md
31+
- Examples:
32+
- EchoServer: examples/echo_server.md
33+
34+
35+
3136
plugins:
3237
- search
3338
theme:
@@ -41,7 +46,7 @@ theme:
4146
text: Roboto
4247
code: Roboto Mono
4348
features:
44-
- tabs
49+
- navigation.tabs
4550
custom_dir: docs/theme_overrides
4651
# Extensions
4752
markdown_extensions:

0 commit comments

Comments
 (0)