Difficulty: Beginner
Estimated Time: 15 minutes

In the previous scenarios, you learned a lot about how K8ssandra makes things easy. But, if you really want to make things easy, let DataStax run K8ssandra for you by using Astra.

Astra is DataStax Cassandra-as-a-service offering - it makes your life easy. You will need a free account to complete this scenario. You can get your account at astra.datastax.com.

In this scenario, we will:

  • Connect to Astra using Astra Service Broker
  • Provision an Astra database
  • Deploy the example Pet Clinic app using Astra
  • Delete the provisioned database

Let's get started!

This scenario showed you how to use Astra Service Broker.

In this scenario, we:

  • Connected to Astra using Astra Service Broker
  • Provisioned an Astra database
  • Deployed the example Pet Clinic app using Astra
  • Deleted the provisioned database

Astra makes it so easy to use Cassandra!

Introducing Astra Service Broker

Step 1 of 6

Set up the environment

In this first step, we'll get set up by creating a Kubernetes cluster for the Pet Clinic app. This step amounts to letting us do the work for you. But, get used to it! Using Astra is all about letting somebody else do the work for you!

Here are the specific pieces we are setting up:

  1. kubectl
    What is kubectl?
    kubectl is the command line interface to Kubernetes. It is a very versatile command with many sub-commands and options. Read more here.
  2. KinD
    What is KinD?
    KinD is development tool we are using to create a Kubernetes cluster running inside a Docker container. As you know, most people use Kubernetes to manage systems of Docker containers. So, KinD is a Docker container that runs Kubernetes to manage other Docker containers - it's a bit recursive.

    We use KinD so we can create a many-node Kubernetes cluster on a single machine. KinD is great because it's relatively light-weight, easy to install and easy to use.

    For your reference, here are the commands we used to install KinD.

    curl -Lo ./kind https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-$(uname)-amd64 chmod +x ./kind mv ./kind /usr/local/bin/kind

    Read more here.
  3. Helm
    What is Helm?
    Helm is a package manager (like apt or yum) for Kubernetes. Helm allows you to install and update Kubernetes applications. Helm uses charts. A chart is a specification file we use to tell Helm how to do the installation. Helm downloads the charts from a Helm repo. You can read more here.
  4. Two-node Kubernetes cluster using KinD
    Why do we need a two-node Kubernetes cluster?
    We're setting up one Kubernetes node for the Pet Clinic front-end process and a second node for the Pet Clinic back-end process. It's only two worker nodes, but this step can take a bit of time, so please be patient.
  5. Nginx ingress controller
    What is an ingress and how does it fit into the Kubernetes architecture?
    An ingress provides access from outside a Kubernetes cluster to the components inside the cluster. The controller we are deploying manages instances of ingresses. We'll deploy an instance of an ingress when we install the app.

    An ingress usually sits in front of a Kubernetes service.
    As a brief refresher, the Kubernetes architecture consists of:
    • Containers - usually Docker containers that provide an isolated environment for a program
    • Pods - encapsulate one or more containers
    • Deployments - encapsulate the replication of pods
    • Services - often work as load balancers for a deployment of pods
    • Nodes - machines for hosting Pods

    Here's a diagram of these components that shows the position of the ingress. Note that we left out the nodes because the diagram gets too cluttered, but you can imagine that Kubernetes maps the various components to nodes/machines within the cluster (you can click on the image to enlarge it).

    Kubernetes Architecture

It's a fair amount of work to configure and deploy all the resources necessary for this scenario, so please be patient as it completes.

When all five installation steps are complete, you can proceed to the next step.

Woot! We have a Kubernetes cluster running.