如何修复 Spring Cloud Data Flow Kubernetes 容器准备探测失败:HTTP 探测失败,状态码:401 [英] How to fix Spring Cloud Data Flow Kubernetes container Readiness probe failed: HTTP probe failed with statuscode: 401

查看:51
本文介绍了如何修复 Spring Cloud Data Flow Kubernetes 容器准备探测失败:HTTP 探测失败,状态码:401的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

已使用 Helm 在 Azure AKS 上部署 Spring Cloud Data flow:helm install --name my-release stable/spring-cloud-data-flow

Have deployed Spring Cloud Data flow on Azure AKS using Helm: helm install --name my-release stable/spring-cloud-data-flow

Data Flow Server Implementation
Name: spring-cloud-dataflow-server
Version: 2.0.1.RELEASE

但是获取 Liveness 探测和就绪探测失败 401:

But getting Liveness probe and Readiness probe failed 401:

Events:
  Type     Reason     Age                   From                               Message
  ----     ------     ----                  ----                               -------
  Warning  Unhealthy  10m (x52 over 103m)   kubelet, aks-nodepool1-28921497-0  Liveness probe failed: HTTP probe failed with statuscode: 401
  Warning  BackOff    6m8s (x138 over 73m)  kubelet, aks-nodepool1-28921497-0  Back-off restarting failed container
  Warning  Unhealthy  67s (x220 over 104m)  kubelet, aks-nodepool1-28921497-0  Readiness probe failed: HTTP probe failed with statuscode: 401

阅读此文档 https://docs.spring.io/spring-cloud-dataflow/docs/2.0.2.RELEASE/reference/htmlsingle/#_application_and_server_properties

deployer.appName.kubernetes.probeCredentialsSecret=myprobesecret

deployer.appName.kubernetes.probeCredentialsSecret=myprobesecret

但是如果仅使用 Helm 在 AKS 集群上部署数据流,如何设置/运行部署者属性?

But how to Set/Run the deployer properties if using Helm only to deploy Data Flow on AKS cluster ?

或者如何使用默认的 ProbeSecret 进行发布?使用 Helm 部署 DataFlow 时,我没有创建或修改 ProbeSecret.

Or how to make the release using the default ProbeSecret ? I did not create or modify ProbeSecret when deploying the DataFlow with Helm.

谢谢

推荐答案

我们支持多种部署属性,您可以在 SCDF 中覆盖每个流/任务部署.probeCredentialsSecret 属性就是其中之一,它专门设计用于提供一个秘密来访问受保护的活性和就绪探测器.

We support a variety of deployer properties that you can override per stream/task deployment in SCDF. The probeCredentialsSecret property is one of them and it is specifically designed to supply a secret to gain access to a protected liveness and readiness probes.

无论您是否使用 Helm 在 K8s 上配置 SCDF,都需要在流/任务部署时提供实际属性.

Whether or not you used Helm to provision SCDF on K8s, the actual property needs to be supplied at the time of stream/task deployment.

除非您创建一个秘密并在 SCDF 中配置它,否则您将无法与安全探针成功握手.

Unless you create a secret and configure it in SCDF, you will not be able to successfully handshake with the secured probes.

请按照 参考.指南 通过示例介绍配置.

Please follow the ref. guide that walks through the configuration with an example.

这篇关于如何修复 Spring Cloud Data Flow Kubernetes 容器准备探测失败:HTTP 探测失败,状态码:401的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆