Is there a way to restart a Elasticsearch cluster without using kubectl delete?
The context is that I have no access to run any cli commands (including kubectl commands), I can only deploy yaml files through kustomize. I now want to install a plugin (ingest-attachment) in the existing container, but it only installs when the container is initialised.
With other kinds of deployments I can set replica:0 then set it back to 1 to imitate a delete and restart, but for kind:Elasticsearch I cannot set nodeSets count to 0, otherwise it throws an error and cannot be deployed.
Is there any possible work around allowing me to install the plugin on the Elasticsearch container?
below is the Elasticsearch yaml file:
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
name: elastic-test
spec:
version: 7.11.1
auth:
roles:
- secretName: elastic-roles-secret
fileRealm:
- secretName: elastic-filerealm-secret
nodeSets:
- name: default
count: 1
config:
node.store.allow_mmap: false
volumeClaimTemplates:
- metadata:
name: azure-pvc
spec:
storageClassName: ""
accessModes:
- ReadWriteMany
resources:
requests:
storage: 25Gi
volumeName: elasticsearch-azure-pv
podTemplate:
spec:
initContainers:
- name: install-plugins
command:
- sh
- -c
- |
bin/elasticsearch-plugin install --batch ingest-attachment