我已经在k8s https://github.com/PavelDemyanenko/kubernetes-keycloak/tree/master/kubernetes中准备了一些Keycloak的基本示例,其中有一个问题,当我在部署结束时部署Keycloak Helm Chart时,会出现这样的错误:
Normal Created 3m56s kubelet, oauth2-proxy-control-plane Created container keycloak
Normal Started 3m56s kubelet, oauth2-proxy-control-plane Started container keycloak
Warning Unhealthy 48s (x16 over 3m18s) kubelet, oauth2-proxy-control-plane Readiness probe failed: Get http://10.244.0.9:8080/auth/realms/master: dial tcp 10.244.0.9:8080: connect: connection refused
$ kubectl get pod -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
oauth2-proxy-example-0 0/1 Running 3 8h 10.244.0.9 oauth2-proxy-control-plane <none> <none>
oauth2-proxy-example-postgresql-0 1/1 Running 1 8h 10.244.0.10 oauth2-proxy-control-plane <none> <none>
config有什么问题,为什么它不能检查就绪探针?
更新
readinessProbe: |
httpGet:
path: /auth/realms/master
port: 9080
现在我得到了:
Warning Unhealthy 83s (x2 over 93s) kubelet, oauth2-proxy-control-plane Readiness probe failed: Get http://10.244.0.18:9080/auth/realms/master: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
答案 0 :(得分:1)
所以基本上我发现超时设置很有帮助
readinessProbe: |
httpGet:
path: /auth/realms/master
port: 9080
initialDelaySeconds: 30
timeoutSeconds: 30