<p>I would like from time to time delete all my pods or replicaset to have a clean reboot of my services.</p>
<p>For example on my cluster I have</p>
<ul>
<li>service-1 (deployment)</li>
<li>service-2 (deployment)</li>
<li>app-1 (deployment)</li>
<li>app-2 (deployment)</li>
</ul>
<p>Each deployment have a replicaset and each replicaset have one or more pods.</p>
<p>I want to for example remove all my replicaset beginning by <code>service</code> so they will be able to start again from the deployment</p>
<p>I know that I can list all my rs or pods doing</p>
<pre><code>kubectl get rs | grep service
</code></pre>
<p>or</p>
<pre><code>kubectl get pods | grep service
</code></pre>
<p>I do not really know if this is better to remove all pods or rs, I always have some olds rs, I do not really know if they are useful</p>
<p>I want to find a command to restart all my pods or services beginning with <code>service</code> for example</p>

Ajouve
<p>to recreate the pods of your deployment use command: <code>kubectl rollout restart ${RESOURCENAME}</code> where resourcename is the name of the deployment</p>
