<p>I have deployed a spring boot application on a pod(pod1) on a node(node1). I have also deployed JMeter on another pod(pod2) on a different node(node2). I am trying to perform automated load testing from pod2. To perform load testing, I require to restart the pod1 for each test cases. How do I restart pod1 from pod2?</p>

anushiya-thevapalan
<p><strong>Via kubectl:</strong></p>

<p>Install kubectl and configure in the pod2 and then do <code>kubectl delete pod1</code> via shell after every load-testing</p>

<p><strong>Via Springboot:</strong></p>

<p>Add actuator dependency</p>

<pre><code>&lt;dependency&gt;
    &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
    &lt;artifactId&gt;spring-boot-starter-actuator&lt;/artifactId&gt;
&lt;/dependency&gt;
</code></pre>

<p>Enable shutdown</p>

<p><code>management.endpoint.shutdown.enabled=true</code></p>

<p>Request to shutdown</p>

<p><code>curl -X POST IP:port/actuator/shutdown</code></p>
