I am trying to setup K8ssandra using the default .yaml file (Single-cluster install with helm | K8ssandra, Apache Cassandra on Kubernetes) on a single EC2 based K8 cluster. EC2 has 2vCPU and 8GB RAM. I have used the softPodAntiAffinity : true but still get insufficient CPU errors occasionally and also see one of the replicas not getting ready and stays at 0/2 (it doesn’t simply restart or CrashLoop but rather vanishes and gets regenerated).
Hence how can one setup the default 3 Cassandra instance setup on a limited hardware EC2. I don’t want to add an extra layer by installing inside Docker (minikube/kind) since I want the setup to utilize complete EC2 hardware without any hops.
.yaml that I have tried:
apiVersion: k8ssandra.io/v1alpha1
kind: K8ssandraCluster
metadata:
name: demo
spec:
cassandra:
serverVersion: "4.0.1"
datacenters:
- metadata:
name: dc1
size: 3
storageConfig:
cassandraDataVolumeClaimSpec:
storageClassName: standard
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
config:
jvmOptions:
heapSize: 512M
softPodAntiAffinity : true
resources:
limits:
cpu: "150m"
memory: "1G"
requests:
cpu: "150m"
memory: "1G"
and
apiVersion: k8ssandra.io/v1alpha1
kind: K8ssandraCluster
metadata:
name: demo
spec:
cassandra:
serverVersion: "4.0.1"
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
softPodAntiAffinity: true