kubernetes: Cassandra example on AWS doesn't create a Cassandra cluster

I’m running a simple cluster (k8s 1.1.1) on aws and trying to follow the instructions provided in the Cassandra examples section (https://github.com/kubernetes/kubernetes/tree/release-1.1/examples/cassandra).

When I try to scale the Cassandra nodes:

kubectl scale rc cassandra --replicas=2

the new pod is created as expected:

NAME              READY     STATUS    RESTARTS   AGE
cassandra         1/1       Running   0          21m
cassandra-yr4nq   1/1       Running   0          20m

but if I run:

kubectl exec -ti cassandra – nodetool status

I can see only one node (of course this is specular, so the same happens if I try querying the other pod, cassandra-yr4nq)

Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
--  Address     Load       Tokens  Owns (effective)  Host ID                               Rack
UN  10.244.0.8  51.49 KB   256     100.0%            2db6bea7-31df-436e-827c-87dca466d31d  rack1

Two more info:

  • I’ve also tried to check if the two pods can effectively see each other (logged in and tested with a ping) and they can
  • before going with AWS I tested this configuration on my local pc with vagrant and everything was fine (I was able to scale up and down the Cassandra nodes)

Any ideas?

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 24 (14 by maintainers)

Most upvoted comments

t2.micro are WAY small 😦 I am bumping the demo mem up to 2G and 2CPU. I am not sure if the jvm will even start. I am pretty sure it will start with 1G of mem, but have not tried. Can you get any logs from kubectl.

Btw info on validating an install https://github.com/kubernetes/kubernetes/issues/20961#issuecomment-212147456 - but this is when they are running

I have noticed that nodetool will run SUPER slow with the current demo setup. You bump the mem and the cpu up, and it is much happier.