Prerequisites for connecting from Amazon EKS to Amazon Keyspaces
Create the following Amazon resources before you can begin with the tutorial
Before you start this tutorial, follow the Amazon setup instructions in Accessing Amazon Keyspaces (for Apache Cassandra). These steps include signing up for Amazon and creating an Amazon Identity and Access Management (IAM) principal with access to Amazon Keyspaces.
Create an Amazon Keyspaces keyspace with the name
aws
and a table with the nameuser
that you can write to from the containerized application running in Amazon EKS later in this tutorial. You can do this either with the Amazon CLI or usingcqlsh
.Create an Amazon EKS cluster with a Fargate - Linux node type. Fargate is a serverless compute engine that lets you deploy Kubernetes Pods without managing Amazon Amazon EC2 instances. To follow this tutorial without having to update the cluster name in all the example commands, create a cluster with the name
my-eks-cluster
following the instructions at Getting started with Amazon EKS –eksctl
in the Amazon EKS User Guide. When your cluster is created, verify that your nodes and the two default Pods are running and healthy. You can do so with the following command.kubectl get pods -A -o wide
You should see something similar to this output.
NAMESPACE NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES kube-system coredns-1234567890-abcde 1/1 Running 0 18m 192.0.2.0 fargate-ip-192-0-2-0.region-code.compute.internal <none> <none> kube-system coredns-1234567890-12345 1/1 Running 0 18m 192.0.2.1 fargate-ip-192-0-2-1.region-code.compute.internal <none> <none>
Install Docker. For instructions on how to install Docker on an Amazon EC2 instance, see Install Docker in the Amazon Elastic Container Registry User Guide.
Docker is available for many different operating systems, including most modern Linux distributions, like Ubuntu, and even macOS and Windows. For more information about how to install Docker on your particular operating system, go to the Docker installation guide
. Create an Amazon ECR repository. Amazon ECR is an Amazon managed container image registry service that you can use with your preferred CLI to push, pull, and manage Docker images. For more information about Amazon ECR repositories, see the Amazon Elastic Container Registry User Guide. You can use the following command to create a repository with the name
my-ecr-repository
.aws ecr create-repository --repository-name
my-ecr-repository
After completing the prerequisite steps, proceed to Step 1: Configure the Amazon EKS cluster and setup IAM permissions.