# Kubespawner: spawns multiple server options running at the same time

**URL:** <https://discourse.jupyter.org/t/kubespawner-spawns-multiple-server-options-running-at-the-same-time/22721>\
**Category:** Zero to JupyterHub on Kubernetes\
**Tags:** jupyterhub, how-to, help-wanted\
**Created:** [December 4, 2023, 8:54pm UTC](https://discourse.jupyter.org/t/kubespawner-spawns-multiple-server-options-running-at-the-same-time/22721 "2023-12-04T20:54:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yambottle](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/yambottle/32/10975_2.png) [@yambottle](https://discourse.jupyter.org/u/yambottle)\
**Post date:** [December 4, 2023, 8:54pm UTC](https://discourse.jupyter.org/t/kubespawner-spawns-multiple-server-options-running-at-the-same-time/22721/1 "2023-12-04T20:54:46Z")

</div>

Example:

- 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**

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [December 5, 2023, 2:11pm UTC](https://discourse.jupyter.org/t/kubespawner-spawns-multiple-server-options-running-at-the-same-time/22721/2 "2023-12-05T14:11:36Z")

</div>

JupyterHub supports named servers:

> **[Configuration Reference](https://z2jh.jupyter.org/en/stable/resources/reference.html#hub-allownamedservers)**
>
> The JupyterHub Helm chart is configurable by values in your config.yaml. In this way, you can extend user resources, build off of different Docker images, manage security and authentication, and mo...

Does that work with your profiles?

---

<div class="post-metadata">

**Author:** ![yambottle](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/yambottle/32/10975_2.png) [@yambottle](https://discourse.jupyter.org/u/yambottle)\
**Post date:** [December 13, 2023, 6:28pm UTC](https://discourse.jupyter.org/t/kubespawner-spawns-multiple-server-options-running-at-the-same-time/22721/3 "2023-12-13T18:28:47Z")

</div>

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

```auto
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:

```auto
cull:
  enabled: true
  timeout: 600
  every: 300
  maxAge: 900 # 15 mins

```
