Skip to content

Commit 6bd9c4b

Browse files
authored
update aws deployment docs with helm instructions (#6457)
1 parent ddb9cb0 commit 6bd9c4b

File tree

1 file changed

+56
-7
lines changed

1 file changed

+56
-7
lines changed

docs/content/installation/nic-images/use-aws-image.md

Lines changed: 56 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Follow this guide to set up NGINX Ingress Controller using AWS Marketplace. This
1515

1616
{{< important >}}This guide focuses on EKS version 1.30. For EKS versions below 1.30, you'll need to adjust security settings in the NGINX Pod to ensure compatibility with marketplace images. Make sure you're using updated versions of `eksctl` and the AWS CLI.{{< /important >}}
1717

18-
{{< note >}}AWS Region US-West-1 doesn't support NGINX Ingress Controller.{{</note>}}
18+
{{< note >}}See the `AWS Marketplace Metering Service` section of the [AWS Marketplace documentation](https://docs.aws.amazon.com/general/latest/gr/aws-marketplace.html) for regions where NGINX Ingress Controller is supported.{{</note>}}
1919

2020
## Instructions
2121

@@ -27,17 +27,19 @@ Follow this guide to set up NGINX Ingress Controller using AWS Marketplace. This
2727

2828
{{< important >}}Associating your AWS EKS cluster with an OIDC provider is a prerequisite for creating your IAM service account.{{< /important >}}
2929

30-
## Step-by-step instructions using eksctl
30+
## Use eksctl
31+
{{< note >}}Make sure you have an operational EKS cluster and that the namespace for your NGINX Ingress Controller is set up. If you don't have an EKS cluster yet, you'll need to create one.{{< /note >}}
3132

32-
Make sure you have an operational EKS cluster and that the namespace for your NGINX Ingress Controller is set up. If you don't have an EKS cluster yet, you'll need to create one.
33+
{{<tabs name="install-aws">}}
34+
{{%tab name="manifests"%}}
3335

3436
1. Associate your EKS cluster with an OIDC IAM provider. Use your specific `--cluster <name`> and `--region <region>` values.
3537

3638
``` shell
3739
eksctl utils associate-iam-oidc-provider --region=us-east-1 --cluster=my-cluster --approve
3840
```
3941

40-
2. Create an IAM role and a service account for your cluster. Replace `--name <name>`, `--namespace <name>`, and `--region <region>` with your values.
42+
1. Create an IAM role and a service account for your cluster. Replace `--name <name>`, `--namespace <name>`, and `--region <region>` with your values.
4143

4244
``` shell
4345
eksctl create iamserviceaccount --name nginx-ingress --namespace nginx-ingress --cluster my-cluster --region us-east-1 --attach-policy-arn arn:aws:iam::aws:policy/AWSMarketplaceMeteringRegisterUsage --approve
@@ -78,12 +80,59 @@ Make sure you have an operational EKS cluster and that the namespace for your NG
7880
apiGroup: rbac.authorization.k8s.io
7981
```
8082
81-
3. Sign in to the AWS ECR registry that specified in the instructions on the [AWS Marketplace portal](https://aws.amazon.com/marketplace/pp/prodview-fx3faxl7zqeau?sr=0-1&ref_=beagle&applicationId=AWSMPContessa).
83+
1. Sign in to the AWS ECR registry that specified in the instructions on the [AWS Marketplace portal](https://aws.amazon.com/marketplace/pp/prodview-fx3faxl7zqeau?sr=0-1&ref_=beagle&applicationId=AWSMPContessa).
8284
8385
{{< img title="ECR pull instructions for NGINX Ingress Controller" src="./img/ecr-pull-instructions.png" >}}
8486
87+
1. Update the image in the _nginx-plus-ingress.yaml_ manifest.
88+
89+
{{%/tab%}}
90+
91+
{{%tab name="helm"%}}
92+
93+
1. Associate your EKS cluster with an OIDC IAM provider. Use your specific `--cluster <name`> and `--region <region>` values.
94+
95+
``` shell
96+
eksctl utils associate-iam-oidc-provider --region=us-east-1 --cluster=my-cluster --approve
97+
```
98+
99+
1. Create an IAM role and a service account for your cluster. Replace `--name <name>`, `--namespace <name>`, `--region <region>`, `--cluster <name>` and `--role-name <name>` with your values.
100+
101+
``` shell
102+
eksctl create iamserviceaccount --name nginx-ingress --namespace nginx-ingress --cluster my-cluster --region us-east-1 --attach-policy-arn arn:aws:iam::aws:policy/AWSMarketplaceMeteringRegisterUsage --role-only --role-name my-cluster-sa --approve
103+
```
104+
105+
This step creates the IAM role with the required policy, which we will later refer to in the helm values. For additional details, consult the [AWS documentation](https://docs.aws.amazon.com/eks/latest/userguide/create-service-account-iam-policy-and-role.html).
106+
85107
<br>
86108
87-
{{< tip >}}For help with credentials, AWS Labs offers a credential helper. Check out [their GitHub repository](https://github.com/awslabs/amazon-ecr-credential-helper) for setup instructions.{{< /tip >}}
109+
Ensure the service account name matches the one in your _values.yaml_ file for helm deployment.
110+
Ensure the EKS `role-arn` matches the service account annotation in your _values.yaml_ file for helm deployment. You can use this command to retrieve the `role-arn`
111+
``` shell
112+
aws iam list-roles | jq -r --arg role "my-cluster-sa" '.Roles[] | select(.RoleName==$role) | .Arn'
113+
```
114+
115+
Here's what a sample _values.yaml_ file might look like:
116+
117+
``` yaml
118+
controller:
119+
nginxplus: true
120+
image:
121+
repository: 709825985650.dkr.ecr.us-east-1.amazonaws.com/nginx/nginx-plus-ingress
122+
tag: "{{< nic-version >}}-mktpl"
123+
serviceAccount:
124+
annotations:
125+
eks.amazonaws.com/role-arn: arn:aws:iam::0123456789:role/my-cluster-sa
126+
name: nginx-ingress
127+
```
128+
129+
1. Sign in to the AWS ECR registry that specified in the instructions on the [AWS Marketplace portal](https://aws.amazon.com/marketplace/pp/prodview-fx3faxl7zqeau?sr=0-1&ref_=beagle&applicationId=AWSMPContessa).
130+
131+
{{< img title="ECR pull instructions for NGINX Ingress Controller" src="./img/ecr-pull-instructions.png" >}}
132+
133+
{{%/tab%}}
134+
{{</tabs>}}
135+
136+
{{< tip >}}For help with credentials, AWS Labs offers a credential helper. Check out [their GitHub repository](https://github.com/awslabs/amazon-ecr-credential-helper) for setup instructions.{{< /tip >}}
88137

89-
4. Update the image in the _nginx-plus-ingress.yaml_ manifest.
138+
For options to customize your resources, see our [Configuration documentation]({{< relref "configuration/" >}}).

0 commit comments

Comments
 (0)