【问题标题】:Readiness probe failed & connection refused inside kubernetes准备就绪探测失败并在 kubernetes 内拒绝连接
【发布时间】:2020-08-31 13:25:45
【问题描述】:

我在 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)

【问题讨论】:

    标签: kubernetes keycloak


    【解决方案1】:

    所以基本上我发现超时设置有帮助

     readinessProbe: |
        httpGet:
          path: /auth/realms/master
          port: 9080
        initialDelaySeconds: 30
        timeoutSeconds: 30
    

    【讨论】:

    • 并且应该有端口转发 kubectl port-forward svc/ingress-nginx-controller 8080:80 -n ingress-nginx
    猜你喜欢
    • 2019-10-12
    • 2020-08-01
    • 2021-01-28
    • 1970-01-01
    • 2019-12-05
    • 2018-07-10
    • 2022-10-15
    • 2021-02-06
    • 2023-03-11
    相关资源
    最近更新 更多