我正在尝试在 kubernetes 集群上部署 keycloak,当我尝试登录管理控制台时,它返回“未找到 Cookie”。即使在应用程序 cookie 下,我也看不到任何 cookie...
我正在尝试在 kubernetes 集群上部署 keycloak,当我尝试登录管理控制台时,它返回“未找到 Cookie”。即使在应用程序 cookie 下,我也看不到任何 cookie。以下是我的部署
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
我在 minikube 上执行相同的部署并通过它访问服务, minikube service keycloak-service --url
显示 cookie 并允许我登录管理控制台。
我尝试了针对类似问题提供的大多数解决方案