I am trying to deploy keycloak on a kubernetes cluster and when I am trying to login to admin console it is returning “Cookie not found”. Even under application cookie I don’t see any cookies. Below is my deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: keycloak-deployment
labels:
app: keycloak
spec:
replicas: 1
selector:
matchLabels:
app: keycloak
template:
metadata:
labels:
app: keycloak
spec:
containers:
- name: keycloak
image: keycloak:v0.0.1
resources:
requests:
memory: 500Mi
cpu: 100m
limits:
memory: 500Mi
cpu: 300m
imagePullPolicy: Always
env:
- name: KC_DB
value: postgres
- name: KC_DB_URL_HOST
valueFrom:
configMapKeyRef:
key: DB_HOST_URL
name: postgres-config
- name: KC_DB_URL_DATABASE
valueFrom:
configMapKeyRef:
key: DB_NAME
name: postgres-config
- name: KC_DB_URL_PORT
valueFrom:
configMapKeyRef:
key: DB_PORT
name: postgres-config
- name: KC_DB_SCHEMA
valueFrom:
configMapKeyRef:
key: KEYCLOAK_SCHEMA
name: postgres-config
- name: KC_DB_PASSWORD
valueFrom:
secretKeyRef:
key: DB_PWD
name: postgres-credentials
- name: KC_DB_USERNAME
valueFrom:
secretKeyRef:
key: DB_USER
name: postgres-credentials
- name: KEYCLOAK_ADMIN
valueFrom:
secretKeyRef:
name: keycloak-credentials
key: KEYCLOAK_ADMIN
- name: KEYCLOAK_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: keycloak-credentials
key: KEYCLOAK_ADMIN_PASSWORD
- name: image.debug
value: "true"
ports:
- containerPort: 8080
The same deployment I do on minikube and access the service via minikube service keycloak-service --url
it is showing cookie and also letting me login to admin console.
I tried most of the solutions provided for similar question