Kubernetes Deployment
Bizon Platform provides a Helm chart for Kubernetes deployments.
Prerequisites
Section titled “Prerequisites”- Kubernetes cluster (1.24+)
- Helm 3.x
- PostgreSQL (managed or in-cluster)
- Ingress controller (optional)
Quick Start
Section titled “Quick Start”-
Add Helm Repository
Terminal window helm repo add bizon https://charts.bizon.iohelm repo update -
Create Values File
values.yaml postgresql:enabled: trueauth:password: your-secure-passwordapi:env:JWT_SECRET_KEY: your-jwt-secretENCRYPTION_KEY: your-encryption-keyingress:enabled: truehost: bizon.your-domain.com -
Install
Terminal window helm install bizon bizon/bizon-platform -f values.yaml
Helm Chart Structure
Section titled “Helm Chart Structure”helm/bizon-platform/├── Chart.yaml├── values.yaml├── templates/│ ├── api-deployment.yaml│ ├── api-service.yaml│ ├── worker-deployment.yaml│ ├── ui-deployment.yaml│ ├── ui-service.yaml│ ├── ingress.yaml│ ├── configmap.yaml│ ├── secret.yaml│ └── _helpers.tplConfiguration
Section titled “Configuration”values.yaml
Section titled “values.yaml”# Image configurationimage: repository: bizon/platform tag: latest pullPolicy: IfNotPresent
# API configurationapi: replicas: 2 resources: limits: cpu: 2000m memory: 2Gi requests: cpu: 500m memory: 512Mi env: JWT_SECRET_KEY: "" # Required ENCRYPTION_KEY: "" # Required CORS_ALLOWED_ORIGINS: '["https://bizon.example.com"]'
# Worker configurationworker: replicas: 4 resources: limits: cpu: 1000m memory: 1Gi requests: cpu: 250m memory: 256Mi env: WORKER_POLL_INTERVAL: "2"
# UI configurationui: replicas: 2 resources: limits: cpu: 500m memory: 256Mi
# PostgreSQL (Bitnami subchart)postgresql: enabled: true auth: database: bizon username: bizon password: "" # Required primary: persistence: size: 20Gi
# External PostgreSQL (if postgresql.enabled=false)externalDatabase: host: "" port: 5432 database: bizon username: bizon password: ""
# Ingressingress: enabled: false className: nginx host: bizon.example.com tls: enabled: true secretName: bizon-tls
# Service accountserviceAccount: create: true name: bizonDeployment Patterns
Section titled “Deployment Patterns”Single Namespace
Section titled “Single Namespace”All components in one namespace:
kubectl create namespace bizonhelm install bizon bizon/bizon-platform -n bizon -f values.yamlExternal Database
Section titled “External Database”Use managed PostgreSQL (RDS, Cloud SQL):
postgresql: enabled: false
externalDatabase: host: your-postgres.rds.amazonaws.com port: 5432 database: bizon username: bizon password: your-passwordHigh Availability
Section titled “High Availability”api: replicas: 3 affinity: podAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - weight: 100 podAffinityTerm: topologyKey: kubernetes.io/hostname
worker: replicas: 6Secrets Management
Section titled “Secrets Management”Using Kubernetes Secrets
Section titled “Using Kubernetes Secrets”# Create secret manuallykubectl create secret generic bizon-secrets \ --from-literal=jwt-secret-key=your-jwt-secret \ --from-literal=encryption-key=your-encryption-key \ --from-literal=db-password=your-db-password
# Reference in values.yamlapi: envFrom: - secretRef: name: bizon-secretsUsing External Secrets Operator
Section titled “Using External Secrets Operator”apiVersion: external-secrets.io/v1beta1kind: ExternalSecretmetadata: name: bizon-secretsspec: secretStoreRef: name: vault-backend kind: SecretStore target: name: bizon-secrets data: - secretKey: jwt-secret-key remoteRef: key: bizon/production property: jwt_secretMonitoring
Section titled “Monitoring”Prometheus Metrics
Section titled “Prometheus Metrics”api: serviceMonitor: enabled: true interval: 30sLiveness & Readiness
Section titled “Liveness & Readiness”api: livenessProbe: httpGet: path: /api/health port: 8000 initialDelaySeconds: 10 periodSeconds: 10
readinessProbe: httpGet: path: /api/health port: 8000 initialDelaySeconds: 5 periodSeconds: 5Upgrades
Section titled “Upgrades”Rolling Update
Section titled “Rolling Update”helm upgrade bizon bizon/bizon-platform -f values.yamlDatabase Migrations
Section titled “Database Migrations”Migrations run automatically on API startup. For manual control:
kubectl exec -it deploy/bizon-api -- alembic upgrade headTroubleshooting
Section titled “Troubleshooting”Check Pod Status
Section titled “Check Pod Status”kubectl get pods -n bizonkubectl describe pod bizon-api-xxx -n bizonView Logs
Section titled “View Logs”kubectl logs -f deploy/bizon-api -n bizonkubectl logs -f deploy/bizon-worker -n bizonDatabase Connectivity
Section titled “Database Connectivity”kubectl exec -it deploy/bizon-api -n bizon -- \ python -c "from bizon_platform.db.session import test_connection; test_connection()"Production Checklist
Section titled “Production Checklist”- External PostgreSQL with backups
- Secrets in Vault/AWS Secrets Manager
- TLS termination at ingress
- Pod disruption budgets
- Resource limits set
- Horizontal Pod Autoscaling
- Log aggregation (Loki/ELK)
- Metrics collection (Prometheus)
- Alerting configured