Combine GCP StackDriver with a GKE Cluster
Explore how to integrate GCP Stackdriver logging with a GKE cluster using Fluentd DaemonSet. Learn to verify log shipping, enable necessary APIs, and utilize the Stackdriver UI to effectively collect and query Kubernetes cluster logs for better monitoring and troubleshooting.
We'll cover the following...
We'll cover the following...
GKE’s Fluentd DaemonSet #
If you’re using the GKE cluster, logging is already set up, even though you might not know about it. By default, every GKE cluster comes with a Fluentd DaemonSet that is configured to forward logs to GCP StackDriver. It is running in the kube-system Namespace.
Let’s describe GKE’s Fluentd DaemonSet and see whether there is any useful information we might find.
kubectl -n kube-system \
describe ds -l k8s-app=fluentd-gcp
The output, limited to the relevant parts, is as follows.
...
Pod Template:
Labels: k8s-app=fluentd-gcp
kubernetes.io/cluster-service=true
...