Multinode Graylog setup using Kubernetes

Hi,

I am trying to set-up multinode graylog(1 master ,1 data) Below are my configurations.
Graylog-Master

metadata:
  name: graylog
  labels:
    service: graylog
spec:
  replicas: 1
  template:
    metadata:
      labels:
        service: graylog
containers:
      - name: graylog3
        image: graylog/graylog:3.0
        env:
        - name: GRAYLOG_IS_MASTER
          value: "true"
        - name: node_id_file
          value: MASTER
        - name: GRAYLOG_PASSWORD_SECRET
          value: ipJFJy2jcpAyAigOOLHJ9z4LAyqTuhnRSQl34k7cLGhLOizyjUl06X4xhzTzvxNPAYZeCP2WYlYlUFsA0CPvOWi6
        - name: GRAYLOG_ROOT_PASSWORD_SHA2
          value: OLHJ9z4LAyqTuhnRSQl34k7cLGhLOizyjUl06X4xhzTzvxNPAYZeCP2WYlYlUFsA0CPvOW
        - name: GRAYLOG_HTTP_EXTERNAL_URI
          value: http://abc.cloudapp.azure.com:30033/
        - name: GRAYLOG_ELASTICSEARCH_HOSTS
          value: http://elasticsearch:9200
        - name: GRAYLOG_MONGODB_URI
          value: mongodb://graylog-mongodb:27017/graylog
        - name: "GRAYLOG_SERVER_JAVA_OPTS"
          value: "-Xms1024m -Xmx10240m"  
        ports:
        - containerPort: 9000
        - containerPort: 12201
        - containerPort: 5044

Graylog-data:

metadata:
  name: graylog
  labels:
    service: graylog
spec:
  replicas: 1
  template:
    metadata:
      labels:
        service: graylog
containers:
      - name: graylog3
        image: graylog/graylog:3.0
        env:
        - name: GRAYLOG_IS_MASTER
          value: "false"
        - name: node_id_file
          value: DATA
        - name: GRAYLOG_PASSWORD_SECRET
          value: ipJFJy2jcpAyAigOOLHJ9z4LAyqTuhnRSQl34k7cLGhLOizyjUl06X4xhzTzvxNPAYZeCP2WYlYlUFsA0CPvOWi6
        - name: GRAYLOG_ROOT_PASSWORD_SHA2
          value: OLHJ9z4LAyqTuhnRSQl34k7cLGhLOizyjUl06X4xhzTzvxNPAYZeCP2WYlYlUFsA0CPvOW
        - name: GRAYLOG_HTTP_EXTERNAL_URI
          value: http://abc.cloudapp.azure.com:30033/
        - name: GRAYLOG_ELASTICSEARCH_HOSTS
          value: http://elasticsearch:9200
        - name: GRAYLOG_MONGODB_URI
          value: mongodb://graylog-mongodb:27017/graylog
        - name: "GRAYLOG_SERVER_JAVA_OPTS"
          value: "-Xms1024m -Xmx10240m"  
        ports:
        - containerPort: 9000
        - containerPort: 12201
        - containerPort: 5044

Service:

apiVersion: v1
kind: Service
metadata:
  name: graylog
spec:
  type: NodePort
  selector:
    service: graylog
  ports:
  - name: "web"
    port: 9000
    targetPort: 9000
    nodePort: 30003
  - name: "gelf"
    port: 12201
    targetPort: 12201
    nodePort: 30004
  - name: "beats"
    port: 5044
    targetPort: 5044
    nodePort: 30002

Both master and data nodes are running as master andonly one node is parsing the data(messages). In the same configuration if i use service name as graylog in master,graylog1 in datanode ,one machine running as master another one as slave.
which means - single service name if i use , both are running as master,
if i use 2 different services one become master and another as datanode .

In both cases only one node is processing the data.

Can you help me how to make change my above config so that both master and datanode process the messages.

And also wants to know master & datanode roles and responsibilities in graylog.

Thanks,
Jay’

http://docs.graylog.org/en/3.0/pages/installation/docker.html#kubernetes-automatic-master-selection

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.