Graylog 3.3 in kubernetes

I try to deploy graylog 3.3 in kubernetes.
My yml file is

apiVersion: apps/v1
kind: Deployment
metadata:
name: graylog-deploy
labels:
service: graylog
spec:
replicas: 1
selector:
matchLabels:
app: graylog
template:
metadata:
labels:
app: graylog
spec:
nodeSelector:
app/graylog: “true”
containers:
- name: graylog
image: graylog/graylog:3.3
ports:
- containerPort: 9000
- containerPort: 12201
volumeMounts:
- mountPath: /usr/share/graylog/data
name: graylog-data
- mountPath: /usr/share/graylog/plugin
name: graylog-plugin
env:
- name: GRAYLOG_PASSWORD_SECRET
value:
- name: GRAYLOG_ROOT_PASSWORD_SHA2
value:
- name: GRAYLOG_HTTP_EXTERNAL_URI
value: http://:9000/
- name: GRAYLOG_ELASTICSEARCH_HOSTS
value: http://elasticsearch:9200
- name: GRAYLOG_MONGODB_URI
value: mongodb://mongodb:27017/graylog
volumes:
- name: graylog-data
hostPath:
path: /mnt/k8s-storage/graylog-data
type: DirectoryOrCreate
- name: graylog-plugin
hostPath:
path: /mnt/k8s-storage/graylog-plugin
type: DirectoryOrCreate


apiVersion: v1
kind: Service
metadata:
name: graylog
spec:
type: NodePort
selector:
app: graylog
ports:

  • name: “12201-tcp”
    port: 12201
    targetPort: 12201
    nodePort: 32201
    protocol: TCP
  • name: “12201-udp”
    port: 12201
    targetPort: 12201
    nodePort: 32201
    protocol: UDP
  • name: “9000”
    port: 9000
    targetPort: 9000
    nodePort: 32900

but i see an error

ERROR StatusLogger File not found in file system or classpath: /usr/share/graylog/data/config/log4j2.xml
ERROR StatusLogger Reconfiguration failed: No configuration found for ‘70dea4e’ at ‘null’ in ‘null’
13:15:06.695 [main] ERROR org.graylog2.bootstrap.CmdLineTool - Couldn’t load configuration: Properties file /usr/share/graylog/data/config/graylog.conf doesn’t exist!

Right for /mnt/k8s-storage/graylog-data is 777.

What is the mistake?

I add this file before start pod and it works. But in docker-compose deploy it works itself.

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