【问题标题】:Kubernetes VPA failed to fetch list of containers. Reason: context deadline exceeded. Last server error: <nil>Kubernetes VPA 未能获取容器列表。原因:超出上下文期限。上次服务器错误:<nil>
【发布时间】:2020-01-30 18:04:58
【问题描述】:

您好,我正在尝试为我的一项部署部署 VPA 对象,但在描述条件时失败并出现错误

Status:
 Conditions:
   Last Transition Time:  2020-01-08T13:03:55Z
   Message:               Fetching history failed: Failed to fetch list of containers. Reason: context deadline exceeded. Last server error: <nil>
   Reason:                2020-01-08T13:03:55Z
   Status:                False
   Type:                  FetchingHistory
   Last Transition Time:  2020-01-08T13:03:55Z
   Status:                False
   Type:                  LowConfidence
   Last Transition Time:  2020-01-08T13:03:55Z
   Message:               No pods match this VPA object
   Reason:                NoPodsMatched
   Status:                True
   Type:                  NoPodsMatched
   Last Transition Time:  2020-01-08T13:03:55Z
   Status:                True
   Type:                  RecommendationProvided

这是我的 VPA 文件:

apiVersion: autoscaling.k8s.io/v1beta2
kind: VerticalPodAutoscaler
metadata:
  name: xtenter-vpa
  namespace: mynamespace
spec:
  targetRef:
    apiVersion: "extensions/v1beta1"
    kind:       Deployment
    name:       mydeploy
  updatePolicy:
    updateMode: "Auto"

我发现的另一种情况是,当我在 updatePolicy 模式为“关闭”的情况下运行 VPA 时,我在 VPA 的状态中遇到了不同的错误。

 Conditions:
    Last Transition Time:  2020-01-10T06:53:55Z
    Message:               Fetching history failed: Failed to fetch list of containers. Reason: Failed to listTimeSerises with retries. Last server error: rpc error: code = InvalidArgument desc = Name must begin with '{resource_container_type}/{resource_container_id}', got: projects/
    Reason:                2020-01-10T06:53:55Z
    Status:                False
    Type:                  FetchingHistory
    Last Transition Time:  2020-01-10T06:44:55Z
    Status:                False
    Type:                  LowConfidence
    Last Transition Time:  2020-01-10T06:44:55Z
    Message:               No pods match this VPA object
    Reason:                NoPodsMatched
    Status:                True
    Type:                  NoPodsMatched
    Last Transition Time:  2020-01-10T06:44:55Z
    Status:                True
    Type:                  RecommendationProvided

集群详情: 版本:1.13.11-gke.14 Stackdriver Kubernetes Engine 监控:已停用 旧版 Stackdriver 日志记录:已启用

您能帮我了解一下这里的根本原因吗?

【问题讨论】:

  • 您正在运行的哪个命令会出现上述错误?
  • 当它尝试读取我的部署的指标时出现此错误。我在描述 vpa 时发现了这个错误
  • 您的指标服务器是否正常工作?你能运行 kubectl 顶级节点等吗?
  • 嘿,我发现这个thread 可以帮助您解决问题
  • @Arghya 是的,我可以执行 kubectl top 命令@Alexandre 谢谢,我检查了 Stackdriver 仪表板中的指标,所有 CPU 和内存指标都即将到来。

标签: kubernetes google-kubernetes-engine


【解决方案1】:

通过遵循此documentation,我能够在 GKE 集群版本 1.14.7-gke.25 中部署 VPA 而没有任何错误。我建议你也试试;这可能会帮助您确定当前配置的任何问题。

【讨论】:

    【解决方案2】:

    感谢 Imtiaz,会尝试,但 Kubernetes autoscaler 1.13.11-gke.14 中存在一个问题,该问题将得到修复。请查看以下链接 https://github.com/kubernetes/autoscaler/issues/2725#issuecomment-575134855

    【讨论】:

      猜你喜欢
      • 2022-07-06
      • 1970-01-01
      • 2019-05-07
      • 2021-12-23
      • 1970-01-01
      • 2017-03-24
      • 2020-05-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多