3

I am trying to setup HA rocket chat with kubernetes. According to the rocket chat HA guide, rocket supports HA. I assume StatefulSet should be used to support such records:

    extra_hosts:
    - "rocket-1:10.250.250.13"
    - "rocket-2:10.250.250.14"
    - "rocket-3:10.250.250.17"

However i still miss some parts of the puzzle. Where in kubernetes can i specify extra_hosts? Is where any guide of how to achieve it?

YuriR
  • 1,251
  • 3
  • 14
  • 26

2 Answers2

1

I just came across this while I was looking into deploying rocket chat on kubernetes. I don't know if you've solved this issue, but the extra_hosts field in the docker compose file is just for hostname resolution. If you already have a dns service deployed on the cluster then you shouldn't need this.

As far as using stateful sets: I wouldn't use that kind of resource for rocket.chat because it's not a stateful application. You could use them for the MongoDB replicaset though.

Eric
  • 11
  • 2
0

I know the question has been asked long time ago, but as I found it hard to found the solution today, here I share what I did, for the record. In my setup I used hostAliases:

      hostAliases:
        - ip: "10.10.3.103"
          hostnames: 
          - "mongo01"
        - ip: "10.10.3.104"
          hostnames: 
          - "mongo02"
        - ip: "10.10.3.105"
          hostnames: 
          - "mongo03"

See the exemple in the Kubernetes docs here : https://kubernetes.io/docs/tasks/network/customize-hosts-file-for-pods/#adding-additional-entries-with-hostaliases

Nathanael
  • 1
  • 1