Ī have set up a jupyter server instance on kubernetes. The login prompt screen is the following
I exec into the pod, run jupyter notebook list, and in the two boxes at the bottom of the screenshot I enter the token returned by the above command and a password.
I then log in, log out and I am prompted again with the same screen
When I insert the password / token I created in the previous step in the Password or token field at the top of the screen, I get an invalid credentials response.
(or in your case, since you appear to be using the older notebook server, jupyter notebook password).
It will prompt for your password, and then create (or add to) a config file (jupyter_server_config.json for the new server, jupyter_notebook_config.json for the old one).
If you add JUPYTER_CONFIG_DIR=$PWD, then it will create this file in your current directory. You can then add this file to your container, and password authentication will be enabled with the password you specified.
For the full command (Iām using jupyter server):
$ JUPYTER_CONFIG_DIR=$PWD jupyter server password
Enter password:
Verify password:
[JupyterPasswordApp] Wrote hashed password to ./jupyter_server_config.json
$ cat jupyter_server_config.json
{
"IdentityProvider": {
"hashed_password": "argon2:$argon2id$v=19$m=10240,t=10,p=8$4wUfa8Ikw4hqftKpmYbgLA$QC/iREH2JhL9MV95Uqr5X6CVipzYdFfgS1TGtuy1Hlc"
}
}
You can add this file via a secret volume to your container, e.g. mounting it in /etc/jupyter/jupyter_server_config.json
Again, if you are using the legacy notebook server, replace server with notebook in filenames and commands above.