Kubespawner: spawns multiple server options running at the same time


  • User: A

  • Server Options(profile list): project_1, project_2, project_3

  • Requirement: User A can selectively start server project_1, project_2, project_3, and also allow User A to switch between servers

  • Potential solution 1: is to use API to stop a running server and start another server with a different project profile while switching project

  • Potential solution 2: having culler defined, and allow multiple servers with different server options running at the same time(faster for users to access servers through API). Need validation here to see if it’s feasible to do or if there is an easier way

JupyterHub supports named servers:

Does that work with your profiles?

1 Like

Thanks @manics , the named server works exactly as I expected:

curl -X POST https://********/hub/api/users/<user>/servers/dev_some-project 
-H "Accept: application/json" 
-H "Authorization: token <jupyterhub API token>" 
--data-raw '{"profile":"project_1, 2 or 3"}'

and just config culler as needed:

  enabled: true
  timeout: 600
  every: 300
  maxAge: 900 # 15 mins
1 Like