Build Cloud-Native apps with Apache Cassandra

GOT QUESTIONS from the Workshop? You're in the right place! Post a question here and we'll get you answers.

Click here for Week 8 Materials and Homework.

Follow us on Eventbrite to get notified when new workshops are scheduled!


question

Erick Ramirez avatar image
Erick Ramirez asked ·

How do I setup KinD on Ubuntu to run the Kubernetes cass-operator?

Which packages do I need to install on Ubuntu to try running the cass-operator?

cass-operatorkubernetesworkshop-faq
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

Here is a step-by-step procedure to get an Ubuntu 18.04 machine setup so you can start learning Kubernetes and try out the DataStax Cassandra k8s operator.

Install Docker Engine

Docker is an open-source platform that allows developers to easily package/deploy/run software applications in self-contained packages called containers which can run anywhere. Docker containers provide another level of abstraction in that the containers share the operating system. In contrast, a virtual machine (VM) has both the OS and applications on shared hardware.

STEP D1 - Remove old versions of Docker if they've previously been installed:

$ sudo apt-get remove docker docker-engine docker.io containerd runc

STEP D2 - Install packages that allow APT to use HTTPS:

$ sudo apt-get update
$ sudo apt-get install -y \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common

STEP D3 - Add Docker's GPG key:

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

STEP D4 - Add the Docker repository:

$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"

STEP D5 - Install the Docker engine:

$ sudo apt-get update
$ sudo apt-get install -y docker-ce docker-ce-cli containerd.io

STEP D6 - Add your login to the Docker group:

$ sudo usermod -aG docker $USER

STEP D7 - Logout of your SSH session and log back in for the changes to take effect.

STEP D8 - Verify the engine is installed correctly:

$ docker run hello-world

For detailed installation info, see Install Docker Engine on Ubuntu.

Install Docker Compose

Docker Compose is a tool for configuring an app's services with a YAML file to define and run multi-container Docker applications.

STEP C1 - Download a copy of Docker Compose:

$ sudo curl -L "https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

STEP C2 - Make the app executable:

$ sudo chmod +x /usr/local/bin/docker-compose

STEP C3 - Test the installation:

$ docker-compose --version
docker-compose version 1.26.0, build d4451659

For detailed installation info, see Install Docker Compose.

Install kubectl

The Kubernetes command-line tool allows you to deploy and manage Kubernetes clusters.

STEP T1 - Download kubectl:

$ sudo curl -L "https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl" -o /usr/local/bin/kubectl

STEP T2 - Make the app executable:

$ sudo chmod +x /usr/local/bin/kubectl

STEP T3 - Test the installation:

$ kubectl version --short --client
Client Version: v1.18.3

For detailed installation info, see Install and Set Up kubectl.

Install KinD

Kubernetes-in-Docker (KinD) is a tool for running local Kubernetes clusters using Docker container "nodes".

STEP K1 - Download KinD:

$ sudo curl -L "https://kind.sigs.k8s.io/dl/v0.8.1/kind-$(uname)-amd64" -o /usr/local/bin/kind

STEP K2 - Make the app executable:

$ sudo chmod +x /usr/local/bin/kind

STEP T3 - Test the installation:

$ kind get clusters
No kind clusters found.

If you got to this point, CONGRATULATIONS! Your Ubuntu machine is now ready to try out the DataStax Cassandra k8s operator.

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.