We will using the Amazon Elastic Container Registry to store the docker images.
We will using the Amazon Elastic Kubernetes Service for deploying the Application.
- Create new AWS IAM user for doing the docker push and deployment.
- Following IAM policy is required.
IAM Role | Purpose |
---|---|
AmazonEC2ContainerRegistryPowerUser |
Required for docker push and pull |
eks:DescribeCluster |
Required for deployment |
eks:ListClusters |
Required for deployment |
- Download the AWS credentials for the newly created users as file.Example the AWS_SHARED_CREDENTIALS_FILE will look like this.
[default]
aws_access_key_id = xXxXxXxXxXxXxXxXxXxX
aws_secret_access_key = xXxXxXxXxXxXxXx/xXxXxXxXxXxXxXxXxXxXxXxX
- Create jenkins Secret file with the AWS credentials created above.
In the ID field, specify a meaningful credential ID value - for example, jenkins-user-for-xyz-artifact-repository. You can use upper- or lower-case letters for the credential ID, as well as any valid separator character. However, for the benefit of all users on your Jenkins instance, it is best to use a single and consistent convention for specifying credential IDs. Note: This field is optional. If you do not specify its value, Jenkins assigns a globally unique ID (GUID) value for the credential ID. Bear in mind that once a credential ID is set, it can no longer be changed.
- Make a note of the jenkins secrets, which we will be using going forward.
- Install Helms in Amazon Elastic Kubernetes cluster.