Context and reasoning
Sentry can be installed on a Kubernetes cluster with the help of the official Sentry Helm chart. Here's how.
Pre-requisites
- A working Kubernetes installation and a distributes block storage for Kubernetes (I am using Longhorn on Rancher)
- A working helm tooling
Custom ingress
I could not make the included ingress configuration work. Here's a custom ingress that targets the -sentry-web service to the outside world.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: "{{ .Release.Name }}-sentry"
labels:
{{- include "chart.labels" . | nindent 4 }}
annotations:
{{- include "ingress.annotations" . | nindent 4 }}
spec:
tls:
- hosts:
- sentry.mywebsite.dev
secretName: "sentry.mywebsite.dev-tls"
rules:
- host: sentry.mywebsite.dev
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: "{{ .Release.Name }}-sentry-web"
port:
number: 9000
Install sentry
These are the helm chart values needed to kickstart the sentry installation:
kafka:
enabled: true
user:
create: true
email: <REDACTED>
password: <REDACTED>
asHook: true
sentry:
singleOrganization: false
worker:
replicas: 2
auth:
register: false
hooks:
activeDeadlineSeconds: 6500
ingress:
enabled: false
nginx:
enabled: false
clickhouse:
enabled: true
clickhouse:
replicas: "1"
postgresql:
enabled: true
Bonus: use sentry in a helm chart
Most of the examples in this tutorial were made for a custom tooling chart that includes sentry. Here's the sentry version and the repository used:
...
- name: sentry
alias: sentry
version: 23.x
repository: https://sentry-kubernetes.github.io/charts
condition: sentry.enabled
...
Voilà! You have a fully working Sentry installation.
SOCIAL SHARE CARD GENERATOR