PostHog
1. Deploy
You can deploy production ready PostHog on Zeet using the Helm chart workflow.
First navigate to Helm deploy using the following link.
https://zeet.co/new/helm?repo=https://helm.zeet.dev/&chart=posthog
2. Basic Configuration
In the deployment UI you can leave namespace empty or assign a custom value.
The Release name will be referenced as $ZEET_APP_ID below.
Here is the minimal required configuratinon to get PostHog running.
ingress:
hostname: "$ZEET_APP_ID.$ZEET_CLUSTER_DOMAIN"
kafka:
externalZookeeper:
servers:
- $ZEET_APP_ID-posthog-zookeeper:2181
Replace $ZEET_APP_ID and $ZEET_CLUSTER_NAME with your own configuration.
For example if your posthog deployment's name is my-posthog
and your cluster's name is zeet-unicorn
the correct configruation would be
ingress:
hostname: "my-posthog.zeet-unicorn.zeet.app"
kafka:
externalZookeeper:
servers:
- my-posthog-posthog-zookeeper:2181
3. Production Configuration
If you are running PostHog in production with large event volume, we recommend use these settings
ingress:
hostname: "${ZEET_APP_ID}.${ZEET_CLUSTER_DOMAIN}"
clickhouse:
persistence:
size: 200Gi
tolerations:
- effect: NoSchedule
operator: "Exists"
key: zeet.co/dedicated
resources:
requests:
cpu: 2
memory: 12G
postgresql:
persistence:
size: 50Gi
kafka:
externalZookeeper:
servers:
- ${ZEET_APP_ID}-posthog-zookeeper:2181
persistence:
size: 200Gi
logRetentionBytes: _150_000_000_000
events:
hpa:
enabled: true
tolerations:
- effect: NoSchedule
operator: "Exists"
key: zeet.co/dedicated
resources:
requests:
cpu: 2
memory: 6G
pgbouncer:
hpa:
enabled: true
resources:
requests:
cpu: 0.5
memory: 1G
plugins:
hpa:
enabled: true
resources:
requests:
cpu: 1
memory: 2G
web:
hpa:
enabled: true
resources:
requests:
cpu: 1
memory: 2G
worker:
hpa:
enabled: true
resources:
requests:
cpu: 1
memory: 2G
4. Final Result
Posthog Cluster will take around 5-10 minutes to finish initializing on the first deploy
The posthog instance will be available at $ZEET_APP_ID.$ZEET_CLUSTER_DOMAIN
Using the previous example, the posthog url would be
https://my-posthog.zeet-unicorn.zeet.app
You can now continue to setup PostHog.
5. Custom Domain Name
If you want to make posthog use custom domain name you can simply change ingress.hostname to the following
ingress:
hostname: "cool-name.cool-company.com"
In your DNS provider you would need to setup the following record
CNAME cool-name.cool-company.com => $ZEET_CLUSTER_DOMAIN
The value for ZEET_CLUSTER_DOMAIN would be zeet-unicorn.zeet.app
from the previous example.
Resources
- Discord: Join Now
- PostHog: https://posthog.com