Post

Setup AWS APP Mesh on EKS

To install AWS App Mesh in your Amazon EKS cluster, you can follow these step-by-step instructions:

  1. Connect with AWS Account:
    • Use the AWS CLI to configure your AWS access key, secret access key, and region:
      1
      
      aws configure
      
  2. Create an EKS Cluster:
    • If you don’t have an existing EKS cluster, create one using eksctl create cluster[1].
  3. Connect with EKS Cluster:
    • Update the Kubeconfig to connect with the EKS cluster:
      1
      
      aws eks update-kubeconfig --name mesh-test-cluster
      
  4. Add eks-charts Repository to Helm:
    • Install the App Mesh Kubernetes custom resource definitions (CRD) using kubectl apply:
      1
      
      kubectl apply -k "https://github.com/aws/eks-charts/stable/appmesh-controller/crds?ref=master"
      
  5. Create appmesh-system Namespace:
    • Create a namespace for the App Mesh controller:
      1
      
      kubectl create ns appmesh-system
      
  6. Create an OpenID Connect (OIDC) Identity Provider:
    • Create an OIDC identity provider for your cluster using eksctl utils associate-iam-oidc-provider[1].
  7. Create an IAM Role:
    • Create an IAM role, attach the AWSAppMeshFullAccess and AWSCloudMapFullAccess policies, and bind it to the appmesh-controller Kubernetes service account:
      1
      2
      3
      4
      5
      6
      7
      
      eksctl create iamserviceaccount \
        --cluster mesh-test-cluster \
        --namespace appmesh-system \
        --name appmesh-controller \
        --attach-policy-arn arn:aws:iam::aws:policy/AWSCloudMapFullAccess,arn:aws:iam::aws:policy/AWSAppMeshFullAccess \
        --override-existing-serviceaccounts \
        --approve
      
  8. Deploy the App Mesh Controller:
    • Deploy the App Mesh controller using Helm:
      1
      2
      3
      4
      5
      
      helm upgrade -i appmesh-controller eks/appmesh-controller \
        --namespace appmesh-system \
        --set region=ap-south-1 \
        --set serviceAccount.create=false \
        --set serviceAccount.name=appmesh-controller
      
  9. Verify Controller Pod Running:
    • Verify that the Controller pod is running:
      1
      
      kubectl get pods -n appmesh-system
      
  10. Create Mesh:
    • Create a mesh using the App Mesh controller. You can create a mesh from AWS CLI, AWS Console, or Kubernetes native YAML[1].

By following these steps, you can successfully install AWS App Mesh in your Amazon EKS cluster.

Citations: [1] https://blog.knoldus.com/how-to-setup-aws-app-mesh-with-eks/ [2] https://docs.aws.amazon.com/app-mesh/latest/userguide/getting-started-kubernetes.html [3] https://aws.amazon.com/blogs/compute/learning-aws-app-mesh/ [4] https://aws.amazon.com/blogs/containers/getting-started-with-app-mesh-and-eks/ [5] https://archive.eksworkshop.com/intermediate/330_app_mesh/

This post is licensed under CC BY 4.0 by the author.