-
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.)
✅ Step 1: Docker
We need Docker. Please install if missing.
✅ Step 2: Kubernetes cluster
STOP: Resource requirements for local clusters are laid out here.
If you have an existing Kubernetes cluster with the resource requirements, you are good to go. If you don't have one, you can install Civo.
There are primarily two options -- Kind or Minikube as outlined below.
✅ Step 2a: Kubernetes cluster - Kind
Please install kind so we can have a test environment for you to play with.
✅ Step 2b: Kubernetes cluster - Minikube
An alternate local cluster is Minikube. Go ahead and install Minkube.
✅ Step 3: kubectl
command
Kubectl is a command-line tool to manage kubernetes. If you have it installed, skip this step, otherwise please proceed with the official documentation.
✅ Step 4: kubectx
command
kubectx
is a handy tool to be able to switch contexts as needed and to verify the context. Please go ahead and install kubectx.
✅ Step 5: watch
command
Install watch command on mac, if required using the following command
brew install watch
✅ Step 6: helm
command
Helm is a "package manager" for kubernetes, used by many kubernetes-based systems. To install it, please follow the official documentation
✅ Step 7: Setup Kubernetes Cluster
If planning on using a local cluster, you've 2 options - kind
and minikube
.
✅ Step 7a: Start Your Kind Cluster
kind create cluster --config ./kind.yaml --image kindest/node:v1.18.2
kubectl cluster-info --context kind-kind
✅ Step 7b: If planning to use Minikube, start Your Minikube Cluster
minikube start --cpus=4 --memory='8128m'
✅ Step 8: 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 PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
civo-volume csi.civo.com Delete WaitForFirstConsumer false 2d21h
local-path (default) rancher.io/local-path Delete WaitForFirstConsumer false 2d21h
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
Should have the correct output.
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
civo-volume csi.civo.com Delete WaitForFirstConsumer false 2d21h
local-path (default) rancher.io/local-path Delete WaitForFirstConsumer false 2d21h
Ready? Good job, let's move on! Proceed to the Step I
Got questions? Ask us using discord chat or a community forum!