title | weight |
---|---|
Additional AWS Integrations |
50 |
In the following module, you will complete the outcomes listed below:
- Create a managed Amazon MemoryDB for Redis Cluster using the ACK MemoryDB Controller
- The ACK service controller for Amazon MemoryDB for Redis lets you manage Amazon MemoryDB Cluster directly from Kubernetes.
- AWS Controllers for Kubernetes, or ACK, is a powerful tool that lets you directly manage AWS services from Kubernetes. ACK makes it simple to build scalable and highly-available Kubernetes applications that utilize AWS services, providing a consistent Kubernetes interface for AWS, regardless of the AWS service API.
- An EKS Cluster with Kubernetes version 1.18 or higher
- Setup the Amazon VPC Container Network Interface (CNI) plugin for Kubernetes for the EKS Cluster.
- AWS IAM permissions to create roles and attach policies to roles.
- Installed the following tools on the client machine used to access your Kubernetes cluster:
- AWS CLI - A command line tool for interacting with AWS services.
- kubectl - A command line tool for working with Kubernetes clusters.
- eksctl - A command line tool for working with EKS clusters.
- Helm 3.8+ - A tool for installing and managing Kubernetes applications.
If you've followed this workshop all the way through, all of the prerequisite have been met. From here, you will only need to use the AWS Cloud9 IDE!
Start by accessing the Cloud9 IDE.
In the menu on the left of this screen click Open AWS console to launch the AWS account for this workshop.
Access the AWS Cloud9 service by searching for it in the menu bar at the top of the screen:
When the main Cloud9 screen opens, click on Open under Cloud9 IDE
Once the IDE has loaded, we recommend you use the + button and select New Terminal to open a new full screen terminal window.
You can close the smaller terminal window at the bottom if you'd like. Welcome to Cloud9!
For Workshops at AWS Events
::::expand{header="For Workshops at AWS Events"}
The install script will:
-
Install the MemoryDB Helm chart
-
Setup IAM Roles for Service Accounts (IRSA)
- IRSA is a system that automates the provisioning and rotation of IAM temporary credentials (called a Web Identity) that a Kubernetes ServiceAccount can use to call AWS API
-
Create the Amazon MemoryDB Subnet Group and Cluster
-
Fetch the install-ack-sc-memdb.sh script from the Cloud9 Terminal:
curl ':assetUrl{path="install-ack-sc-memdb.sh" source=s3}' --output ~/install-ack-sc-memdb.sh
::::
For Use Outside AWS Events
::::expand{header="For Use Outside AWS Events"}
The install script will:
-
Install the MemoryDB Helm chart
-
Setup IAM Roles for Service Accounts (IRSA)
- IRSA is a system that automates the provisioning and rotation of IAM temporary credentials (called a Web Identity) that a Kubernetes ServiceAccount can use to call AWS API
-
Create the Amazon MemoryDB Subnet Group and Cluster
-
Fetch the install-ack-sc-memdb.sh script from GitHub:
curl https://raw.githubusercontent.com/aws-samples/rancher-on-aws-workshop/main/assets/install-ack-sc-memdb.sh --output ~/install-ack-sc-memdb.sh
You can upload files directly to your Cloud9 environment using drag and drop
- Click File in the top left of the Cloud9 environment
- Click Upload Local Files...
- Drag and drop the eks-cluster.yml and env-setup.sh files into the Upload Files pop-up window
- Verify File upload
Though files upload to the environment directory, it's somewhat more straightforward to work in the home directory.
- Run copy command in the Cloud9 terminal:
cd
cp environment/install-acl-sc-memdb.sh .
::::
- Run install-ack-sc-memdb.sh:
cd
. install-ack-sc-memdb.sh
Note: Cluster creation can take up to 25 minutes
We're done! We created a managed Amazon MemoryDB for a Redis Cluster using the ACK MemoryDB Controller. Next, we will wrap up with the Conclusion section.