Fluentd Kubernetes container logs & journald log collector with Graylog output. Configurable through ConfigMap.
- Docker
- Kubernetes cluster access
- Gelf input on Graylog
- Clone this repository and build a docker image:
docker build -t <registry>/<image-name>:<version> .
-
Modify the docker image on file daemonset.yaml for your docker image generated in previously step.
spec: serviceAccountName: kubelog dnsPolicy: ClusterFirst containers: - name: agent image:<registry>/<image-name>:<version>
-
Edit fluent.conf according to your need
-
Execute:
kubectl create -f rbac.yaml
kubectl create configmap \
--namespace kube-system kubelog \
--from-file fluent.conf \
--from-literal GELF_HOST=<server address> \
--from-literal GELF_PORT=<port> \
--from-literal GELF_PROTOCOL=<udp|tcp>
kubectl create -f daemonset.yaml