8.2. Get a Shell in a Pod#

The database isn’t setup in the Pod. You could do that by manually logging in to the Pod and running the createsuperuser command. That’s also helpful for debugging:

$ kubectl exec --stdin --tty  pod/mysite-pod -- /bin/bash 
root@mysite-pod:/mysite# python manage.py migrate
root@mysite-pod:/mysite# python manage.py createsuperuser 
...

Just like when you first ran the Docker container, the pod is using ephemeral storage for the database. Soon we’ll create a PersistentVolumeClaim to fix that. But for now it’s okay just to manually setup the database.