ECK v1.4.0: spec.version: Invalid value: \"6.8.15\": Unsupported version"

Hello here.

I deployed an elasticsearch-eck-operator v1.4.0 on an OpenShift cluster, and created an elasticsearches.elasticsearch.k8s.elastic.co, the default elasticsearch version is 7.12.1, but I wanted to deploy elasticsearch 6.8.x, I added the below configurations in my elasticsearches.elasticsearch.k8s.elastic.co/quickstart instance:

spec:
  auth: {}
  http:
    service:
      metadata:
        creationTimestamp: null
      spec: {}
    tls:
      certificate: {}
  image: docker.elastic.co/elasticsearch/elasticsearch:6.8.15
  nodeSets:
  - config:
      node.store.allow_mmap: false
    count: 1
    name: default
    podTemplate:
      metadata:
        creationTimestamp: null
      spec:
        containers: null
    volumeClaimTemplates:
    - metadata:
        creationTimestamp: null
        name: elasticsearch-data
      spec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests:
            storage: 20Gi
        storageClassName: standard
      status: {}
  transport:
    service:
      metadata:
        creationTimestamp: null
      spec: {}
    tls:
      certificate: {}
  updateStrategy:
    changeBudget: {}
  version: 6.8.15

then I checked the logs in elastic-operator-58b9545d59-sdjl6 pod, it reported an error:

{"log.level":"error","@timestamp":"2021-05-14T08:43:14.665Z","log.logger":"elasticsearch-controller","message":"Elasticsearch manifest validation failed","service.version":"1.4.0+4aff0b98","service.type":"eck","ecs.version":"1.4.0","namespace":"openshift-operators","es_name":"quickstart","error":"Elasticsearch.elasticsearch.k8s.elastic.co \"quickstart\" is invalid: spec.version: Invalid value: \"6.8.15\": Unsupported version","error.stack_trace":"github.com/elastic/cloud-on-k8s/pkg/controller/elasticsearch.(*ReconcileElasticsearch).internalReconcile\n\t/go/src/github.com/elastic/cloud-on-k8s/pkg/controller/elasticsearch/elasticsearch_controller.go:249\ngithub.com/elastic/cloud-on-k8s/pkg/controller/elasticsearch.(*ReconcileElasticsearch).Reconcile\n\t/go/src/github.com/elastic/cloud-on-k8s/pkg/controller/elasticsearch/elasticsearch_controller.go:199\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.3/pkg/internal/controller/controller.go:244\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.3/pkg/internal/controller/controller.go:218\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.6.3/pkg/internal/controller/controller.go:197\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1\n\t/go/pkg/mod/k8s.io/apimachinery@v0.18.14/pkg/util/wait/wait.go:155\nk8s.io/apimachinery/pkg/util/wait.BackoffUntil\n\t/go/pkg/mod/k8s.io/apimachinery@v0.18.14/pkg/util/wait/wait.go:156\nk8s.io/apimachinery/pkg/util/wait.JitterUntil\n\t/go/pkg/mod/k8s.io/apimachinery@v0.18.14/pkg/util/wait/wait.go:133\nk8s.io/apimachinery/pkg/util/wait.Until\n\t/go/pkg/mod/k8s.io/apimachinery@v0.18.14/pkg/util/wait/wait.go:90"}

I had read Supported versions | Elastic Cloud on Kubernetes [1.4] | Elastic , it says elasticsearch 6.8 is supported.
What's the correct way to deploy elasticsearch 6.8 with elasticsearch-eck-operator-certified.v1.4.0 ?

BTW, the Kubernetes Version is v1.21.0-rc.0+6998007

Did you by any chance create the cluster with 7.12.1 first and then change the values in the manifest to 6.8.15? If so that would be a downgrade which we do not support. When you install the operator with a validating webhook this is validated. On OpenShift when the certified operator is installed through the OpenShift console there is unfortunately no webhook to validate that, which could explain the error message you are seeing.

Also it is not necessary to specify the docker image it is sufficient to specify the version attribute.

Thanks for your reply.

Yes, I deployed an ES cluster with 7.12.1 at first, then I updated the version to 6.8.15. I also tried to deploy an ECK operator, then create the elasticsearches.elasticsearch.k8s.elastic.co/quickstart instance with following content and hit the same issue.

apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: quickstart
spec:
  version: 6.8.15
  nodeSets:
  - name: default
    count: 1
    config:
      node.store.allow_mmap: false

Does this mean when deploy Elasticsearch cluster with certified operator on OpenShift, we can't customize the ES version? Do we have any workarounds ?

That is not what I was trying to say. You can of course deploy any supported Elasticsearch version. What you cannot do is downgrade an existing Elasticsearch cluster.

Just pick a different name for your Elasticsearch cluster and choose the version you want.

Hello,
I'm also trying to install the 6.8.15 version using the operator 1.5.0 in openshift, but we also get the unsupported version message:

Elasticsearch.elasticsearch.k8s.elastic.co "elasticsearch-sample" is invalid: [spec.nodeSets[0].config: Invalid value: v1.Config{Data:map[string]interface {}{"node.attr.attr_name":"attr_value", "node.roles":[]interface {}{"master", "data"}, "node.store.allow_mmap":false}}: node.roles setting is not available in this version of Elasticsearch, spec.nodeSets: Required value: Elasticsearch needs to have at least one master node, spec.version: Invalid value: "6.8.15": Unsupported version]

I've used to following manifest: (installing from scratch, no upgrade)

apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: quickstart
spec:
  version: 6.8.15
  nodeSets:
  - name: default
    count: 1
    config:
      node.store.allow_mmap: false

Is there some other parameter we should tune? 7.12.0 deploys just fine, but we need the 6.8.x version.
Thanks in advance!
Elio

Is it possible that you installed the ECK operator via OperatorHub as a certified Red Hat OpenShift operator?

This would explain why you cannot install 6.8.15. The reason is that certified OpenShift operators must only run on UBI based images. The Elastic Stack is available on UBI base images starting with version 7.10.0. This restriction is documented here Configure ECK | Elastic Cloud on Kubernetes [1.6] | Elastic (we need to make it more prominent in the documentation)

You can work around it by installing the operator via Helm or using the YAML manifests we offer on the our website. Please note that if you choose do so that you are then no longer running a certified OpenShift operator.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.