Change fluentd config in GKE to move from Stackdriver to ELK

2/17/2017

When running a cluster on GKE, the VM image used to build the cluster comes with a fluentd-gcp.yaml file in

/etc/kubernetes/manifests

Consequently this launches one pod fluentd per node on the cluster. This fluentd pod collects all container logs and forward them to stackdriver based on this configuration

Now I'd like to use the ELK version instead. How can I do that in GKE?

-- R3DL
elastic-stack
google-kubernetes-engine
stackdriver

1 Answer

2/17/2017

You need to first disable the built in cluster logging (gcloud container clusters create --no-enable-cloud-logging ...) in your cluster. Then you can run the fluentd image of your choice on all nodes using a DaemonSet.

There isn't a way to change the logging configuration on a running cluster, so unfortunately you'll need to create a new cluster without the gcp fluentd logger running.

-- Robert Bailey
Source: StackOverflow