Accessing PRODUCTION Django Console - OperationCode/back-end GitHub Wiki

To access the Django console on our production infrastructure you will first need to set up your workstation to access our Kubernetes Cluster.

One your workstation is set up, run this command to view a list of our Kubernetes pods:

$ kubectl get pods -n operationcode

You should see output similar to this:

back-end-b867668dc-8jjkl6                    2/2       Running   0          3d
back-end-b867668dc-chmxfa                    2/2       Running   0          3d
operationcode-frontend-65c997d69-hlhzg       1/1       Running   0          43m
operationcode-frontend-65c997d69-pfcf0       1/1       Running   0          43m
town-crier-6b698646fd-2sn4r                  1/1       Running   0          3d

Our Django application runs in the "back-end" pods (they should be identical).

Select on of the "back-end" pods, it doesn't matter which one, and run this command (substituting in the identifier of the back-end pod):

$ kubectl exec -it back-end-identifer -c app bash -n operationcode

This will put you into a container running our Django application. From there, run

$ python shell