Dependency Overview
Required
Must be installed for basic functionality
Recommended
Strongly recommended for production
Optional
Additional features and integrations
Conditional
Required only in specific scenarios
Required Dependencies
These components are required for k8s-scheduler to function.PostgreSQL
Relational database for persistent storage.Version: 12+Why: Stores users, organizations, teams, deployments, templates, billing plans, sessionsIntegration points:
- Server connects via
DATABASE_DSN - Optional session backend (
SESSION_BACKEND=postgres) - Database migrations run via
migratetool
- AWS RDS for PostgreSQL
- Google Cloud SQL
- Azure Database for PostgreSQL
- Self-hosted (via Helm chart)
Traefik
Ingress controller for routing wildcard subdomains to user deployments.Version: v2.10+Why: Routes Why not ALB for user deployments?
*.domain.com traffic to individual user deployment servicesIntegration points:- Operator creates
Ingressresources withingressClassName: traefik - Handles routing for user deployments like
user-123-myapp.example.com - Works alongside AWS ALB Controller (server uses ALB, user deployments use Traefik)
- ALB has a limit of 100 rules per load balancer
- Users may create hundreds/thousands of deployments
- Traefik handles unlimited ingress rules efficiently
cert-manager
Automatic TLS certificate provisioning and renewal.Version: v1.12+Why: Provisions TLS certificates for server and all user deploymentsIntegration points:ClusterIssuer configuration:
- Operator creates
Ingressresources with cert-manager annotations - Automatically requests certificates from Let’s Encrypt
- Supports DNS01 challenge via Cloudflare
External DNS
Automatic DNS record creation from Kubernetes resources.Version: v0.13+Why: Auto-creates DNS records for server and user deployment ingressesIntegration points:
- Watches
Ingressresources with annotationexternal-dns.alpha.kubernetes.io/hostname - Creates DNS records in Cloudflare (or Route53, etc.)
- Syncs on ingress create/update/delete
Cloudflare
DNS provider for External DNS and cert-manager.Why: Manages DNS records and DNS01 challenge for TLS certificatesIntegration points:
- External DNS creates A/CNAME records
- cert-manager uses DNS01 challenge for wildcard certificates
- Create API token with permissions:
- Zone → DNS → Edit
- Zone → Zone → Read
- Store in Kubernetes Secret:
Conditional Dependencies
Required only in specific deployment scenarios.AWS Load Balancer Controller
Provisions AWS Application Load Balancers from Kubernetes Ingress resources.Version: v2.6+Required when: Deploying on AWS EKSWhy: Creates ALB for the server ingress (Not required when: Using Traefik or NGINX for all ingress (non-AWS deployments)
ingressClassName: alb)Integration points:- Server Helm chart creates
Ingresswith ALB annotations - Controller provisions ALB, target groups, listeners
- Supports internal ALBs (Tailscale VPN access)
Recommended Dependencies
Strongly recommended for production deployments.HashiCorp Vault
Centralized secrets management.Version: v1.14+Why: Securely stores and manages secrets for users, templates, and deploymentsIntegration points:Installation:Setup:
- Server: Vault Agent injects secrets (database, OAuth, Stripe, email) into pod
- Secrets API: Stores user/template/deployment secrets in Vault KV v2
- External Secrets Operator: Syncs Vault secrets to Kubernetes Secrets for user pods
- Initialize and unseal Vault
- Enable KV v2 secrets engine:
- Run setup script:
- AWS Secrets Manager (
SECRETS_BACKEND=aws) - Database encryption (
SECRETS_BACKEND=database, requiresSECRETS_ENCRYPTION_KEY)
External Secrets Operator
Syncs external secrets (Vault, AWS) into Kubernetes Secrets.Version: v0.9+Required when: Using Vault or AWS Secrets ManagerWhy: Pulls user secrets from Vault/AWS and creates Kubernetes Secrets for deployment podsIntegration points:ClusterSecretStore:
Created by k8s-scheduler Helm chart:
- Operator creates
ExternalSecretresources for each deployment - ESO watches these resources and syncs from Vault
- Creates/updates corresponding
Secretresources - Pods mount these secrets as files or environment variables
Vault Agent Injector
Mutating webhook that injects Vault Agent sidecars into pods.Version: Bundled with Vault Helm chartRequired when: Using Vault for server secretsWhy: Injects database credentials, OAuth secrets, and API keys into server podIntegration points:
- Server deployment has Vault annotations:
- Vault Agent runs as sidecar container
- Renders secrets to
/vault/secrets/env - Server sources this file on startup
Optional Dependencies
Additional features and integrations.Stripe
Payment processing and subscription management.Why: Enables tiered billing (Free, Business, Enterprise)Integration points:Required secrets:
- Server integrates with Stripe API for:
- Creating subscriptions
- Managing payment methods
- Handling upgrades/downgrades
- Webhook endpoint
/api/stripe/webhookfor events - Tier limits enforced based on subscription status
SMTP / SendGrid
Email delivery for team invitations.Why: Send invitation emails when users invite team membersIntegration points:SendGrid Configuration:
- Server sends emails via SMTP or SendGrid API
- Email templates for invitations
- Configurable sender address
Redis
In-memory data store for sessions.Version: 6+Why: Distributed session storage across multiple server replicasIntegration points:Installation:Alternatives: PostgreSQL sessions (
- Server uses Redis as session backend when
SESSION_BACKEND=redis - Faster than PostgreSQL for session lookups
- Enables horizontal scaling of server pods
SESSION_BACKEND=postgres)Prometheus
Metrics collection and alerting.Version: v2.40+Why: Monitor server and operator health, deployment metricsIntegration points:Enable in k8s-scheduler:
- Server exposes metrics on
:9090/metrics - Operator exposes controller-runtime metrics
- Helm chart creates
ServiceMonitor(requires Prometheus Operator)
scheduler_deployments_total- Total deployments createdscheduler_deployments_by_state- Deployments by state (running/stopped)scheduler_api_request_duration_seconds- API latency- Controller-runtime reconcile metrics
Grafana
Metrics visualization and dashboards.Version: v9+Why: Visualize deployment metrics, server health, operator reconciliation loopsIntegration points:
- Connects to Prometheus data source
- Create custom dashboards for deployment metrics and operator status
- Alerting for operator errors
kube-prometheus-stackDependency Matrix
| Component | Required | AWS | GCP | On-Prem | Notes |
|---|---|---|---|---|---|
| PostgreSQL | Yes | RDS | Cloud SQL | Helm | Any managed or self-hosted |
| Traefik | Yes | ✓ | ✓ | ✓ | Wildcard ingress routing |
| cert-manager | Yes | ✓ | ✓ | ✓ | TLS certificates |
| External DNS | Yes | ✓ | ✓ | ✓ | Automatic DNS records |
| Cloudflare | Yes | ✓ | ✓ | ✓ | Or Route53, Cloud DNS, etc. |
| ALB Controller | AWS only | ✓ | — | — | Server ingress on EKS |
| Vault | Recommended | ✓ | ✓ | ✓ | Centralized secrets |
| External Secrets | If Vault | ✓ | ✓ | ✓ | Syncs secrets to K8s |
| Vault Agent | If Vault | ✓ | ✓ | ✓ | Injects server secrets |
| Stripe | Optional | ✓ | ✓ | ✓ | Subscription billing |
| SMTP/SendGrid | Optional | ✓ | ✓ | ✓ | Team invitations |
| Redis | Optional | ElastiCache | Memorystore | Helm | Session storage |
| Prometheus | Optional | ✓ | ✓ | ✓ | Metrics collection |
| Grafana | Optional | ✓ | ✓ | ✓ | Metrics visualization |
Architecture Diagram
Next Steps
Deployment Guide
Deploy k8s-scheduler to production
Configuration
Configure environment variables