Unable to create cluster using k8ssandra-operator v1.5

Hi, i am trying to test k8ssandra-operator in a KOPS cluster.
I have installed the helm package for k8ssandra-operator and it works fine but when i try to create a datacenter, it fails with

NAME ERROR
demo CassandraDatacenter.cassandra.datastax.com “dc1” is invalid: spec.storageConfig.additionalVolumes[3].pvcSpec: Required value

I have tried to add additonalVolumes but as i keep adding it keep incrementing the error values.

For example here is my manifest

apiVersion: k8ssandra.io/v1alpha1
kind: K8ssandraCluster
metadata:
  name: demo
spec:
  cassandra:
    serverVersion: "4.0.1"
    datacenters:
      - metadata:
          name: dc1
        size: 3
        storageConfig:
          cassandraDataVolumeClaimSpec:
            storageClassName: kiran-k8ssandra-poc 
            accessModes:
              - ReadWriteOnce
            resources:
              requests:
                storage: 5Gi
          additionalVolumes:
            - name: sts-extra-vol
              mountPath: "/var/lib/extra"
              pvcSpec:
                storageClassName: kiran-k8ssandra-poc
                accessModes:
                  - ReadWriteOnce
                resources:
                  requests:
                    storage: 1Gi
            - name: sts-extra-vol2
              mountPath: "/var/lib/extra2"
              pvcSpec:
                storageClassName: kiran-k8ssandra-poc
                accessModes:
                  - ReadWriteOnce
                resources:
                  requests:
                    storage: 1Gi
            - name: sts-extra-vol3
              mountPath: "/var/lib/extra3"
              pvcSpec:
                storageClassName: kiran-k8ssandra-poc
                accessModes:
                  - ReadWriteOnce
                resources:
                  requests:
                    storage: 1Gi
        config:
          jvmOptions:
            heapSize: 512M
        stargate:
          size: 1
          heapSize: 256M

Hi, we’ve seen that happening during failed upgrades of the CassandraDatacenter CRD. That can happen if you have a previous version of cass-operator or k8ssandra-operator installed on your cluster and a CassandraDatacenter resource that is incompatible with the new version (for example a field was removed in the new version).
Are you really using k8ssandra-operator v1.5? :thinking: This should only happen after an upgrade to v1.6.
FTR, the additionalVolume that is failing to pass the check is not one of yours, it’s another one that gets added by mounting a configmap in the operator.

Check which version of k8ssandra-operator and cass-operator are deployed by reviewing the image tags in their respective pods, then if you’re indeed using k8ssandra-operator v1.6.x and cass-operator v1.15.0, force the upgrade of the CRDs with the following command:

kubectl apply -k "github.com/k8ssandra/cass-operator/config/crd?ref=v1.15.0" --server-side

You should then be able to create your K8ssandraCluster resource.

Hi @alexander thanks

Please find the images running

k get pods -oyaml -n kiran-k8ssandra-operator-poc | grep -i image:
      image: docker.io/stargateio/stargate-4_0:v1.0.67
      image: docker.io/stargateio/stargate-4_0:v1.0.67
      image: k8ssandra/cass-management-api:4.0.1
      image: k8ssandra/system-logger:v1.15.0
      image: datastax/cass-config-builder:1.0-ubi7
      image: docker.io/k8ssandra/cass-management-api:4.0.1
      image: docker.io/k8ssandra/system-logger:v1.15.0
      image: docker.io/datastax/cass-config-builder:1.0-ubi7
      image: k8ssandra/cass-management-api:4.0.1
      image: k8ssandra/system-logger:v1.15.0
      image: datastax/cass-config-builder:1.0-ubi7
      image: docker.io/k8ssandra/cass-management-api:4.0.1
      image: docker.io/k8ssandra/system-logger:v1.15.0
      image: docker.io/datastax/cass-config-builder:1.0-ubi7
      image: k8ssandra/cass-management-api:4.0.1
      image: k8ssandra/system-logger:v1.15.0
      image: datastax/cass-config-builder:1.0-ubi7
      image: docker.io/k8ssandra/cass-management-api:4.0.1
      image: docker.io/k8ssandra/system-logger:v1.15.0
      image: docker.io/datastax/cass-config-builder:1.0-ubi7
      image: docker.io/k8ssandra/k8ssandra-operator:v1.7.0
      image: docker.io/k8ssandra/k8ssandra-operator:v1.7.0
      image: docker.io/k8ssandra/cass-operator:v1.15.0
      image: docker.io/k8ssandra/cass-operator:v1.15.0

I will try to upgrade the crd and let you know if it works.

ok, you’re using the latest release, v1.7 :+1:
That makes more sense.