<p>Suppose in my microservice architecture, I have a microservice that receives API calls, and sends the required RPCs to other microservices in order to respond the calls. Let's call it <code>server</code>.</p>
<p>In order to be exposed to outside world, I have a <code>NodePort</code> Service for this microservice named after its name (<code>server</code>).
Currently I am using RabbitMQ for my inter-service communications, and <code>server</code> is talking to other microservices via RMQ queues.</p>
<p>Now I want to deploy a service mesh and use gRPC for inter-service communications. So I need to create K8s Service for gRPC port for all of my microservices with their microservice name (including <code>server</code>). However, the K8s Service with name <code>server</code> already exists and I need to change the name of that <code>NodePort</code> in order to be able to create its gRPC Service, but K8s doesn't let me change the Service name. If I delete the <code>NodePort</code> and create another one with a new name, my application would be down for that couple of seconds.</p>
<p>Final question is, how can I achieve renaming this <code>NodePort</code> while having my application available to users?</p>

<p>You can do the following:</p>
<ol>
<li><p>Create a brand new NodePort service &quot;server-renamed&quot; (with the same selectors and everything as &quot;server&quot;)</p>
</li>
<li><p>Change your microservices config to use it and check all is OK</p>
</li>
<li><p>Remove the &quot;server&quot; service and recreate it with the new required specs.</p>
</li>
</ol>
