How to change cassandra.yaml inside kubernetes pods?

7/15/2020

I am trying to update a few properties inside cassandra.yaml. I have a cluster of 5 nodes running inside Kubernetes as pods. I have found that in values.yaml of Helm if we change configOverrides: properties and do helm upgrade then it should work.

My steps

  1. Added all contents of cassandra.yaml (tried both YAML and JSON format).
  2. Run helm upgrade command (it runs without error after multiple attempts of changing point 1 contents)
  3. Restart pods, I just deleted the pod expecting Kubernetes will spin up one. However, it does not happen.

If I revert the change then the pod which I deleted will spin up as expected. I am not sure how to do this. If anyone can point me what I am doing wrong that will be helpful.

UPDATE

Since I have been asked to keep my Question in SO guidelines. Actually there is not much to add. Anyway, I will try to elaborate a bit,

I am trying to change properties inside cassandra.yaml like ENABLE_USER_DEFINED_FUNCTION which is by default false. In my local machine, I can change this file, restart docker container and all set.

However, on production env, where the Cassandra cluster is hosted inside Kubernetes, I am not seeing any straightway to achieve the same thing.

Options are 1. As described above and looks more ideal solution. 2. Build a docker image on top of the official Cassandra image with all the needed properties enabled.

UPDATE #2

kubeclt logs

INFO  [IndexSummaryManager:1] 2020-07-15 20:48:25,004 IndexSummaryRedistribution.java:78 - Redistributing index summaries
INFO  [GossipStage:1] 2020-07-15 21:45:54,078 Gossiper.java:1105 - InetAddress /###.##.##.## is now DOWN
INFO  [HANDSHAKE-cassandra-0.cassandra.cassandra.svc.cluster.local/###.##.##.##] 2020-07-15 21:45:55,613 OutboundTcpConnection.java:561 - Handshaking version with cassandra-0.cassandra.cassandra.svc.cluster.local/###.##.##.##
-- tausif
cassandra
kubernetes
kubernetes-helm

0 Answers