failed to load plugin class in elasticsearch.xpack.security when upgrading to 7.9.0

6/13/2021

I am using it in a kubernetes cluster as part of the a magento app. I need to upgrade my elastic version to 7.9.0. My current version is 7.8.0 and it is working:

apiVersion: elasticsearch.k8s.elastic.co/v1beta1
kind: Elasticsearch
metadata:
  name: elasticsearch
  namespace: default
spec:
  version: 7.8.0
  nodeSets:
  - name: elasticsearch
    count: 1
    config:
      node.master: true
      node.data: true
      node.ingest: true
      node.store.allow_mmap: false
      xpack.security.authc:
        anonymous:
          username: anonymous
          roles: superuser
          authz_exception: false
    podTemplate:
      spec:
        containers:
        - name: elasticsearch
          env:
          - name: ES_JAVA_OPTS
            value: -Xms512m -Xmx512m
          resources:
            requests:
              memory: 1Gi
              cpu: 0.5
            limits:
              memory: 1Gi
              cpu: 1
  http:
    tls:
      selfSignedCertificate:
        disabled: true

When I change to 7.9.0, it crashes with the error:

failed to load plugin class [org.elasticsearch.xpack.security.Security

Any idea how to fix?

-- justadev
elasticsearch
kubernetes

1 Answer

6/14/2021

It was solved by using v1 instead of v1beta:

apiVersion: elasticsearch.k8s.elastic.co/v1
-- justadev
Source: StackOverflow