KubeKanvas Logo
  • Features
  • Pricing
  • Templates
    • How KubeKanvas works
    • Docs
    • Downloads
    • Blog
    • E-Book
    • Tutorials
  • FAQs
  • Contact
  • Features
  • Pricing
  • Templates
    • How KubeKanvas works
    • Docs
    • Downloads
    • Blog
    • E-Book
    • Tutorials
  • FAQs
  • Contact
Back to Templates

Deploy Plausible Analytics on Kubernetes: Self-Hosted Stack

Self-hosting website analytics often requires complex orchestration of separate transactional and analytical databases. This configuration deploys Plausible CE on Kubernetes with PostgreSQL for operational data and ClickHouse for analytics events, producing a GDPR-compliant, cookie-free analytics stack accessible at a local domain.

What's Included

ComponentTypePortRole
plausibleNamespace-Isolates all resources under plausible
plausible-pg-pvcPersistentVolumeClaim-10 GB for PostgreSQL data
plausible-ch-pvcPersistentVolumeClaim-20 GB for ClickHouse events
plausible-pg-configConfigMap-PostgreSQL env vars
plausible-pg-secretSecret-PostgreSQL password
plausible-ch-configConfigMap-ClickHouse env vars
plausible-ch-secretSecret-ClickHouse password
plausible-ch-filesConfigMap-config.xml and users.xml as mounted files
plausible-app-configConfigMap-Plausible env vars (BASE_URL, DB URLs)
plausible-app-secretSecret-SECRET_KEY_BASE
plausible-postgresStatefulSet5432PostgreSQL 16: OLTP store for users and config
plausible-postgres-serviceService (ClusterIP)5432Internal DNS only
plausible-clickhouseDeployment8123/9000ClickHouse: OLAP store for events
plausible-clickhouse-serviceService (ClusterIP)8123/9000Internal DNS only
plausibleDeployment8000App server with 3 init containers
plausible-serviceService (ClusterIP)8000Internal: Ingress routes here
nginxIngressClass-Declares NGINX as default ingress class
plausible-ingressIngress80Routes plausible.local to app service
plausible-hpaHorizontalPodAutoscaler-Scales Plausible pods from 1 to 3 replicas
plausible-quotaResourceQuota-Namespace resource cap
plausible-limitsLimitRange-Per-container defaults
plausible-postgres-netpolNetworkPolicy5432PostgreSQL: Plausible pods only
plausible-clickhouse-netpolNetworkPolicy8123/9000ClickHouse: Plausible pods only
plausible-app-netpolNetworkPolicy8000Plausible: NGINX ingress only

Architecture Overview

PostgreSQL stores users, sites, and goals, while ClickHouse stores every pageview for fast aggregation. The Plausible pod is the only component that talks to both databases, a constraint enforced by NetworkPolicies. Three sequential init containers ensure both databases are ready and migrations complete before the main application starts. NGINX Ingress forwards real client IPs for accurate geo data parsing.

Prerequisites

  • NGINX Ingress Controller deployed in the ingress-nginx namespace
  • 6 GB RAM available to the cluster node
  • 127.0.0.1 plausible.local added to your hosts file
  • KubeKanvas CLI installed and running on your computer (Optional, if you want to use one-click deployment)

How to Deploy

  1. Confirm the NGINX Ingress Controller is running in the ingress-nginx namespace.
  2. Generate a SECRET_KEY_BASE value using openssl rand -hex 64, base64-encode it, and replace the placeholder in the plausible-app-secret manifest.
  3. Update the storage paths in both PVCs to match your operating system filesystem structure.
  4. Deploy the template to your cluster via the Play button in the top right bar. If you prefer to deploy manually, download the YAML and apply it with kubectl.
  5. Wait for all pods to reach Running status. You can monitor progress in the Release Monitor screen.

How to Test

  1. Run kubectl get pods -n plausible and confirm all three pods show a status of Running.
  2. Open http://plausible.local in your browser and confirm the Plausible admin setup screen loads.
  3. Create your admin account, add a test site, and confirm the analytics dashboard renders.
  4. Execute an HTTP GET request against http://plausible.local/api/health and confirm the JSON response shows healthy.

Use Cases

  • Privacy-first analytics: Replace Google Analytics with a cookie-free, GDPR-compliant alternative where all data stays on your own infrastructure.
  • Air-gapped deployments: Run an analytics platform that requires no external internet access to record or display traffic data once deployed.
  • Multi-site tracking: Aggregating multiple tracking scripts into one instance using isolated dashboards and goals.
  • High-volume event storage: Scale from a personal blog to a high-traffic site using ClickHouse as an analytical data store without changing the architecture.

Summary

This template configures a 24-resource Kubernetes stack running Plausible CE with PostgreSQL for operational data and ClickHouse for analytics events, exposed via NGINX Ingress with per-component ConfigMap, Secret, and NetworkPolicy isolation.

Tags:
PlausiblekuberneteskubekanvasOLAPOLTPclickhouse
Created by:
Sidd
Deploy Plausible Analytics on Kubernetes: Self-Hosted Stack template preview
0 uses
KubeKanvas Logo
Visual Kubernetes cluster design tool that helps you create, manage, and deploy your applications with ease.
Product
  • Features
  • Pricing
  • Templates
Resources
  • Blog
  • Tutorials
Company
  • About Us
  • Contact
  • Terms of Service
  • Privacy Policy
  • Impressum
XGitHubLinkedIn
© 2026 KubeKanvas. All rights reserved.