I deployed the latest operator version 1.4.0 and it was successful. I created a Elasticsearch instance using the yaml below:
    apiVersion: elasticsearch.k8s.elastic.co/v1
    kind: Elasticsearch
    metadata:
      name: elasticsearch-instance
    spec:
      nodeSets:
        - name: master-nodes
          count: 3
          config:
            node.roles: ["master"]
            nodeStoreAllowMmap: false
            xpack.ml.enabled: true
            node.remote_cluster_client: false
          podTemplate:
            metadata:
              labels:
                foo: bar
            spec:
              containers:
                - name: elasticsearch
                  resources:
                    limits:
                      cpu: 2
                      memory: 4Gi
                    requests:
                      cpu: 1
                      memory: 4Gi
          volumeClaimTemplates:
          - metadata:
              name: elasticsearch-data
            spec:
              accessModes:
              - ReadWriteOnce
              resources:
                requests:
                  storage: 5Gi
        - name: data-nodes
          count: 5
          config:
            node.roles: ["data", "ml", "ingest", "transform"]
            node.remote_cluster_client: false
          volumeClaimTemplates:
          - metadata:
              name: elasticsearch-data
            spec:
              accessModes:
              - ReadWriteOnce
              resources:
                requests:
                  storage: 15Gi
      version: 7.11.1
However, none of my pods are starting. All the init containers are failing on the license check with the below log message:
unsupported_distribution
I understand the default elastic search uses the Basic license. In my case, it seems it cannot find it.
Please help