Skip to content

Local Setup

Aleks Volochnev edited this page May 4, 2021 · 12 revisions

We will need some tools, you may have some of them installed already. Please install any missing tools.

(You may also find the K8ssandra Getting Started guide useful.)

Docker

We definitely need Docker. Please install if missing.

Kind

We need a kubernetes cluster. If you have one, you are good to go. If you don't have, please install kind so we can have a test environment for you to play with. You can use another tool like minikube but the workshop setup is tested and supported for kind only.

Kubectl

Kubectl is a command-line tool to manage kubernetes. If you have it installed, skip this step, otherwise please proceed with the official documentation.

Helm

Helm is a "package manager" for kubernetes, used by many kubernetes-based systems. To install it, please follow the official documentation

Clone the Workshop Repository

git clone https://github.com/k8ssandra/workshop k8ssandra-workshop

Start Your Kind Cluster

cd k8ssandra-workshop
kind create cluster --config ./kind.yaml --image kindest/node:v1.18.2
kubectl cluster-info --context kind-kind

Validate the available Kubernetes StorageClasses

Your K8s instance must support a storage class with a VOLUMEBINDINGMODE of WaitForFirstConsumer.

To list the available K8s storage classes for your K8s instance:

kubectl get storageclasses

Output:

NAME standard (default)
PROVISIONER k8s.io/minikube-hostpath                         
RECLAIMPOLICY Delete
VOLUMEBINDINGMODE Immediate
ALLOWVOLUMEEXPANSION false
AGE 2m25s

If you don’t have a storage class with a VOLUMEBINDINGMODE of WaitForFirstConsumer as in the Minikube example above, you can install the Rancher Local Path Provisioner:

kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml

Output:

namespace/local-path-storage created
serviceaccount/local-path-provisioner-service-account created
clusterrole.rbac.authorization.k8s.io/local-path-provisioner-role created
clusterrolebinding.rbac.authorization.k8s.io/local-path-provisioner-bind created
deployment.apps/local-path-provisioner created
storageclass.storage.k8s.io/local-path created
configmap/local-path-config created

Rechecking the available storage classes, you should see that a new local-path storage class is available with the required VOLUMEBINDINGMODE of WaitForFirstConsumer:

kubectl get storageclasses
Output:

NAME local-path standard (default)
PROVISIONER rancher.io/local-path k8s.io/minikube-hostpath
RECLAIMPOLICY Delete Delete
VOLUMEBINDINGMOD WaitForFirstConsumer Immediate
ALLOWVOLUMEEXPANSION false false
AGE 3s 39s

Next Step

Ready? Good job, let's move on! Proceed to the Step I