freeleaps-ops/cluster/manifests/freeleaps-data-platform/metabase
2025-08-21 11:07:48 +08:00
..
metabase-deployment.yaml deploy metabase 2025-08-21 11:07:48 +08:00
metabase-ingress.yaml deploy metabase 2025-08-21 11:07:48 +08:00
metabase-postgres.yaml deploy metabase 2025-08-21 11:07:48 +08:00
README.md deploy metabase 2025-08-21 11:07:48 +08:00

Metabase Deployment

Overview

This directory contains Kubernetes manifests for deploying Metabase, a business intelligence and analytics platform, along with its PostgreSQL database.

Components

1. metabase-postgres.yaml

PostgreSQL database deployment:

  • Persistent storage for data
  • ConfigMap for database configuration
  • Secret for database password
  • Service for internal communication

2. metabase-deployment.yaml

Metabase application deployment:

  • Metabase container with latest image
  • Persistent storage for application data
  • Environment variables for database connection
  • Health checks and resource limits
  • Service for internal communication

3. metabase-ingress.yaml

Ingress configuration for external access:

  • Nginx ingress class
  • Multiple host support (metabase.freeleaps.cluster, metabase.local)
  • SSL redirect disabled for development

Deployment Steps

1. Deploy PostgreSQL Database

kubectl apply -f metabase-postgres.yaml

2. Wait for PostgreSQL to be Ready

kubectl wait --for=condition=ready pod -l app=metabase-postgres -n metabase --timeout=300s

3. Deploy Metabase Application

kubectl apply -f metabase-deployment.yaml

4. Deploy Ingress (Optional)

kubectl apply -f metabase-ingress.yaml

5. Monitor Deployment

kubectl get pods -n metabase
kubectl get services -n metabase
kubectl get ingress -n metabase

Configuration

Database Connection

  • Type: PostgreSQL
  • Host: metabase-postgres
  • Port: 5432
  • Database: metabase
  • User: metabase
  • Password: metabasepassword

Storage

  • Metabase Data: 10Gi persistent storage
  • PostgreSQL Data: 5Gi persistent storage
  • Storage Class: azure-disk-std-ssd-lrs

Resources

  • Metabase: 512Mi-1Gi memory, 250m-500m CPU
  • PostgreSQL: 256Mi-512Mi memory, 250m-500m CPU

Access

Internal Access

External Access (with Ingress)

Initial Setup

  1. First Access: Navigate to the Metabase URL
  2. Setup Wizard: Follow the initial setup wizard
  3. Database Connection: Use the internal PostgreSQL connection
  4. Admin User: Create the first admin user
  5. Data Sources: Connect to your data sources

Troubleshooting

Check Pod Status

kubectl get pods -n metabase
kubectl describe pod <pod-name> -n metabase

Check Logs

kubectl logs <pod-name> -n metabase
kubectl logs <pod-name> -n metabase -c postgres  # for PostgreSQL

Check Services

kubectl get services -n metabase
kubectl describe service metabase -n metabase

Check Storage

kubectl get pvc -n metabase
kubectl describe pvc metabase-data -n metabase

Notes

  • Initial Startup: Metabase may take 2-3 minutes to start up on first deployment
  • Database: Ensure PostgreSQL is fully ready before deploying Metabase
  • Storage: Both Metabase and PostgreSQL use persistent storage for data persistence
  • Security: Default password is base64 encoded, consider changing for production use