Skip to content

[Backport release-1.0] fix(keycloak): use management port health endpoints for probes#2178

Merged
kvaps merged 2 commits intorelease-1.0from
backport-2162-to-release-1.0
Mar 10, 2026
Merged

[Backport release-1.0] fix(keycloak): use management port health endpoints for probes#2178
kvaps merged 2 commits intorelease-1.0from
backport-2162-to-release-1.0

Conversation

@github-actions
Copy link

Description

Backport of #2162 to release-1.0.

mattia-eleuteri and others added 2 commits March 10, 2026 07:15
Keycloak 26.x exposes dedicated health endpoints on the management
port (9000) via /health/live and /health/ready. The previous probes
used GET / on port 8080 which redirects to the configured KC_HOSTNAME
(HTTPS), causing kubelet to fail the probe with "Probe terminated
redirects" and eventually kill the pod in a crashloop.

Changes:
- Add KC_HEALTH_ENABLED=true to activate health endpoints
- Expose management port 9000 in container ports
- Switch liveness probe to /health/live on port 9000
- Switch readiness probe to /health/ready on port 9000
- Increase failure thresholds for more tolerance during startup

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: mattia-eleuteri <[email protected]>
(cherry picked from commit 0873691)
Use a startupProbe to defer liveness/readiness checks until Keycloak
has fully started, instead of relying on initialDelaySeconds. This is
more robust for applications with variable startup times.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Signed-off-by: mattia-eleuteri <[email protected]>
(cherry picked from commit d18ed79)
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. bug Something isn't working labels Mar 10, 2026
@kvaps kvaps merged commit ca330b2 into release-1.0 Mar 10, 2026
5 checks passed
@kvaps kvaps deleted the backport-2162-to-release-1.0 branch March 10, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants