How-to access PostHog Cloud infra

Last updated:

We've all been there. Something was just merged and now there is a bug that you are having a real hard time pinning down. You hate to do it... but you need to get on a pod or instance to troubleshoot the issue further. SHAME

Shame bell

Prerequisite

Make sure you've followed this guide to get AWS access. !!! Please follow the whole document !!!

Connect to a Kubernetes pod

After you got access to the EKS cluster and our internal network:

  • kubectl -n posthog get pods (get names of pods, you'll want a "web" pod most likely)
  • kubectl -n posthog exec --stdin --tty <POD_NAME> -- /bin/bash (get a shell to the running container)
  • kubectl -n posthog exec <POD_NAME> env (run individual commands in a container)

Note: if you need a Django shell, just run the following after connecting:

Terminal
python manage.py shell_plus

Connect to an EC2 instance

Please follow this guide to connect via AWS Systems Manager Agent (SSM).

Questions?

Was this page useful?

Next article

Developing the website

You can contribute to the PostHog documentation, handbook, and blog in two ways: You can create a pull request in GitHub for any page that has an Edit this page link on it. In this situation you must edit the page using the GitHub web editor interface. This method is suitable for text-only edits and basic file manipulation, such as renaming. You can run the posthog.com website locally and make changes there by creating a branch of the master codebase, committing changes to that branch and…

Read next article