Single-cluster install with kustomize
This topic shows how you can use Kustomize to declaratively install and configure the K8ssandraCluster
custom resource in single-cluster local Kubernetes.
Prerequisites
If you haven’t already, see the install prerequisites.
Introduction
You can install K8ssandra Operator with Kustomize, which takes a declarative approach to configuring and deploying resources, whereas Helm takes more of an imperative approach.
Kustomize is integrated directly into kubectl
. For example, kubectl apply -k
essentially runs kustomize build
over the specified directory followed by kubectl apply
. See this topic for details on the integration of Kustomize into kubectl
.
K8ssandra Operator uses some features of Kustomize that are only available in kubectl
v1.23 or later. For this reason the following examples use kustomize build <dir> | kubectl apply -f -
.
Single-cluster local Kubernetes
Let’s look at a single-cluster install to demonstrate that while K8ssandra Operator is designed for multi-cluster use, it can be used in a single cluster without any extra configuration.
Create kind cluster
Run setup-kind-multicluster.sh
as follows:
Install Cert Manager
We need to first install Cert Manager because it is a dependency of cass-operator:
Install K8ssandra Operator
Install with (replace X.X.X
with the release you which to install):
Verify that the K8SSANDRA_CONTROL_PLANE
environment variable is set to true
:
Deploy a K8ssandraCluster
Now we will deploy a K8ssandraCluster that consists of a 3-node Cassandra cluster and a Stargate node.
Confirm that the resource has been created:
Monitor the status of the deployment, eventually resulting in all the resources being in
the Ready
state:
Next steps
- See other local install options, including K8ssandra Operator in multi-cluster Kubernetes.
- Also, dig into the K8ssandra Operator components.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.