【问题标题】:Kubernetes 1.16 logstash helm chat no matches for kind "StatefulSet" in version "apps/v1beta2"Kubernetes 1.16 logstash helm chat 没有匹配版本“apps/v1beta2”中的种类“StatefulSet”
【发布时间】:2020-03-05 03:08:04
【问题描述】:

我正在尝试在 kubernetes 集群 1.16 上部署 logstash helm。但它给出以下错误消息。如何更新此 helm 图表的 Kubernetes API 更改?

helm install --name logstash stable/logstash -f values.yaml 
Error: validation failed: unable to recognize "": no matches for kind "StatefulSet" in version "apps/v1beta2"

https://github.com/helm/charts/tree/master/stable/logstash

谢谢

【问题讨论】:

  • 如果你发出helm template <logstash_dir_path>,你会得到什么?没有错误?

标签: kubernetes kubernetes-helm


【解决方案1】:

Kubernetes 1.16 deprecated apps/v1beta2 API 版本。您需要改用apps/v1

stable/logstash 图表已经has a commit 升级了 API 版本。确保您使用的是 2.3.0 图表版本,它应该可以工作。例如:

helm repo update
helm install --name logstash stable/logstash --version=2.3.0 -f values.yaml 

【讨论】:

    【解决方案2】:

    当这些事情发生时,您可以随时使用kubectl exaplain 命令来获取正确版本的 API。

    例子:

    $ kubectl explain statefulset
    KIND:     StatefulSet
    VERSION:  apps/v1
    
    DESCRIPTION:
         StatefulSet represents a set of pods with consistent identities. Identities
         are defined as: - Network: A single stable DNS and hostname. - Storage: As
         many VolumeClaims as requested. The StatefulSet guarantees that a given
         network identity will always map to the same storage identity.
    
    FIELDS:
       apiVersion   <string>
         APIVersion defines the versioned schema of this representation of an
         object. Servers should convert recognized schemas to the latest internal
         value, and may reject unrecognized values. More info:
         https://git.k8s.io/community/contributors/devel/api-conventions.md#resources
    
       kind <string>
         Kind is a string value representing the REST resource this object
         represents. Servers may infer this from the endpoint the client submits
         requests to. Cannot be updated. In CamelCase. More info:
         https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds
    
       metadata     <Object>
    
       spec <Object>
         Spec defines the desired identities of pods in this set.
    
       status       <Object>
         Status is the current status of Pods in this StatefulSet. This data may be
         out of date by some window of time.
    

    如您所见,在版本下,它说明了集群支持的特定对象的 API 版本。

    【讨论】:

      猜你喜欢
      • 2021-01-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-24
      • 2021-11-14
      • 2019-12-17
      • 2022-07-07
      • 1970-01-01
      相关资源
      最近更新 更多