Kubernetes and Honeycomb

Understanding the behavior of applications running on Kubernetes can be daunting. Honeycomb integrates with Kubernetes to collect your applications’ logs, cluster events, cluster resource and state metrics, so that you can answer all the questions you have.

Overview of integrations

To get the integrations up and running in your own cluster, follow the instructions below. For examples of ussinge Honeycomb to answer questions about your cluster and applications, see the use cases guide.

Getting Started

If you haven’t already, sign up for a free Honeycomb trial account. Then grab your write key from your account page, and store it as a Kubernetes secret:

    kubectl create secret generic -n kube-system honeycomb-writekey \

Then follow the steps below to deploy the integrations in a cluster.

Note: If you’re deploying the integrations on Google Container Engine (GKE), there are a few idiosyncrasies to be aware of. Take a look at the GKE guide before getting started.

The manifests for the Honeycomb integrations are also available on Github. If you’d like to run the integrations differently, they can easily be modified to fit your needs.

Sending Cluster Events and Resource Metrics

  1. Run Heapster with a Honeycomb sink:

    kubectl create -f https://honeycomb.io/download/kubernetes/metrics/honeycomb-heapster.yaml
  2. Check the status of your new Heapster pod

    kubectl --namespace=kube-system get pods -l k8s-app=heapster
    # NAME                                          READY     STATUS    RESTARTS   AGE
    # heapster-1760086053-11dnv                     1/1       Running   0          7h
  3. Head over to the Honeycomb UI and query the kubernetes-cluster-events dataset for event logs and the kubernetes-resource-metrics dataset for resource metrics.

Sending Cluster State Metrics

  1. Deploy kube-state-metrics and the Honeycomb kube-state-metrics adapter:

    # Start kube-state-metrics
    kubectl create -f https://honeycomb.io/download/kubernetes/metrics/kube-state-metrics.yaml
    # Start the Honeycomb adapter
    kubectl create -f https://honeycomb.io/download/kubernetes/metrics/honeycomb-state-metrics-adapter.yaml
  2. Check the status of your new pods:

    kubectl --namespace=kube-system get pods
    # NAME                                          READY     STATUS    RESTARTS   AGE
    # kube-state-metrics-1418711257-mz1lf           1/1       Running   0          1m
    # kube-state-metrics-1418711257-q5d71           1/1       Running   0          1m
    # kube-state-metrics-honeycomb-1491631841-vfrm7 1/1       Running   0          1m
  3. Head over to the Honeycomb UI and query the kubernetes-state-metrics dataset.

Sending Application Logs

  1. Configure and run the agent as a DaemonSet:

    kubectl create -f https://honeycomb.io/download/kubernetes/logs/quickstart.yaml
  2. Check the status of your new pods:

    kubectl --namespace=kube-system get daemonset
    # NAME                   DESIRED   CURRENT   READY     UP-TO-DATE   ...
    # honeycomb-agent-v1.1   1         1         1         1            ...
  3. Head over to the Honeycomb UI and query the kubernetes-logs dataset.

Note: You’ll want to configure the agent to parse logs from your applications. But that depends a lot on your applications! Read more about customizing the agent.

Getting Help

For any questions or difficulties, don’t hesitate to get in touch at support@honeycomb.io, or use the chat widget in the lower right.

The source code for the agent, state-metrics adapter and deployment manifests is also open-source and available on Github. Issues or patches are welcome!