k8ssandra-operator
k8ssandra-operator copied to clipboard
Unable to start due to PVC error from metrics-agent-config
What happened?
We are attempting to start a k8ssandra-operator cluster but are running into undocumented errors when the stateful set is attempting to mount the metrics-agent-config
PVC
statefulset-controller create Pod cassandra-dc2-default-sts-0 in StatefulSet cassandra-dc2-default-sts failed error: failed to create PVC metrics-agent-config-cassandra-dc2-default-sts-0: PersistentVolumeClaim "metrics-agent-config-cassandra-dc2-default-sts-0" is invalid: [spec.accessModes: Required value: at least 1 access mode is required, spec.resources[storage]: Required value]
Did you expect to see something different?
I would expect the metrics-agent-config to be mounted by default from the configmap.
How to reproduce it (as minimally and precisely as possible):
Environment
-
K8ssandra Operator version:
1.13.0
-
Kubernetes version information:
Client Version: v1.29.1 Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3 Server Version: v1.25.15-gke.1115000
-
Kubernetes cluster kind: GKE
-
Manifests:
apiVersion: k8ssandra.io/v1alpha1
kind: K8ssandraCluster
metadata:
name: cassandra
spec:
auth: false
# External datacenters, points to other kassandra instance
externalDatacenters:
- "dc1"
cassandra:
serverVersion: "3.11.16"
additionalSeeds:
- "127.0.0.224"
- "127.0.3.132"
- "127.0.2.146"
containers:
- name: cassandra
securityContext:
readOnlyRootFilesystem: false
capabilities:
add: ["IPC_LOCK"]
datacenters:
- metadata:
name: dc2
size: 3
config:
jvmOptions:
heapSize: 12Gi
heapNewGenSize: 2Gi
resources:
requests:
cpu: 2
memory: 24Gi
storageConfig:
cassandraDataVolumeClaimSpec:
storageClassName: ssd
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 200Gi
- K8ssandra Operator Logs:
see attached file k8ssandra-operator-logs.csv
We do not create a PVC for metrics-agent-config (it's mounted as ConfigMap), so this error is weird. Did the cluster have some old version of CassandraDatacenter CRD and it for some reason was not updated to k8ssandra-operator v1.13.0 one? For example, did it have some older version of cass-operator running at some point.
How does the StatefulSet output look like?