kibana-eck
by somaz94
Kibana Custom Resource for ECK (Elastic Cloud on Kubernetes) with HTTPRoute, Ingress and PDB wrappers. Connects to an Elasticsearch CR deployed via elasticsearch-eck.
About this chart
kibana-eck
A Helm chart for Kibana on Kubernetes via the ECK operator.
The chart renders the ECK Kibana Custom Resource plus optional siblings (ServiceAccount, PDB, HTTPRoute, Ingress, BackendTLSPolicy, ServiceMonitor, NetworkPolicy, ReferenceGrant). Defaults target a single-replica setup; HA is opt-in.
What it deploys
| Resource | API | Purpose |
|---|---|---|
Kibana | kibana.k8s.elastic.co/v1 | The Kibana CR. ECK reconciles the Deployment + Service. |
ServiceAccount | v1 | Optional. Dedicated SA for IRSA / Workload Identity. |
PodDisruptionBudget | policy/v1 | Optional. Required for zero-downtime rolling updates. |
HTTPRoute | gateway.networking.k8s.io/v1 | Optional. Gateway API route for external access. |
Ingress | networking.k8s.io/v1 | Optional. Legacy path for non-Gateway-API clusters. |
BackendTLSPolicy + CA ConfigMap | gateway.networking.k8s.io/v1, v1 | Optional. TLS verification from Gateway. Chart copies ca.crt from ECK's *-kb-http-certs-public Secret into <fullname>-ca ConfigMap via helm lookup (only portable approach — see Known limitations). |
ServiceMonitor | monitoring.coreos.com/v1 | Optional. Prometheus scrape config. |
NetworkPolicy | networking.k8s.io/v1 | Optional. Lock down ingress/egress. |
ReferenceGrant | gateway.networking.k8s.io/v1beta1 | Optional. Cross-namespace references from HTTPRoutes / other Kibanas. |
Versioning
Chart.yamlversion — chart's own SemVer, bumped manually viamake bump CHART=kibana-eck LEVEL=patch|minor|major.Chart.yamlappVersion — the Kibana Stack version shipped (defaultsvalues.version). Bumped by./upgrade.sh.values.yamlversion — rendered intospec.versionof the Kibana CR. Override to pin at install time.values.yamlimage — optional full image reference override.
Sibling version lock
upgrade.sh enforces Kibana version ≤ Elasticsearch version by reading the sibling chart ../elasticsearch-eck/values.yaml and refusing any bump that would exceed the linked ES version. This matches ECK's own compatibility rule (Kibana must not run ahead of the Elasticsearch cluster it talks to).
- Lookup target:
../elasticsearch-eck/values.yaml(version:key), falling back to../elasticsearch-eck/Chart.yamlappVersion - If the sibling chart is unreachable (path missing or both lookups empty), the check is skipped with a WARN — the bump proceeds, so keep the sibling chart on disk during upgrades
- If the resolved target exceeds the sibling version,
upgrade.shexits 1 and prints the exactcd ../elasticsearch-eck && ./upgrade.sh --version <X.Y.Z>command to run first ./upgrade.sh --version <X.Y.Z>still runs through the same sibling check; use it only when intentionally aligning to an ES version already deployed elsewhere
Prerequisites
- Kubernetes 1.25+
- ECK Operator installed:
helm repo add elastic https://helm.elastic.co helm install eck-operator elastic/eck-operator -n elastic-system --create-namespace - An Elasticsearch CR (typically deployed via the elasticsearch-eck sibling chart) in the referenced namespace
- For
httproute.enabled: true: Gateway API CRDs + a Gateway controller - For
serviceMonitor.enabled: true: Prometheus Operator
Install
These snippets install the latest published chart. To pin an exact chart version, add --version <x.y.z> — released versions are the GitHub Release tags named kibana-eck-<version>.
OCI registry (Helm 3.8+)
helm install kibana oci://ghcr.io/somaz94/charts/kibana-eck \
--namespace logging \
--set elasticsearchRef.name=elasticsearch \
-f my-values.yaml
Classic Helm repo
helm repo add somaz94 https://charts.somaz.blog
helm repo update
helm install kibana somaz94/kibana-eck \
--namespace logging \
--set elasticsearchRef.name=elasticsearch
Quick examples
1. Minimal (single replica, linked to sibling ES)
elasticsearchRef:
name: elasticsearch # the Elasticsearch CR name in the same namespace
2. HA (2+ replicas + PDB)
Zero-downtime rolling upgrades in HA topology are verified; the doc header records the chart and Stack versions the run used. See ../../docs/ha-rolling-verification.md. Minimum memory per replica: 1 GiB — lower values OOMKill during startup.
replicas: 2
podTemplate:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
common.k8s.elastic.co/type: kibana
podDisruptionBudget:
enabled: true
maxUnavailable: 1
3. Behind a Gateway (NGF) with TLS upstream
# Serve plain HTTP on :5601; TLS terminated at the Gateway.
http:
tls:
selfSignedCertificate:
disabled: true
httproute:
enabled: true
parentRefs:
- name: ngf
namespace: nginx-gateway
hostnames:
- kibana.example.com
rules:
- matches:
- path: {type: PathPrefix, value: /}
backendRefs:
- port: 5601
config:
server.publicBaseUrl: https://kibana.example.com
4. Legacy Ingress (ingress-nginx)
ingress:
enabled: true
className: nginx
host: kibana.example.com
annotations:
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
5. Advanced — escape hatches
# Extra kibana.yml settings
config:
logging.root.level: info
xpack.fleet.enabled: true
# Mount a custom keystore from a Secret
secureSettings:
- secretName: kibana-saml-settings
# Stack monitoring: ship Kibana metrics/logs to another ES cluster
monitoring:
metrics:
elasticsearchRefs:
- name: monitoring-es
namespace: observability
# Arbitrary fields merged into spec
specExtra:
revisionHistoryLimit: 5
# Arbitrary fields merged into spec.podTemplate
podTemplateExtra:
spec:
dnsPolicy: ClusterFirst
Values reference
See values.yaml and values.schema.json for the complete shape. Highlights:
Top-level
| Key | Default | Description |
|---|---|---|
name | "" | CR name. Empty → Helm release name. |
version | tracks Chart.yaml appVersion — see values.yaml | Kibana version. Must be ≤ linked ES version. |
image | "" | Optional image override. |
replicas | 1 | Number of Kibana pods. |
elasticsearchRef.name | elasticsearch | ES CR name (same namespace unless namespace is set — requires ReferenceGrant). |
nodeOptions | ["--max-old-space-size=1800"] | NODE_OPTIONS env var on the container. |
resources | 100m/2Gi → 1000m/2Gi | Container resources. |
http.tls.selfSignedCertificate.disabled | true | Kibana serves plain HTTP on :5601 by default (ingress terminates TLS). Set back to {} to enable ECK self-signed HTTPS. |
config | {} | Free-form kibana.yml content. Secure-cookie settings auto-added when TLS is disabled. |
specExtra / podTemplateExtra / containerExtra | {} | Escape hatches. |
podTemplate / container
Structured passthrough for pod-level (nodeSelector, affinity, tolerations, topologySpreadConstraints, priorityClassName, initContainers, sidecars, volumes, podSecurityContext) and container-level (env, envFrom, volumeMounts, livenessProbe, readinessProbe, startupProbe, lifecycle, securityContext) fields.
Optional resources
| Block | Flag | Notes |
|---|---|---|
| ServiceAccount | serviceAccount.create | Creates SA; auto-wires via serviceAccountName. |
| PodDisruptionBudget | podDisruptionBudget.enabled | External policy/v1 PDB (Kibana is a Deployment). |
| HTTPRoute | httproute.enabled | Gateway API route; defaults backend to <fullname>-kb-http:5601. |
| Ingress | ingress.enabled | Legacy, kept for migration. |
| BackendTLSPolicy | backendTLSPolicy.enabled | Only when Kibana serves HTTPS + Gateway validates backend TLS. Default caCertificateRef.kind: ConfigMap → chart renders <fullname>-ca via helm lookup (requires Kibana Ready; re-run helm upgrade after first install). Set name: <custom> to point at an externally-managed ConfigMap; set kind: Secret only with a kubernetes.io/tls Secret (NGF rejects Opaque). |
Known limitations
helmfile diff/helm-diffshows spurious "removed" for the CA ConfigMap + BackendTLSPolicy when the defaultcaCertificateRef.kind: ConfigMapwith emptynameis used. Cause:helm-diffrenders target charts client-side;helm lookupreturns nil without cluster access. The actualhelm upgradereads the cluster and renders correctly. | ServiceMonitor |serviceMonitor.enabled| Prometheus scrape config. | | NetworkPolicy |networkPolicy.enabled| Full NetworkPolicy shape exposed (ingress/egress arrays). | | ReferenceGrant |referenceGrants[]| List of cross-namespace grants. |
Maintaining this chart
cd charts/kibana-eck
./upgrade.sh --dry-run # preview
./upgrade.sh # bump to latest GA (enforces version ≤ ES)
./upgrade.sh --version 9.1.2 # pin
./upgrade.sh --rollback # restore files
# After review:
make bump CHART=kibana-eck LEVEL=minor
make lint CHART=kibana-eck
make template CHART=kibana-eck
License
Apache-2.0
Deploy kibana-eck with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has kibana-eck on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartkibana-eck is pinned at v0.1.11 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply