Skip to main content

Kubernetes

This guide provides instructions for deploying Hook0 on a Kubernetes cluster using a deployments.yaml file.

Development Only

This configuration is intended for development and testing purposes only, not for production use.

This setup does not address production concerns such as:

  • Scalability - handling increased load and traffic
  • Resilience - fault tolerance and recovery
  • High availability - minimizing downtime
  • Observability - monitoring, logging, and alerting
  • 24/7 operations - on-call support and incident management

For production workloads, use Hook0 Cloud which provides a fully managed, production-ready infrastructure.

Prerequisites

  • A functioning Kubernetes cluster
  • kubectl tool access
  • Persistent storage capacity for PostgreSQL and Mailpit services

Core Components

The deployment establishes five main services:

  • API endpoint
  • Frontend interface
  • Mailpit for email management
  • PostgreSQL database
  • Output Worker for webhook processing

Deployment Process

1. Namespace Creation

First, create a dedicated hook0 namespace:

kubectl create namespace hook0

2. Service Deployment

Apply the complete YAML configuration file:

kubectl apply -f deployments.yaml -n hook0

3. Verification

Confirm all pods reach "Running" state:

kubectl get pods -n hook0

Troubleshoot failures with pod descriptions:

kubectl describe pod <pod-name> -n hook0

4. Service Access

Retrieve external IPs or NodePorts:

kubectl get services -n hook0

5. Storage Management

PVCs automatically handle data persistence, with default 100Mi allocations per service.

6. Configuration Customization

Modify environment variables like DATABASE_URL and APP_URL as needed in the deployment files.

7. Troubleshooting

Common issues to address:

  • Image availability
  • Storage class compatibility
  • Network access configuration

Cleanup

To delete the Hook0 deployment:

kubectl delete namespace hook0

This removes all associated cluster resources.