Whether you want to maximize Honeycomb’s capabilities or begin with a more limited set of telemetry data for your Kubernetes applications, we recommend that you use OpenTelemetry, a highly configurable, open-source, and vendor-neutral instrumentation framework.
In this guide, you will learn how to get answers about how your applications on Kubernetes are performing in production using OpenTelemetry Collectors and Honeycomb–and you’ll do it in under 10 minutes.
When you finish, you’ll have visibility into in-depth Kubernetes data, including Kubernetes logs, events, and node/cluster metrics. And you’ll be given the opportunity to take the next step toward leveraging Honeycomb’s full potential by instrumenting your code.
In the next 10 minutes, you will create a series of OpenTelemetry Collectors that will work together to pull in the correct telemetry and apply Kubernetes-specific data to it, which will help correlate issues. Your implementation will also lay the foundation for your applications to send telemetry data, if you choose to instrument them.
When you finish, you will have access to:
Before beginning this guide, you should have:
kubectlcommand-line utility locally.
You’ll also need your Honeycomb API Key. You can find your Honeycomb API Key in your Environment Settings.
Let’s get started!
To help you manage your objects in the cluster, create a namespace to contain the collector infrastructure.
In this example, we call the namespace
kubectl create namespace honeycomb
Within your new namespace, create a Kubernetes Secret that contains your Honeycomb API Key. You can find your Honeycomb API Key in your environment in Honeycomb.
export HONEYCOMB_API_KEY=mykey kubectl create secret generic honeycomb --from-literal=api-key=$HONEYCOMB_API_KEY --namespace=honeycomb
OpenTelemetry’s Helm GitHub repository includes Helm charts that contain all of the necessary resources you need to deploy Collectors to your Kubernetes cluster.
Add the repo:
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
Update your repos to ensure Helm is aware of the latest versions:
helm repo update
Deploy your Collectors–a Deployment-mode Collector to collect the metrics for your cluster and a DaemonSet-mode Collector to collect the application telemetry data and metrics from your cluster’s node(s). You can deploy both Collectors using the same Helm chart, but with different names and values files.
Deploy the Deployment-mode Collector:
helm install otel-collector-cluster open-telemetry/opentelemetry-collector --namespace honeycomb --values https://docs.honeycomb.io/integrations/kubernetes/values-files/values-deployment.yaml
Deploy the DaemonSet-mode Collector:
helm install otel-collector open-telemetry/opentelemetry-collector --namespace honeycomb --values https://docs.honeycomb.io/integrations/kubernetes/values-files/values-daemonset.yaml
Check that the Collectors are installed by using the
kubectl command to see if the pods are running:
kubectl get pods --namespace honeycomb
This command should return something like:
NAME READY STATUS RESTARTS AGE otel-collector-cluster-opentelemetry-collector-7c9cc9f8d-k9ncw 1/1 Running 0 9m21s otel-collector-opentelemetry-collector-agent-fcn5v 1/1 Running 0 17m
otel-collector-cluster, and one pod running under a name containing the word
agentfor each node in your Kubernetes cluster.
You should now have an OpenTelemetry installation in your cluster that can:
After a few minutes, data should start flowing into Honeycomb.
To explore metrics related to your Kubernetes cluster, log in to Honeycomb and query the
k8s-metrics dataset in your environment.
Try asking the Query Assistant questions like:
To explore the events emitted by Kubernetes itself, query the
k8s-events dataset. These may be a little harder to understand, so try asking the Query Assistant questions like:
For each question you ask, the Query Assistant will create a general query. You can further customize each query by adding visualizations, or by filtering or grouping the data.
Now that you have created an observability pipeline and have gotten some metrics, you can use these to get even more visibility into your Kubernetes cluster.
Configure your applications to send data to the OpenTelemetry Collectors Have you already instrumented your applications with OpenTelemetry? You’ll need to configure your pods and applications to send data to your new Collectors.
Add low-code, automatic instrumentation to your applications Do you want more insight into your application data, but can’t fully instrument your code yet? You can get even more insight by using the OpenTelemetry Operator to automatically instrument your applications. To learn more, visit Low-Code Auto-Instrumentation with the OpenTelemetry Operator for Kubernetes.
Get no-code insights into Kubernetes network telemetry Are you working in a coding language that is currently unsupported by OpenTelemetry trace instrumentation? Are you not able to touch your code? Honeycomb can still give you visibility into the traffic traveling between your pods. To learn more about the quickest approach to getting insights into the interconnectivity of your services, visit No-code Kubernetes Insights with the Honeycomb Network Agent
The DaemonSet-mode Collector uses the following components:
The Deployment-mode Collector uses the following components: