Setting kubernetes pod fields and using multiple replica sets



I have two questions about the kubernetes configuration for ShinyProxy:

Is there a way to set pod/deployment fields other than namespace? I am using node labeling and node selectors but there is no way to set that for the pods that ShinyProxy creates. The pods can appear on any one of my AWS auto scaling groups. We would like to contain all ShinyProxy pods to particular nodes by setting nodeSelector.

Other fields that I was able to get around were requests and limits. I was able to use a limit range on the namespace to make sure the created sp-pods had some kind of default resource management.

Is ShinyProxy designed to run in a replica set greater than 1? I was getting weird behavior when I tried 2. I had two nodes that each contained one ShinyProxy pod. When I launched an app, a sp-pod was created and everything was working fine. Once I refreshed the page, the other ShinyProxy pod picked up the request and created a new sp-pod. I lost the previously existing pod and what was running on it.

I was trying to make ShinyProxy highly available, in case a node goes down, but replica set doesn’t seem to be the way.



Hi @MichaelCal,

For point 1, there is indeed no support for that currently, but it sounds like a useful addition to me. Please feel free to submit a feature request or pull request on

For point 2, since ShinyProxy is a stateful application, I think the solution is to enable sticky sessions by using SessionAffinity on the ShinyProxy service:

Client-IP based session affinity can be selected by setting service.spec.sessionAffinity to “ClientIP” (the default is “None”), and you can set the max session sticky time by setting the field service.spec.sessionAffinityConfig.clientIP.timeoutSeconds if you have already set service.spec.sessionAffinity to “ClientIP” (the default is “10800”).



Hi @fmichielssen,

Thanks for the reply. There is already a pull request for point 1:

I will check out SessionAffinity and see if that helps.


@MichaelCal: Following the pull request ShinyProxy 2.1.0 now supports setting a node-selector for a Kubernetes cluster using proxy.kubernetes.node-selector - see