Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions keycloak-next/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
# img folder
img/
# Changelog
CHANGELOG.md
9 changes: 9 additions & 0 deletions keycloak-next/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dependencies:
- name: postgresql
repository: oci://registry-1.docker.io/bitnamicharts
version: 16.7.26
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
version: 2.31.4
digest: sha256:d92824e04bd8b3d71ee395ef556c8476badbf15ee7fca655e503933dc90df3eb
generated: "2025-08-20T12:56:42.787734637Z"
36 changes: 36 additions & 0 deletions keycloak-next/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
annotations:
category: DeveloperTools
images: |
- name: keycloak
image: docker.io/bitnami/keycloak:26.3.3-debian-12-r0
- name: keycloak-config-cli
image: docker.io/bitnami/keycloak-config-cli:6.4.0-debian-12-r11
licenses: Apache-2.0
tanzuCategory: application
apiVersion: v2
appVersion: 26.3.3
dependencies:
- condition: postgresql.enabled
name: postgresql
repository: oci://registry-1.docker.io/bitnamicharts
version: 16.x.x
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
tags:
- bitnami-common
version: 2.x.x
description: Keycloak is a high performance Java-based identity and access management
solution. It lets developers add an authentication layer to their applications with
minimum effort.
home: https://bitnami.com
icon: https://dyltqmyl993wv.cloudfront.net/assets/stacks/keycloak/img/keycloak-stack-220x234.png
keywords:
- keycloak
- access-management
maintainers:
- name: Broadcom, Inc. All Rights Reserved.
url: https://github.com/bitnami/charts
name: keycloak
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/keycloak
version: 25.2.0
64 changes: 64 additions & 0 deletions keycloak-next/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Keycloak Helm Deployment
## Overview

This repository contains configuration files for deploying Keycloak on Kubernetes using the official Bitnami Legacy Keycloak Helm chart.

Keycloak provides identity and access management (IAM) with support for Single Sign-On (SSO), OAuth2, OpenID Connect, and SAML.


# Prerequisites

Ensure the following are installed:

Kubernetes cluster (K8s v1.23+ recommended)

Helm v3+

kubectl configured to access your cluster

Bitnami Sealed Secrets

External database (PostgreSQL)


## Install Keycloak
```bash
helm install keycloak ./keycloak-next --namespace keycloak -f values.yaml
```

## Upgrade Release
```bash
helm upgrade keycloak ./keycloak-next --namespace keycloak -f values.yaml
```

## Uninstall Keycloak
```bash
helm uninstall keycloak --namespace keycloak
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So @sahithya23 when we run this, it will use the current default kubectl context to deploy to the switched context env, right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About Template Folder
The templates/ folder is part of the Helm chart structure. It contains the Kubernetes manifest templates that Helm renders at install time.
They define the Keycloak Kubernetes resources such as Deployment, Service, Secrets, etc. Helm uses these templates along with the values.yaml file to generate the actual manifests deployed to the cluster.

Since we are using prepackaged helm chart, template folder has all the resources, we are controlling their behavior through values.yaml file using enabled: true/false
with this helm chart these resources are created: stateful set, service, secrets, pvc.

We can have separate values file for each environment so that we can use same chart across all environments.

About kube context when running Helm
Yes, that's correct — when running the Helm install command, it will deploy to the currently active Kubernetes context set in the user's kubeconfig.

```


## Access Keycloak
```bash
export SERVICE_PORT=$(kubectl get --namespace keycloak -o jsonpath="{.spec.ports[?(@.name=='http')].port}" services keycloak)

kubectl port-forward --namespace keycloak svc/keycloak ${SERVICE_PORT}:${SERVICE_PORT} &
```


# Using Sealed Secrets

### Generate Secret:
```bash
kubectl create secret generic keycloak-secret \
--from-literal=postgresql-password="YOUR_DB_PASSWORD" \
--dry-run=client -o yaml > keycloak-secret.yaml
```

### Seal it:
```bash
kubeseal --format yaml < keycloak-secret.yaml > sealed-keycloak-secret.yaml
```
### Apply:
```bash
kubectl apply -f sealed-keycloak-secret.yaml
```
26 changes: 26 additions & 0 deletions keycloak-next/charts/common/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
# img folder
img/
# Changelog
CHANGELOG.md
23 changes: 23 additions & 0 deletions keycloak-next/charts/common/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
annotations:
category: Infrastructure
licenses: Apache-2.0
apiVersion: v2
appVersion: 2.31.4
description: A Library Helm Chart for grouping common logic between bitnami charts.
This chart is not deployable by itself.
home: https://bitnami.com
icon: https://dyltqmyl993wv.cloudfront.net/downloads/logos/bitnami-mark.png
keywords:
- common
- helper
- template
- function
- bitnami
maintainers:
- name: Broadcom, Inc. All Rights Reserved.
url: https://github.com/bitnami/charts
name: common
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/common
type: library
version: 2.31.4
Loading
Loading