-
Notifications
You must be signed in to change notification settings - Fork 9
Local Setup
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.)
We definitely need Docker. Please install if missing.
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 is a command-line tool to manage kubernetes. If you have it installed, skip this step, otherwise please proceed with the official documentation.
Helm is a "package manager" for kubernetes, used by many kubernetes-based systems. To install it, please follow the official documentation
git clone https://github.com/k8ssandra/workshop k8ssandra-workshop
cd k8ssandra-workshop
kind create cluster --config ./kind.yaml --image kindest/node:v1.18.2
kubectl cluster-info --context kind-kind
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
Ready? Good job, let's move on! Proceed to the Step I
Got questions? Ask us using discord chat or a community forum!