<p>I have setup the kubernetes with one master and two Workers, but I am facing one issue.</p>

<p>I have created the apache pod; it will deployed on worker1 automatically by the scheduler. It works fine. When I stop the worker one machine, ideally pod will be generated on worker2. The problem is that it takes around 7 minutes to come online on workers2.</p>

<p>Is there any way to fail the pod over without any downtime?</p>

<p>There will be a minor downtime unless you have multiple replicas (apache replicas) and have a Kubernetes service forwarding to them on your system. This is generally the architecture is recommended for HTTP/TCP type of services.</p>

<p>However, if you need faster response you could tweak:</p>

<ul>
<li><code>--node-status-update-frequency</code> on the kubelet. (Default 10 seconds)</li>
<li><code>--kubelet-timeout</code> on the kube-apiserver. Which defaults to a low 5 seconds.</li>
<li><code>–-node-monitor-period</code> on the kube-controller-manager. Defaults to 5 seconds.</li>
<li><code>-–node-monitor-grace-period</code> on the kube-controller-manager. Defaults to 40 seconds.</li>
<li><code>-–pod-eviction-timeout</code> on the kube-controller-manager. Defaults to 5 minutes.</li>
</ul>

<p>You can try something like this:</p>

<ul>
<li>kubelet: <code>--node-status-update-frequency=4s</code> (from 10s)</li>
<li>kube-controller-manager: <code>--node-monitor-period=2s</code> (from 5s)</li>
<li>kube-controller-manager: <code>--node-monitor-grace-period=16s</code> (from 40s)</li>
<li>kube-controller-manager: <code>--pod-eviction-timeout=30s</code> (from 5m)</li>
</ul>
