Deploying the High Availability (HA) Keycloak Helm chart alongside an external High Availability PostgreSQL Database within Kubernetes ensures consistent availability for your identity and access management solution.
- makefile
- kubectl
- helm
- git
- jq
- Ingresscontroller like Nginx or Traefik
git clone <Github-Repo-URL>
Before you can deploy it, you have at least to adjust the variable KEYCLOAK_URL in the Makefile.
High Availability : For optimal high availability, it's recommended to deploy a minimum of two replicas for Keycloak and three replicas for PostgreSQL. This redundancy ensures that even if one instance fails, the system can continue to operate without interruptions.
make all
- PostgreSQL Operator
- PostgreSQL Database
- Keycloak
If you installed the Ingresscontroller Traefik, you can use this snippet to make your application reachable from outside the kubernetes cluster:
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: keycloak
namespace: keycloak
spec:
entryPoints:
- web
- websecure
routes:
- match: Host(`keycloak.example.com`)
kind: Rule
services:
- name: keycloak
port: 80
tls: {}
The most variables are defined in the Makefile like versions, namespaces and your domain that you would like to use. Additional you can increae the instances of the PostgreSQL setup in the postgres-db.yaml file.
Also, please make sure to use the commented out nodeAffinity option to distribute your pods across different nodes.