PostHog Handbook Library / Engineering

155 words. Estimated reading time: 1 min.

# How-to access PostHog Cloud infra

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_

Image: 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:

    python manage.py shell_plus

#### Connect to an EC2 instance

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

Canonical URL: https://posthog.com/handbook/engineering/how-to-access-posthog-cloud-infra

GitHub source: contents/handbook/engineering/how-to-access-posthog-cloud-infra.md

Content hash: `1a0d3302feffc690`

Static reader notes

- `MDX_COMPONENT_STATIC_ADAPTER`: Adapted interactive MDX components for static reading: POD_NAME.