From d340cf93a1920b759af03567fa2fdb4681e9b787 Mon Sep 17 00:00:00 2001 From: Christopher Negus Date: Thu, 23 Mar 2023 02:23:39 +0000 Subject: [PATCH] Formatting fixes for the docs --- docs/configure/index.md | 2 +- docs/deploy.md | 37 +++++++++++++++++++++++-------------- docs/getstarted.md | 20 ++++++++++---------- 3 files changed, 34 insertions(+), 25 deletions(-) diff --git a/docs/configure/index.md b/docs/configure/index.md index 2a3348a2..bfe9ed06 100644 --- a/docs/configure/index.md +++ b/docs/configure/index.md @@ -1,3 +1,3 @@ # Configure AWS Gateway API Controller -Refer to this document to further configure your use of the AWS Gateway API Controller. +Refer to this section to further configure your use of the AWS Gateway API Controller. The features here build on the examples shown in [Get Started Using the AWS Gateway API Controller](../getstarted.md). diff --git a/docs/deploy.md b/docs/deploy.md index 4c5ea6f9..fd42ce57 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -19,11 +19,15 @@ Run through them again for a second cluster to use with the extended example sho CLUSTER_SG=$(aws eks describe-cluster --name $CLUSTER_NAME | jq -r '.cluster.resourcesVpcConfig.clusterSecurityGroupId') aws ec2 authorize-security-group-ingress --group-id $CLUSTER_SG --cidr $MANAGED_PREFIX --protocol -1 ``` + 1. Create an IAM OIDC provider: See [Creating an IAM OIDC provider for your cluster](https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html) for details. + ```bash eksctl utils associate-iam-oidc-provider --cluster $CLUSTER_NAME --approve --region $AWS_REGION ``` + 1. Create a policy (`recommended-inline-policy.json`) in IAM with the following content that can invoke the gateway API and copy the policy arn for later use: + ```bash { "Version": "2012-10-17", @@ -47,14 +51,19 @@ Run through them again for a second cluster to use with the extended example sho --policy-document file://examples/recommended-inline-policy.json ``` 1. Create the `system` namespace: + ```bash kubectl apply -f examples/deploy-namesystem.yaml ``` + 1. Retrieve the policy ARN: + ```bash export VPCLatticeControllerIAMPolicyArn=$(aws iam list-policies --query 'Policies[?PolicyName==`VPCLatticeControllerIAMPolicy`].Arn' --output text) ``` + 1. Create an iamserviceaccount for pod level permission: + ```bash eksctl create iamserviceaccount \ --cluster=$CLUSTER_NAME \ @@ -68,21 +77,21 @@ Run through them again for a second cluster to use with the extended example sho 1. Run either `kubectl` or `helm` to deploy the controller: - ```bash - kubectl apply -f examples/deploy-v0.0.4.yaml - ``` + ```bash + kubectl apply -f examples/deploy-v0.0.4.yaml + ``` - or - - ```bash - # login to ECR - aws ecr-public get-login-password --region us-east-1 | helm registry login --username AWS --password-stdin public.ecr.aws - # Run helm with either install or upgrade - helm install gateway-api-controller \ - oci://public.ecr.aws/aws-application-networking-k8s/aws-gateway-controller-chart\ - --version=v0.0.3 \ - --set=aws.region=$AWS_REGION --set=serviceAccount.create=false --namespace system - ``` + or + + ```bash + # login to ECR + aws ecr-public get-login-password --region us-east-1 | helm registry login --username AWS --password-stdin public.ecr.aws + # Run helm with either install or upgrade + helm install gateway-api-controller \ + oci://public.ecr.aws/aws-application-networking-k8s/aws-gateway-controller-chart\ + --version=v0.0.3 \ + --set=aws.region=$AWS_REGION --set=serviceAccount.create=false --namespace system + ``` 1. Create the `amazon-vpc-lattice` GatewayClass: ```bash diff --git a/docs/getstarted.md b/docs/getstarted.md index c4d49af1..cb3e6b36 100644 --- a/docs/getstarted.md +++ b/docs/getstarted.md @@ -19,21 +19,21 @@ This example creates a single cluster in a single VPC, then configures two route **Set up Service-to-Service communications** 1. Create the Kubernetes Gateway `my-hotel`: + ```bash kubectl apply -f examples/my-hotel-gateway.yaml ``` - ***Note*** - By default, the gateway (lattice service network) is not associated with cluster's VPC. To associate a gateway (lattice service network) to VPC, `my-hotel-gateway.yaml` includes the following annotation. + ***Note***: By default, the gateway (lattice service network) is not associated with cluster's VPC. To associate a gateway (lattice service network) to VPC, `my-hotel-gateway.yaml` includes the following annotation. - - apiVersion: gateway.networking.k8s.io/v1beta1 - kind: Gateway - metadata: - name: my-hotel - annotations: - application-networking.k8s.aws/lattice-vpc-association: "true" - + ``` + apiVersion: gateway.networking.k8s.io/v1beta1 + kind: Gateway + metadata: + name: my-hotel + annotations: + application-networking.k8s.aws/lattice-vpc-association: "true" + ``` 1. Verify that `my-hotel` gateway is created (this could take about five minutes): ```bash