Kubernetes 1.16 logstash舵聊天在版本“ apps / v1beta2”中与“ StatefulSet”类型不匹配

时间:2019-11-08 13:15:53

标签: kubernetes kubernetes-helm

我正在尝试在Kubernetes集群1.16上部署Logstash头盔。但是它给出以下错误信息。如何为此掌舵图更新此kubernets 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

谢谢

2 个答案:

答案 0 :(得分:1)

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

稳定/ logstash 图表已经has a commit,已升级了API版本。确保您使用的是apps/v1图表版本,并且该版本应该可以使用。例如:

2.3.0

答案 1 :(得分:0)

发生这些情况时,您始终可以使用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版本。