Kubernetes

Setup using Kubernetes and Helm

Setup using Kubernetes

Deploy Wraft on Kubernetes using our official Helm charts. This provides a production-ready setup with all required services.

Prerequisites

  • Kubernetes 1.16+
  • Helm 3.0+
  • PV provisioner support in the underlying infrastructure
  • Minimum 2 vCPUs, 4GB RAM, 20GB storage

Quick Start

# Add the Wraft Helm repository
helm repo add wraft https://wraft.github.io/charts
 
# Install Wraft
helm install wraft wraft/wraft

Installation Options

# Install specific version
helm install wraft wraft/wraft --version 0.1.7
 
# Install with custom values
helm install wraft wraft/wraft --values my-values.yaml
 
# Install to specific namespace
helm install wraft wraft/wraft --namespace wraft --create-namespace

What's Included

The Helm chart includes:

  • Frontend: Web interface
  • Backend: API services
  • Database: PostgreSQL
  • Search Engine: Typesense
  • Object Storage: MinIO
  • Ingress: Configurations for external access

Configuration

Basic Configuration

Create a values.yaml file with your custom configuration:

# Example values.yaml
image:
  repository: wraft/wraft
  tag: "latest"
  pullPolicy: IfNotPresent
 
ingress:
  enabled: true
  className: "nginx"
  hosts:
    - host: wraft.yourdomain.com
      paths:
        - path: /
          pathType: Prefix
 
postgresql:
  enabled: true
  auth:
    postgresPassword: "your-secure-password"
    database: "wraft"
 
minio:
  enabled: true
  auth:
    rootUser: "minioadmin"
    rootPassword: "your-secure-password"
 
typesense:
  enabled: true
  auth:
    apiKey: "your-typesense-api-key"

Environment Variables

Configure the following environment variables in your values:

  • SECRET_KEY_BASE
  • DATABASE_URL
  • MINIO_ROOT_USER / MINIO_ROOT_PASSWORD
  • TYPESENSE_API_KEY
  • CLOAK_KEY
  • GUARDIAN_KEY

Services and Ports

  • Frontend: Web interface accessible via Ingress
  • Backend API: Internal service
  • MinIO Console: Object storage management
  • PostgreSQL: Database service
  • Typesense: Search engine service

Storage

The Helm installation creates Persistent Volume Claims for:

  • Redis
  • PostgreSQL
  • MinIO

Make sure your cluster has a default Storage Class or create Persistent Volumes manually.

Scaling

Enable horizontal pod autoscaling:

autoscaling:
  enabled: true
  minReplicas: 1
  maxReplicas: 10
  targetCPUUtilizationPercentage: 80

Upgrading

# Update helm repositories
helm repo update
 
# Check current version
helm list
 
# Upgrade to latest version
helm upgrade wraft wraft/wraft -f values.yaml

Uninstalling

# Remove the deployment
helm delete wraft
 
# Remove persistent volumes (manual cleanup required)
kubectl delete pvc --selector=app.kubernetes.io/instance=wraft

Troubleshooting

Persistent Volume Issues

If you see "pod has unbound immediate PersistentVolumeClaims":

  1. Ensure your cluster has a default Storage Class
  2. Or create Persistent Volumes manually with appropriate sizes
  3. Check that PVCs can be satisfied by available PVs

Access Issues

  1. Verify Ingress configuration
  2. Check service endpoints
  3. Ensure proper network policies

External Dependencies

To use external PostgreSQL or Redis instead of the included ones:

postgresql:
  enabled: false
 
redis:
  enabled: false
 
# Configure external database connection
env:
  DATABASE_URL: "postgresql://user:password@external-host:5432/wraft"
  REDIS_URL: "redis://external-host:6379"

Monitoring

Enable monitoring and logging:

monitoring:
  enabled: true
  serviceMonitor:
    enabled: true

For more detailed configuration options, refer to the Wraft Charts repository.

On this page