How to create a superuser on prod - kubernetes with tutor

I deployed an openedx instance on google kubernetes engine with tutor, but I don’t see documentation on how to create a superuser/admin/staff. The only documentation I see is for doing it locally. Help?

Assuming you were following this documentation, you only have to replace the local sub command with k8s

tutor k8s do createuser --staff --superuser yourusername user@email.com

Should do the trick.

You can list the available commands by using the -h flag:

$ tutor k8s do -h
Usage: tutor k8s do [OPTIONS] JOB [ARGS]...

  Run a custom job in the right container(s).

Options:
  -h, --help  Show this message and exit.

Jobs:
  createuser                  Create an Open edX user and interactively...
  importdemocourse            Import the demo course
  init                        Initialise all applications
  print-edx-platform-setting  Print the value of an edx-platform Django...
  settheme                    Assign a theme to the LMS and the CMS.
  sqlshell                    Open an SQL shell as root

Depending on the version of Tutor or the installed plugins the list of commands might be different.

1 Like

Oh this is much simpler than I realized, thank you. I was trying to do tutor k8s exec do which was, predictably, failing. Much appreciated.