Following the indications found here: Single-cluster install with kustomize | K8ssandra, Apache Cassandra on Kubernetes
I’m trying to deploy a K8ssandraCluster but I get ERROR
Installed K8ssandra Operator :
root@vmi1231861:~# kustomize build "github.com/k8ssandra/k8ssandra-operator/config/deployments/control-plane?ref=v1.5.2" | kubectl apply --server-side -f -
# Warning: 'patchesStrategicMerge' is deprecated. Please use 'patches' instead. Run 'kustomize edit fix' to update your Kustomization automatically.
# Warning: 'vars' is deprecated. Please use 'replacements' instead. [EXPERIMENTAL] Run 'kustomize edit fix' to update your Kustomization automatically.
# Warning: 'patchesStrategicMerge' is deprecated. Please use 'patches' instead. Run 'kustomize edit fix' to update your Kustomization automatically.
# Warning: 'patchesJson6902' is deprecated. Please use 'patches' instead. Run 'kustomize edit fix' to update your Kustomization automatically.
# Warning: 'bases' is deprecated. Please use 'resources' instead. Run 'kustomize edit fix' to update your Kustomization automatically.
# Warning: 'patchesStrategicMerge' is deprecated. Please use 'patches' instead. Run 'kustomize edit fix' to update your Kustomization automatically.
# Warning: 'patchesJson6902' is deprecated. Please use 'patches' instead. Run 'kustomize edit fix' to update your Kustomization automatically.
# Warning: 'patchesStrategicMerge' is deprecated. Please use 'patches' instead. Run 'kustomize edit fix' to update your Kustomization automatically.
# Warning: 'vars' is deprecated. Please use 'replacements' instead. [EXPERIMENTAL] Run 'kustomize edit fix' to update your Kustomization automatically.
# Warning: 'patchesStrategicMerge' is deprecated. Please use 'patches' instead. Run 'kustomize edit fix' to update your Kustomization automatically.
namespace/k8ssandra-operator serverside-applied
customresourcedefinition.apiextensions.k8s.io/cassandrabackups.medusa.k8ssandra.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/cassandradatacenters.cassandra.datastax.com serverside-applied
customresourcedefinition.apiextensions.k8s.io/cassandrarestores.medusa.k8ssandra.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/cassandratasks.control.k8ssandra.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/clientconfigs.config.k8ssandra.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/k8ssandraclusters.k8ssandra.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/k8ssandratasks.control.k8ssandra.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/medusabackupjobs.medusa.k8ssandra.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/medusabackups.medusa.k8ssandra.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/medusabackupschedules.medusa.k8ssandra.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/medusarestorejobs.medusa.k8ssandra.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/medusatasks.medusa.k8ssandra.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/reapers.reaper.k8ssandra.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/replicatedsecrets.replication.k8ssandra.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/stargates.stargate.k8ssandra.io serverside-applied
serviceaccount/cass-operator-controller-manager serverside-applied
serviceaccount/k8ssandra-operator serverside-applied
role.rbac.authorization.k8s.io/cass-operator-leader-election-role serverside-applied
role.rbac.authorization.k8s.io/cass-operator-manager-role serverside-applied
role.rbac.authorization.k8s.io/k8ssandra-operator serverside-applied
role.rbac.authorization.k8s.io/leader-election-role serverside-applied
clusterrole.rbac.authorization.k8s.io/cass-operator-manager-role serverside-applied
rolebinding.rbac.authorization.k8s.io/cass-operator-leader-election-rolebinding serverside-applied
rolebinding.rbac.authorization.k8s.io/cass-operator-manager-rolebinding serverside-applied
rolebinding.rbac.authorization.k8s.io/k8ssandra-operator serverside-applied
rolebinding.rbac.authorization.k8s.io/leader-election-rolebinding serverside-applied
clusterrolebinding.rbac.authorization.k8s.io/cass-operator-manager-res-rolebinding serverside-applied
configmap/cass-operator-manager-config serverside-applied
configmap/manager-config serverside-applied
secret/k8ssandra-operator-token serverside-applied
service/cass-operator-webhook-service serverside-applied
service/k8ssandra-operator-webhook-service serverside-applied
deployment.apps/cass-operator-controller-manager serverside-applied
deployment.apps/k8ssandra-operator serverside-applied
certificate.cert-manager.io/cass-operator-serving-cert serverside-applied
certificate.cert-manager.io/k8ssandra-operator-serving-cert serverside-applied
issuer.cert-manager.io/cass-operator-selfsigned-issuer serverside-applied
issuer.cert-manager.io/k8ssandra-operator-selfsigned-issuer serverside-applied
validatingwebhookconfiguration.admissionregistration.k8s.io/cass-operator-validating-webhook-configuration serverside-applied
validatingwebhookconfiguration.admissionregistration.k8s.io/k8ssandra-operator-validating-webhook-configuration serverside-applied
Setting K8ssandraCluster :
root@vmi1231861:~# cat <<EOF | kubectl -n k8ssandra-operator apply -f -
apiVersion: k8ssandra.io/v1alpha1
kind: K8ssandraCluster
metadata:
name: demo
spec:
cassandra:
serverVersion: "4.0.3"
datacenters:
- metadata:
name: dc1
size: 3
storageConfig:
cassandraDataVolumeClaimSpec:
storageClassName: standard
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
config:
jvmOptions:
heapSize: 512M
stargate:
size: 1
heapSize: 256M
EOF
k8ssandracluster.k8ssandra.io/demo created
But when trying to Deploy K8ssandraCluster I’m getting ERROR
:
root@vmi1231861:~# kubectl -n k8ssandra-operator get k8ssandraclusters
NAME ERROR
demo None
root@vmi1231861:~# kubectl -n k8ssandra-operator describe K8ssandraCluster demo
Name: demo
Namespace: k8ssandra-operator
Labels: <none>
Annotations: k8ssandra.io/initial-system-replication: {"dc1":3}
API Version: k8ssandra.io/v1alpha1
Kind: K8ssandraCluster
Metadata:
Creation Timestamp: 2023-03-08T09:15:51Z
Finalizers:
k8ssandracluster.k8ssandra.io/finalizer
Generation: 2
Managed Fields:
API Version: k8ssandra.io/v1alpha1
Fields Type: FieldsV1
fieldsV1:
f:metadata:
f:annotations:
.:
f:kubectl.kubernetes.io/last-applied-configuration:
f:spec:
.:
f:auth:
f:cassandra:
.:
f:datacenters:
f:jmxInitContainerImage:
.:
f:name:
f:registry:
f:tag:
f:perNodeConfigInitContainerImage:
f:serverType:
f:serverVersion:
f:secretsProvider:
Manager: kubectl-client-side-apply
Operation: Update
Time: 2023-03-08T09:15:51Z
API Version: k8ssandra.io/v1alpha1
Fields Type: FieldsV1
fieldsV1:
f:metadata:
f:annotations:
f:k8ssandra.io/initial-system-replication:
f:finalizers:
.:
v:"k8ssandracluster.k8ssandra.io/finalizer":
f:spec:
f:cassandra:
f:superuserSecretRef:
Manager: manager
Operation: Update
Time: 2023-03-08T09:15:51Z
API Version: k8ssandra.io/v1alpha1
Fields Type: FieldsV1
fieldsV1:
f:status:
.:
f:conditions:
f:datacenters:
.:
f:dc1:
.:
f:cassandra:
.:
f:cassandraOperatorProgress:
f:conditions:
f:datacenterName:
f:lastServerNodeStarted:
f:nodeStatuses:
.:
f:demo-dc1-default-sts-0:
.:
f:hostID:
f:demo-dc1-default-sts-1:
.:
f:hostID:
f:demo-dc1-default-sts-2:
.:
f:hostID:
f:observedGeneration:
f:quietPeriod:
f:superUserUpserted:
f:usersUpserted:
f:stargate:
.:
f:availableReplicas:
f:conditions:
f:deploymentRefs:
f:progress:
f:readyReplicas:
f:readyReplicasRatio:
f:replicas:
f:serviceRef:
f:updatedReplicas:
f:error:
Manager: manager
Operation: Update
Subresource: status
Time: 2023-03-08T09:22:22Z
Resource Version: 12773
UID: 86044015-d3b7-4a0a-9655-2e5c4dee082e
Spec:
Auth: true
Cassandra:
Datacenters:
Config:
Jvm Options:
Gc: G1GC
Heap Size: 512M
Jmx Init Container Image:
Name: busybox
Registry: docker.io
Tag: 1.34.1
Metadata:
Name: dc1
Per Node Config Init Container Image: mikefarah/yq:4
Size: 3
Stargate:
Allow Stargate On Data Nodes: false
Container Image:
Registry: docker.io
Repository: stargateio
Tag: v1.0.67
Heap Size: 256M
Secrets Provider: internal
Service Account: default
Size: 1
Stopped: false
Storage Config:
Cassandra Data Volume Claim Spec:
Access Modes:
ReadWriteOnce
Resources:
Requests:
Storage: 5Gi
Storage Class Name: standard
Jmx Init Container Image:
Name: busybox
Registry: docker.io
Tag: 1.34.1
Per Node Config Init Container Image: mikefarah/yq:4
Server Type: cassandra
Server Version: 4.0.3
Superuser Secret Ref:
Name: demo-superuser
Secrets Provider: internal
Status:
Conditions:
Last Transition Time: 2023-03-08T09:21:06Z
Status: True
Type: CassandraInitialized
Datacenters:
dc1:
Cassandra:
Cassandra Operator Progress: Ready
Conditions:
Last Transition Time: 2023-03-08T09:18:09Z
Message:
Reason:
Status: True
Type: Healthy
Last Transition Time: 2023-03-08T09:21:04Z
Message:
Reason:
Status: False
Type: Stopped
Last Transition Time: 2023-03-08T09:21:04Z
Message:
Reason:
Status: False
Type: ReplacingNodes
Last Transition Time: 2023-03-08T09:21:04Z
Message:
Reason:
Status: False
Type: Updating
Last Transition Time: 2023-03-08T09:21:04Z
Message:
Reason:
Status: False
Type: RollingRestart
Last Transition Time: 2023-03-08T09:21:04Z
Message:
Reason:
Status: False
Type: Resuming
Last Transition Time: 2023-03-08T09:21:04Z
Message:
Reason:
Status: False
Type: ScalingDown
Last Transition Time: 2023-03-08T09:21:04Z
Message:
Reason:
Status: True
Type: Valid
Last Transition Time: 2023-03-08T09:21:05Z
Message:
Reason:
Status: True
Type: Initialized
Last Transition Time: 2023-03-08T09:21:05Z
Message:
Reason:
Status: True
Type: Ready
Datacenter Name:
Last Server Node Started: 2023-03-08T09:19:31Z
Node Statuses:
demo-dc1-default-sts-0:
Host ID: ba284c01-deb8-47b8-8f2f-b8d1c67abe96
demo-dc1-default-sts-1:
Host ID: 5c48bb71-f80f-4571-8556-ab546c7e2a00
demo-dc1-default-sts-2:
Host ID: 193798c1-81c1-42a1-b69e-b2f4ee8ca7ef
Observed Generation: 1
Quiet Period: 2023-03-08T09:21:10Z
Super User Upserted: 2023-03-08T09:21:05Z
Users Upserted: 2023-03-08T09:21:05Z
Stargate:
Available Replicas: 1
Conditions:
Last Transition Time: 2023-03-08T09:22:20Z
Status: True
Type: Ready
Deployment Refs:
demo-dc1-default-stargate-deployment
Progress: Running
Ready Replicas: 1
Ready Replicas Ratio: 1/1
Replicas: 1
Service Ref: demo-dc1-stargate-service
Updated Replicas: 1
Error: None
Events: <none>
root@vmi1231861:~#
Other info:
O.S.: Ubuntu 22.04
root@vmi1231861:~# kustomize version
v5.0.0
root@vmi1231861:~# kubectl version
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short. Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"26", GitVersion:"v1.26.2", GitCommit:"fc04e732bb3e7198d2fa44efa5457c7c6f8c0f5b", GitTreeState:"clean", BuildDate:"2023-02-22T13:39:03Z", GoVersion:"go1.19.6", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.7
Server Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.3", GitCommit:"434bfd82814af038ad94d62ebe59b133fcb50506", GitTreeState:"clean", BuildDate:"2022-11-02T03:22:35Z", GoVersion:"go1.19.2", Compiler:"gc", Platform:"linux/amd64"}
root@vmi1231861:~#
How to solve the problem? How to make it work?
PS: Actually the output of the command kubectl -n k8ssandra-operator describe K8ssandraCluster demo
says : Progress: Running . Error: None
. So… I do not understand what’s going on