Skip to content

Latest commit

 

History

History
19 lines (16 loc) · 1.22 KB

README.md

File metadata and controls

19 lines (16 loc) · 1.22 KB

Deploy to EKS cluster from CodeBuild

  1. In the buildspec.yaml, change the kubectl binary version and EKS cluster region and Cluster name to match with your EKS cluster (currently it uses EKS v1.15)

  2. Allow CodeBuild Service IAM role in aws-auth ConfigMap

    • kubectl -n kube-system edit cm aws-auth
    • Add CodeBuild service IAM role under mapRoles section:
mapRoles: |
    - groups:
      - system:masters
      rolearn: arn:aws:iam:123456789012:role/KubernetesRole  #<---- codebuild is assuming this IAM role
      username: KubernetesRole
  1. Create a CodeBuild project with following configs to deploy the pod/application on every push/pull request