<p>I have a load balanced deployment of spring boot service A, say on a 3 node kubernetes cluster.</p>

<p>I also have a requirement to enable quick configuration management without needing to rebuild+deploy a full blown rebaked image.</p>

<p>For that I put together a spring boot config-server, as well as implemented the Actuator restart on service A which when calling its /restart endpoint on a local single instance deployment it refreshes and loads with the properties fetched from the config-server.</p>

<p>So far so good, but...</p>

<p>How can the above be achieved when service A is deployed on a larger scale k8s deployment with 3, 30 or 300 instances of service A?</p>

<p>Calling /refresh endpoint must be handled by the load balancer as any other REST call on the cluster, meaning it is routed to one of the service instances.</p>

<p>Is there a standard way in springboot-on-k8s I can call each service instance ignoring the LB?</p>

<p>We don't really use the actuator's restart, instead what we do is, utilize the rollingUpdate strategy of deployment.  When we want to "restart" the pods, we issue a kubectl patch.  </p>

<pre><code>kubectl patch deployment web -p  "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"date\":\"`date +'%s'`\"}}}}}"
</code></pre>

<p>A good documentation of the upgrade strategy.  </p>

<p><a href="https://www.google.com/url?sa=t&amp;source=web&amp;rct=j&amp;url=https://medium.com/platformer-blog/enable-rolling-updates-in-kubernetes-with-zero-downtime-31d7ec388c81&amp;ved=2ahUKEwjIqtbW_bvfAhUKRY8KHas6DEkQjjgwAnoECAkQAQ&amp;usg=AOvVaw3HjD4CUoG4ma3HWxquaYjp&amp;cshid=1545776336374" rel="nofollow noreferrer">https://www.google.com/url?sa=t&amp;source=web&amp;rct=j&amp;url=https://medium.com/platformer-blog/enable-rolling-updates-in-kubernetes-with-zero-downtime-31d7ec388c81&amp;ved=2ahUKEwjIqtbW_bvfAhUKRY8KHas6DEkQjjgwAnoECAkQAQ&amp;usg=AOvVaw3HjD4CUoG4ma3HWxquaYjp&amp;cshid=1545776336374</a></p>
