# Hook to create JupyterHub instance in specified namespace

**URL:** https://discourse.jupyter.org/t/hook-to-create-jupyterhub-instance-in-specified-namespace/2349
**Category:** Zero to JupyterHub on Kubernetes
**Tags:** how-to
**Created:** [October 8, 2019, 11:25pm UTC](https://discourse.jupyter.org/t/hook-to-create-jupyterhub-instance-in-specified-namespace/2349 "2019-10-08T23:25:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rajiv.abraham](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/rajiv.abraham/32/793_2.png) [@rajiv.abraham](https://discourse.jupyter.org/u/rajiv.abraham)
#### Post date: [October 8, 2019, 11:25pm UTC](https://discourse.jupyter.org/t/hook-to-create-jupyterhub-instance-in-specified-namespace/2349/1 "2019-10-08T23:25:05Z")

</div>

Hi,  
Is it possible, when a user logs in to his instance the first time(and subsequently), to run a python script which uses some internal logic to determine which kubernetes namespace to assign him/her to and then create the notebook instance in that namespace?  
Rationale: We are a multi-tenant platform and plan to sequester tenants by namespaces for security and billing purposes.
