I need to restart the Elasticsearch node after installing the injest-attachment plugin on Kubernetes Engine on Google Cloud Platform. I have deployed Elasticsearch on a pod. What is the best way to restart the Elasticsearch nodes?
If you have deployed elasticsearch with a replication set, Kubernetes will enforce the number of desired pods automatically so you can simply kill the existing pod and a new one can be created.
kubectl delete pods example-pod-1812877987If Elasticsearch is running directly on the VM:
systemctl restart elasticsearchIf Elasticsearch is running as a container on docker:
docker restart <container-id>If Elasticsearch is running as a Kubernetes pod (deployed through a Kubernetes manifest):
kubectl applykubectl replace or kubectl edit commandsOn Kubernetes, ideally, you should use the declarative way of updating the manifests and then do a kubectl apply -f