Get list of all JupyterHub users?

10/16/2019

I am running JupyterHub (version 0.8.2) on a AWS-managed kubernetes cluster (EKS).

I need to determine a way to get a list of all users. Not just the currently active users. How can I do this? It seems that the admin web UI page only shows a subset of the more recent users.

There must be some way, since JupyterHub saves the state for each user when they return

-- James Wierzba
amazon-eks
amazon-web-services
jupyterhub
kubernetes

1 Answer

10/21/2019

I found a kubernetes pod audit logs in the AWS CloudWatch logs. If you simply extract all unique logs that show a Running pod with name "jupyter-{username}", that will give you a comprehensive list of all users.

To enable these logs for EKS you need to enable "Audit" logging in the "Logging" section of the EKS console.

See https://docs.aws.amazon.com/eks/latest/userguide/control-plane-logs.html for more info

Note: this is only useful if you are running your JupyterHub application on AWS-managed kubernetes (EKS)

-- James Wierzba
Source: StackOverflow