ECK Operator 1.4 stuck in deployment - Error: no matches for kind "EnterpriseSearch" in version "enterpriseseach.k8s.elastic.co/v1"

Hi, I am trying to deploy eck operator 1.4 but it gets stuck. Using eck operator 1.3.2 deployment works as expected. Also, I've using latest version of elasticsearch 7.12.0 and kibana version 7.12.0.

I have attached the log from the pod:

Error: no matches for kind "EnterpriseSearch" in version "enterpriseseach.k8s.elastic.co/v1"

Any suggestions? Thanks.

How are you deploying the operator? It looks like you're missing the CRD.

I am trying to deploy the operator using a yaml definition file created through our CI/CD Jenkins pipelines. When I test it using ECK Operator 1.3.2, it works, but when testing 1.4.0, it fails.

If you check the file, you will see that we are already defined the CRDs in the spec file, so I don't understand why the CRD could be missing. What could be the main difference between operator 1.3.2 and 1.40 that is breaking our code when we try to install it? Thanks!

As suggested by the error message the v1 version of enterpriseseach.k8s.elastic.co does not exist in your manifest. It only contains enterpriseseach.k8s.elastic.co/v1beta1 :

apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.2.5
  creationTimestamp: null
  name: enterprisesearches.enterprisesearch.k8s.elastic.co
spec: [...]
  version: v1beta1
  versions:
  - name: v1beta1
    served: true
    storage: true

Here is what your file should look like (this is from last version of the all-in-one):

apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  annotations:
    controller-gen.kubebuilder.io/version: v0.5.0
  creationTimestamp: null
  labels:
    app.kubernetes.io/instance: 'elastic-operator'
    app.kubernetes.io/name: 'eck-operator-crds'
    app.kubernetes.io/version: '1.5.0'
  name: enterprisesearches.enterprisesearch.k8s.elastic.co
spec: [...]
  version: v1 # Here is the definition of the v1 version
  versions:
  - name: v1
    served: true
    storage: true
  - name: v1beta1
    served: true
    storage: false

I would recommend to keep your CI/CD Jenkins pipeline in sync with the relevant version of the all-in-one or with the related branch of the manifest generator.

1 Like

Thanks Michael, I was able to deploy Elastic using the all-in-one version 1.5.0 of the operator.