<p>I have a containerized legacy application using <strong>VNC</strong> as an <strong>XServer</strong>.
I'd like to run this application in a <strong>Kubernetes</strong> cluster, and start an application instance on-demand, when a new user logs in the system.</p>
<p>I'd like to</p>
<ul>
<li>scale the number of PODs on-demand and not automatically with the <em>replicas</em> property</li>
<li>provide unique host/port to the clients to connect to their own VNC server?</li>
</ul>
<p>How can I achieve this in K8S?</p>

Vereb
<p>Your question is a bit contradictory, since on-demand scaling is a variant of automatic scaling.
Given your constraints you could create a custom application in which users request their connection data. Upon request your application talks to the kubernetes api and scales up the number of instances.</p>
<p>You would use a headless service to get the list of endpoints and associate a specific endpoint to a user. Your application would reserve a specific port for that user. You then have to create a new nodeport or loadbalancer service to expose this port of your application that forwards to the chosen instance.</p>
<p>After all this sounds like a lot of effort, perhaps your concept is not a good match for kubernetes.</p>
