我完全是 key-cloak 和 keycloak-gatekeeper 的新手我在我的机器上运行 keycloak,地址为 localhost:8080,因为我的网守在 minikube 环境中运行以下是我的配置和部署文件
apiVersion: apps/v1
kind: Deployment
metadata:
name: gatekeeperdeployment
labels:
app: gatekeeperapp
spec:
replicas: 1
selector:
matchLabels:
app: gatekeeperapp
template:
metadata:
labels:
app: gatekeeperapp
spec:
containers:
- image: keycloak/keycloak-gatekeeper:7.0.0
imagePullPolicy: IfNotPresent
name: gatekeeperalone
ports:
- containerPort: 3000
args:
- --config=/etc/secrets/config.yml
- --redirection-url=http://127.0.0.1:3000
- --upstream-url=http://192.168.99.101:30732
- --resources=uri=/prods
- --enable-logging=true
- --enable-json-logging=true
- --verbose=true
volumeMounts:
- name: secret
mountPath: /etc/secrets
volumes:
- name: secret
secret:
secretName: secret-gatekeeper
我的配置文件如下:
client-id: ems
client-secret: 17a9da01-880a-432c-ba5a-8cbf131d5634
discovery-url: http://127.0.0.1:8180/auth/realms/ems_realm
redirection-url: http://127.0.0.1:3000
upstream-url: http://192.168.99.101:30732
skip-upstream-tls-verify: true
skip-openid-provider-tls-verify: true
encryption-key: 1234567898765431
listen: 3000
secure-cookie: false
enable-logging: true
enable-json-logging: true
enable-default-deny: true
enable-refresh-tokens: true
enable-session-cookies: true
debug: true
ingress.enabled: true
resources:
- uri: /prods
我已经在 discovery-url 参数中设置了 localhost 路径。
因此,通过上述配置,我无法与 keycloak 进行通信。请提供有关此行为的一些指导。非常感谢任何形式的帮助。