Share on Twitter
Share on Facebook
Share on HackerNews
Share on LinkedIn

Surface Kubernetes Errors with Sentry

Kubernetes, like a lot of other tools, can be noisy. Errors and warnings often go completely unnoticed in the event stream. Or sometimes they are noticed, but are hard to understand in the context of what else is happening in the cluster.

Sentry, unlike a lot of other error monitoring tools, works to eliminate that noise as much as possible, including Kubernetes-related noise. sentry-kubernetes is a small container that can be launched inside your Kubernetes cluster that sends errors and warnings to Sentry, where they will be cleanly presented and intelligently grouped. At that point, typical Sentry features, such as notifications, can help increase developer visibility.

Launching the sentry-kubernetes container

You can create a Kubernetes Deployment to run sentry-kubernetes, or use whatever workflow your organization has standardized. The simplest way to get started and try it out is to simply use kubectl run:

Create a new project on Sentry and use your DSN when launching the sentry-kubernetes container:

kubectl run sentry-kubernetes \
  --image getsentry/sentry-kubernetes \

Visibility into errors

Events are grouped in Sentry by the namespace, name and kind of event. Only events at the warning or error levels are sent to the server:

Sentry events

They come with useful tags for filtering (such as namespace, reason, kind, and component) and breadcrumbs for showing events that occurred prior to the warning / error:

Sentry context

And include all of the extra data attached to the event:

Sentry extra data

Install using Helm charts

Helm is a tool for managing pre-configured Kubernetes resources. sentry-kubernetes can (optionally) be installed by using the Helm chart: incubator/sentry-kubernetes as follows:

$ helm repo add incubator 
"incubator" has been added to your repositories

$ helm install incubator/sentry-kubernetes --name my-release --set sentry.dsn=<your-dsn>

Go ahead and launch a sentry-kubernetes Pod in your cluster today. If you have feedback or need help at any point, shout out to our support engineers.

Your code is broken. Let's Fix it.
Get Started

More from the Sentry blog

ChangelogCodecovDashboardsDiscoverDogfooding ChroniclesEcosystemError MonitoringEventsGuest PostsMobileOpen SourcePerformance MonitoringRelease HealthResourceSDK UpdatesSentry
© 2024 • Sentry is a registered Trademark
of Functional Software, Inc.