Unable to create a cluster

Hi
I’m trying to create a simple cluster with minimum settings.

apiVersion: k8ssandra.io/v1alpha1
kind: K8ssandraCluster
metadata:
  name: cassandra
spec:
  auth: false
  cassandra:
    serverVersion: "4.0.7"
    storageConfig:
      cassandraDataVolumeClaimSpec:
        storageClassName: standard-rwo
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 50Gi
    config:
      jvmOptions:
        heap_initial_size: 4G
        heap_max_size: 4G
    networking:
      hostNetwork: true
    datacenters:
    - metadata:
        name: dc1
      size: 3
      racks:
      - name: rack1
        nodeAffinityLabels:
          topology.kubernetes.io/zone: us-central1-a
      - name: rack2
        nodeAffinityLabels:
          topology.kubernetes.io/zone: us-central1-b
      - name: rack3
        nodeAffinityLabels:
          topology.kubernetes.io/zone: us-central1-f
      tolerations:
      - key: "app"
        operator: "Equal"
        value: "cassandra"
        effect: "NoSchedule"

But it’s failing with error:

CassandraDatacenter.cassandra.datastax.com "dc1" is invalid: spec.storageConfig.additionalVolumes[0].pvcSpec: Required value

Some more logs:

2023-09-19T16:29:41.883Z        INFO    KubeAPIWarningLogger    unknown field "spec.podTemplateSpec.metadata.annotations"
2023-09-19T16:29:41.884Z        INFO    KubeAPIWarningLogger    unknown field "spec.podTemplateSpec.metadata.creationTimestamp"
2023-09-19T16:29:41.884Z        INFO    KubeAPIWarningLogger    unknown field "spec.storageConfig.additionalVolumes[0].volumeSource"
2023-09-19T16:29:41.884Z        ERROR   Failed to create datacenter     {"controller": "k8ssandracluster", "controllerGroup": "k8ssandra.io", "controllerKind": "K8ssandraCluster", "K8ssandraCluster": {"name":"cassandra","namespace":"default"}, "namespace": "default", "name": "cassandra", "reconcileID": "9128aa6e-a4cc-4f27-a5e1-7677095ef270", "K8ssandraCluster": "default/cassandra", "CassandraDatacenter": "default/dc1", "K8SContext": "", "error": "CassandraDatacenter.cassandra.datastax.com \"dc1\" is invalid: spec.storageConfig.additionalVolumes[0].pvcSpec: Required value"}
github.com/k8ssandra/k8ssandra-operator/controllers/k8ssandra.(*K8ssandraClusterReconciler).reconcileDatacenters
        /workspace/controllers/k8ssandra/datacenters.go:217
github.com/k8ssandra/k8ssandra-operator/controllers/k8ssandra.(*K8ssandraClusterReconciler).reconcile
        /workspace/controllers/k8ssandra/k8ssandracluster_controller.go:143
github.com/k8ssandra/k8ssandra-operator/controllers/k8ssandra.(*K8ssandraClusterReconciler).Reconcile
        /workspace/controllers/k8ssandra/k8ssandracluster_controller.go:91
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile
        /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.0/pkg/internal/controller/controller.go:121
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
        /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.0/pkg/internal/controller/controller.go:320
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
        /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.0/pkg/internal/controller/controller.go:273
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
        /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.0/pkg/internal/controller/controller.go:234
2023-09-19T16:29:41.885Z        DEBUG   events  CassandraDatacenter.cassandra.datastax.com "dc1" is invalid: spec.storageConfig.additionalVolumes[0].pvcSpec: Required value    {"type": "Warning", "object": {"kind":"K8ssandraCluster","namespace":"default","name":"cassandra","uid":"8b72c319-d379-47a4-95f9-9ec0e801159d","apiVersion":"k8ssandra.io/v1alpha1","resourceVersion":"387760072"}, "reason": "Reconcile Error"}
2023-09-19T16:29:41.899Z        INFO    updated k8ssandracluster status {"controller": "k8ssandracluster", "controllerGroup": "k8ssandra.io", "controllerKind": "K8ssandraCluster", "K8ssandraCluster": {"name":"cassandra","namespace":"default"}, "namespace": "default", "name": "cassandra", "reconcileID": "9128aa6e-a4cc-4f27-a5e1-7677095ef270", "K8ssandraCluster": "default/cassandra"}
2023-09-19T16:29:41.899Z        ERROR   Reconciler error        {"controller": "k8ssandracluster", "controllerGroup": "k8ssandra.io", "controllerKind": "K8ssandraCluster", "K8ssandraCluster": {"name":"cassandra","namespace":"default"}, "namespace": "default", "name": "cassandra", "reconcileID": "9128aa6e-a4cc-4f27-a5e1-7677095ef270", "error": "CassandraDatacenter.cassandra.datastax.com \"dc1\" is invalid: spec.storageConfig.additionalVolumes[0].pvcSpec: Required value"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
        /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.0/pkg/internal/controller/controller.go:326
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
        /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.0/pkg/internal/controller/controller.go:273
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
        /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.13.0/pkg/internal/controller/controller.go:234

I tried reinstalling/different version of k8ssandra-operator: 1.7.0 and 1.8.1.
Please help

You have (had) multiple versions of cass-operator installed and may have used a field that has blocked the upgrade of its CRDs at some point.

Run the following command to unblock this:

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

Thank you @alexander

Got this

# kubectl apply -k "github.com/k8ssandra/cass-operator/config/crd?ref=v1.16.0" --server-side
kubectl apply -k "github.com/k8ssandra/cass-operator/config/crd?ref=v1.16.0" --server-side# Warning: 'patchesJson6902' is deprecated. Please use 'patches' instead. Run 'kustomize edit fix' to update your Kustomization automatically.
Apply failed with 2 conflicts: conflicts with "helm" using apiextensions.k8s.io/v1:
- .metadata.annotations.controller-gen.kubebuilder.io/version
- .spec.versions
Please review the fields above--they currently have other managers. Here
are the ways you can resolve this warning:
* If you intend to manage all of these fields, please re-run the apply
  command with the `--force-conflicts` flag.
* If you do not intend to manage all of the fields, please edit your
  manifest to remove references to the fields that should keep their
  current managers.
* You may co-own fields by updating your manifest to match the existing
  value; in this case, you'll become the manager if the other manager(s)
  stop managing the field (remove it from their configuration).
See https://kubernetes.io/docs/reference/using-api/server-side-apply/#conflicts
Apply failed with 2 conflicts: conflicts with "helm" using apiextensions.k8s.io/v1:
- .metadata.annotations.controller-gen.kubebuilder.io/version
- .spec.versions
Please review the fields above--they currently have other managers. Here
are the ways you can resolve this warning:
* If you intend to manage all of these fields, please re-run the apply
  command with the `--force-conflicts` flag.
* If you do not intend to manage all of the fields, please edit your
  manifest to remove references to the fields that should keep their
  current managers.
* You may co-own fields by updating your manifest to match the existing
  value; in this case, you'll become the manager if the other manager(s)
  stop managing the field (remove it from their configuration)

I used this command to install operator

helm install k8ssandra-operator k8ssandra/k8ssandra-operator -n k8ssandra-operator --set global.clusterScoped=true --create-namespace

Anyway this seems to solve the issue. Thank you!