In this step, we'll create a Kubernetes cluster consisting of the master node, some worker nodes and an ingress.
NOTE: In this scenario, we are simulating a full Kubernetes cluster running a Cassandra cluster and a REST service all on a Katacoda VM! This is a significant load, so some of the later steps may take some time to complete. Please be patient.
KinD to create the Kubernetes cluster named cassandra-kub-cluster.
KinDis Kubernetes running inside a Docker container. As you know, most people use Kubernetes to manage systems of Docker containers. So,
KinDis a Docker container that runs Kubernetes to manage other Docker containers - it's a bit recursive.
KinDso we can create a many-node Kubernetes cluster on a single machine.
KinDis great because it's relatively light-weight, easy to install and easy to use.
We've already installed
KinDfor you. For your reference, here are the commands we used to install
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
kind create cluster --name cassandra-kub-cluster --config kind-config.yaml
NOTE: You can check out any of the configuration files in the editor on the right. To open a file just click on its name. But, be aware that changes to the file save automatically, so be careful when reviewing files not to make inadvertent changes.
Next, we'll add an ingress to the Kubernetes cluster. An ingress allows us to access the nodes in the cluster from outside the cluster.
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/kind/deploy.yaml echo "$(tput setaf 2)Waiting for ingress to fully deploy...$(tput sgr0)" kubectl wait --namespace ingress-nginx \ --for=condition=ready pod \ --selector=app.kubernetes.io/component=controller \ --timeout=200s
Your cluster should be up and running. Let's take a look.
kubectl cluster-info --context kind-cassandra-kub-cluster