<p>I'd like to restart my service every day in the morning. When I do it manually I just remove the pod on GCP and it starts again. Alternatively I can use:</p>

<pre><code>helm delete service_name-dev --purge
helm install service_name/ --namespace dev --name service_name-dev --values=service_name/google-dev-values.yaml
</code></pre>

<p>It would be easy to schedule it on my laptop, but is it possibile to schedule it on Google Cloud Platform so the service would be rebooted on the given time?</p>

Bartłomiej Szałach
<p>You can create a <code>CronJob</code> object, set it to the schedule you need. Additionally, you need to create the necessary <code>ServiceAccount</code>, <code>Role</code> and <code>RoleBinding</code> resources for it, so it can delete the pods. </p>

<p>When you get those right, you can use the service account token that is mounted into your cronjob pod, to issue, for example, <code>kubectl delete pod -l &lt;your-app-label&gt;</code>. You could do it via kubectl, or through any Kubernetes client library in any language.</p>

<p>Please note that it is actually a bad practice to kill the application periodically, and most possibly an indicator to a problem in the application's design.</p>
