With this in mind, let's redeploy our Elasticsearch service in a declarative manner, using kubectl apply. But first, we must delete our existing Deployment. We can do that with kubectl delete:
$ kubectl delete deployment elasticsearch
$ kubectl get deploymentsNo resources found.