Sorry for the noob question but from https://github.com/kubernetes/kubernetes/blob/release-1.1/docs/getting-started-guides/logging-elasticsearch.md it says:
To use Elasticsearch and Kibana for cluster logging you should set the following environment variable as shown below:
KUBE_LOGGING_DESTINATION=elasticsearch
Where and how do I set this Env Var ? I was thinking that I should use
gcloud container clusters create
and pass the options there but there is no options...
That documentation is for users that are turning up clusters via the open source shell scripts for GCE. Elasticsearch isn't currently supported as part of the cluster creation commands for Google Container Engine. You can manually add it to your cluster after the cluster has been created.
As already mentioned in Robert's answer the Elasticsearch/Kibana stack needs to be added manually if the cluster is supposed to run on Google Container Engine (GKE). Using the information given in this post, I was able to get it to work performing the following steps:
Start a GKE Cluster without cloud logging
Add a configured fluentd container to each running node by using a kubernetes DaemonSet.
fluentd-es.yaml
Add elasticsearch and kibana pods and services.
Note below that the
kubernetes.io/cluster-service: "true"
label (present in the original files) has been removed. Having this label in the definitions resulted in termination of the running pods.es-controller.yaml
es-service.yaml
kibana-controller.yaml
kibana-service.yaml
Create a kubectl proxy
Watch your logs with kibana at
http://localhost:8001/api/v1/proxy/namespaces/kube-system/services/kibana-logging/