docker-library / docker-library/cassandra

"OOMKilled" and "CrashLoopBackOff" errors deploying Cassandra on Minikube

Open
#289 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
273
Forks
269
PR merge metrics
No merged PRs in 30d

Description

Previously I had 32GB RAM on my laptop and could deploy Cassandra with the following .yaml file and no issues on a 3-nodes Minikube cluster, each node had an 8GB RAM:

apiVersion: v1
kind: Service
metadata:
  name: cassandra-srv
spec:
  type: NodePort 
  ports:
    - port: 9042  
      targetPort: 9042  
      nodePort: 30042  
  selector:
    app: cassandra

---
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: cassandra
spec:
  serviceName: cassandra-srv
  replicas: 2
  selector:
    matchLabels:
      app: cassandra
  template:
    metadata:
      labels:
        app: cassandra
    spec:
      containers:
        - name: cassandra
          image: cassandra:latest
          ports:
            - containerPort: 9042 
          env:
            - name: CASSANDRA_AUTHENTICATOR
              value: PasswordAuthenticator
            - name: CASSANDRA_AUTHORIZATION
              value: CassandraAuthorizer
            - name: CASSANDRA_PASSWORD_SEEDER
              value: "true"
            - name: CASSANDRA_SUPERUSER_PASSWORD
              value: "11111"
            - name: CASSANDRA_SEEDS
              value: cassandra-0.cassandra-srv.default.svc.cluster.local
          volumeMounts:
            - name: cassandra-data
              mountPath: /var/lib/cassandra
  volumeClaimTemplates:
    - metadata:
        name: cassandra-data
      spec:
        accessModes: ["ReadWriteOnce"]
        resources:
          requests:
            storage: 1Gi

Then I decided to improve my laptop and replaced the RAM kit with a new 64GB RAM kit. After I did minikube delete and created a new cluster, this time with RAM capacity doubled using the following command (in fact I just replaced -memory=8192 with -memory=16384 ) :


  minikube start --driver=docker \
    --cpus=2 --memory=16384 --disk-size=16g \
    --nodes=3 --addons=registry \
    --insecure-registry="10.0.0.0/24" \
    --insecure-registry="192.168.49.0/24" 

When I execute skaffold run with all the previous manifest files and nothing changed at all, I do see "OOMKilled" and "CrashLoopBackOff" errors.

I did also tried to add resources as follows but wasn't helpful:

 resources:
    requests:
      memory: "4Gi"
      cpu: "1"
    limits:
      memory: "8Gi"
      cpu: "2"

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Kubernetes Service and StatefulSet manifest shown in the issue, then reproduce the deployment with the listed minikube start and skaffold run commands. Inspect the Cassandra pod status, events, and logs to determine why the containers are OOMKilled and entering CrashLoopBackOff. Done means the existing deployment runs successfully without those errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cassandra, docker, kubernetes
Domain
databases, devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.