This is the sample code for customizing fluentd in Google Kubernetes Engine (GKE). The tutorial explains how to run a custom fluentd daemonset inside GKE that sends logs to Google Cloud Logging.
The repository contains:
- a convenience script that creates a GKE cluster with logging disabled (create-cluster.sh)
- Manifests for deploying a test logging program and the fluentd daemonset in Kubernetes
- The test logging program source and Dockerfile in test-logger
Please use issue tracker on GitHub to report any bugs, comments or questions regarding SDK development.
We welcome all usage-related questions on Stack Overflow
tagged with google-cloud-kubernetes-engine
.
- Open this repo in Cloud Shell with the below button
gcloud config set project VALUE
- Run the create-cluster.sh script to create a test cluster on GKE
./create-cluster.sh
- Run the test logger, fluentd configmap, and fluentd daemonset
kubectl apply -f kubernetes/test-logger.yaml
kubectl apply -f kubernetes/fluentd-configmap.yaml
kubectl apply -f kubernetes/fluentd-daemonset.yaml