1
votes

I am trying to deploy the logstash helm on kubernetes cluster 1.16. but it giving below error message. How to update this Kubernetes API change for this helm chart?

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

Thanks

2
what do you get if you issue helm template <logstash_dir_path> ? no errors?Ezwig

2 Answers

3
votes

Kubernetes 1.16 deprecated the apps/v1beta2 API version. You need to use apps/v1 instead.

The stable/logstash chart already has a commit that upgraded the API version. Make sure that you are using the 2.3.0 chart version and it should work. E.g:

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

When these things happen, you can always use kubectl exaplain command to get the right version of the API.

Example:

$ 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.

As you can see, under version, it states the API version the cluster supports, for that specific object.