Skip to content

Latest commit

 

History

History
150 lines (92 loc) · 5.2 KB

File metadata and controls

150 lines (92 loc) · 5.2 KB
title weight
Additional AWS Integrations
50

In the following module, you will complete the outcomes listed below:

  1. 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.

AWS Controllers for Kubernetes (ACK) - Amazon MemoryDB for Redis

Prerequisites

  • 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!

Step 1: Access the 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.

workshop-studio-console

Access the AWS Cloud9 service by searching for it in the menu bar at the top of the screen:

aws-console-search

When the main Cloud9 screen opens, click on Open under Cloud9 IDE

aws-console-cloud9

Once the IDE has loaded, we recommend you use the + button and select New Terminal to open a new full screen terminal window.

cloud9-dashboard

You can close the smaller terminal window at the bottom if you'd like. Welcome to Cloud9!

cloud9-new-terminal

Step 2: Create the Amazon MemoryDB for Redis Cluster

For Workshops at AWS Events

::::expand{header="For Workshops at AWS Events"}

Download the install-ack-sc-memdb.sh script

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

cloud9-ackScript-download

::::

For Use Outside AWS Events

::::expand{header="For Use Outside AWS Events"}

Download the install-ack-sc-memdb.sh script

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...

cloud9-setupScript-download

  • Drag and drop the eks-cluster.yml and env-setup.sh files into the Upload Files pop-up window

cloud9-setupScript-download

  • Verify File upload

cloud9-setupScript-download

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 .

cloud9-setupScript-download

::::

Run the install ACK script

  • Run install-ack-sc-memdb.sh:
cd
. install-ack-sc-memdb.sh

cloud9-ackScript-run

cloud-ackScript-completed

Note: Cluster creation can take up to 25 minutes

Completed!

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.