<p>I deployed an <a href="https://www.elastic.co/elasticsearch" rel="noreferrer">elasticsearch</a> cluster on K8S using this command <code>helm install elasticsearch elastic/elasticsearch</code>.</p>
<p>I can see the pod is running:</p>
<pre><code>$ kubectl get pods
NAME                             READY   STATUS    RESTARTS   AGE
elasticsearch-master-0           0/1     Running   0          4m30s
kibana-kibana-5697fc485b-qtzzl   0/1     Running   0          130m
</code></pre>
<p>The service looks good as well:</p>
<pre><code>$ kubectl get services
NAME                            TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)             AGE
elasticsearch-master            ClusterIP   10.105.59.248   &lt;none&gt;        9200/TCP,9300/TCP   4m50s
elasticsearch-master-headless   ClusterIP   None            &lt;none&gt;        9200/TCP,9300/TCP   4m50s
kibana-kibana                   ClusterIP   10.104.31.124   &lt;none&gt;        5601/TCP            6d7h
kubernetes                      ClusterIP   10.96.0.1       &lt;none&gt;        443/TCP             10d
</code></pre>
<p>But there is no <code>deployment</code> for the <a href="https://www.elastic.co/elasticsearch" rel="noreferrer">elasticsearch</a>:</p>
<pre><code>$ kubectl get deployments
NAME            READY   UP-TO-DATE   AVAILABLE   AGE
kibana-kibana   0/1     1            0           6d7h
</code></pre>
<p>I'd like to restart the <a href="https://www.elastic.co/elasticsearch" rel="noreferrer">elasticsearch</a> pod and I have searched that people say to use <code>kubectl scale deployment --replicas=0</code> to terminate the pod. But there is no deployment for the <code>elasticsearch</code> cluster, In this case, how can I restart the <a href="https://www.elastic.co/elasticsearch" rel="noreferrer">elasticsearch</a> pod?</p>

Joey Yi Zhao
<p>The <code>elasticsearch-master-0</code> rise up with a statefulsets.apps resource in k8s.</p>
<p><code>statefulsets</code> apps is like Deployment object but different in the naming for pod.
You should delete the pod and the statefulsets recreate the pod.</p>
<pre><code>    kubectl delete pods elasticsearch-master-0
</code></pre>
