Workload Management
Add PostgreSQL in 5 seconds. No YAML. No pain.
loko workloads add postgresloko env create# Done. PostgreSQL running with DNS, password, and pgAdmin.Remember spending an hour configuring PostgreSQL? Finding the right Helm chart, writing 200 lines of values.yaml, generating passwords, setting up persistence, configuring DNS? Never again.
LoKO’s workload catalog gives you pre-configured, battle-tested services that just work. One command. Complete setup.
Why the Catalog Matters
Section titled “Why the Catalog Matters”DIY PostgreSQL (The Old Way)
Section titled “DIY PostgreSQL (The Old Way)”# Find a Helm chart (which one? bitnami? groundhog2k? official?)helm search repo postgres# Read documentation for 30 minutes
# Create values.yamlcat > postgres-values.yaml <<EOFauth: postgresPassword: $(openssl rand -base64 32) # Generate password database: mydbprimary: persistence: enabled: true size: 10Gi storageClass: standard resources: limits: memory: 512MivolumePermissions: enabled: true securityContext: runAsUser: 0metrics: enabled: false# ... 150 more linesEOF
# Installhelm repo add bitnami https://charts.bitnami.com/bitnamihelm install postgres bitnami/postgresql -f postgres-values.yaml
# Wait for it to be readykubectl wait --for=condition=ready pod/postgres-0 --timeout=300s
# Get password (where was it again?)kubectl get secret postgres-postgresql -o jsonpath='{.data.postgres-password}' | base64 -d
# Access itkubectl port-forward svc/postgres-postgresql 5432:5432# Keep this terminal open forever...Time spent: 45-60 minutes. Fun had: None.
LoKO PostgreSQL (The Better Way)
Section titled “LoKO PostgreSQL (The Better Way)”loko workloads add postgresloko env createTime spent: 10 seconds. Everything you get:
- ✅ PostgreSQL running on postgres.dev.me:5432
- ✅ Password auto-generated and saved
- ✅ pgAdmin web UI at https://postgres-ui.dev.me
- ✅ Persistent storage (10Gi default, configurable)
- ✅ Health checks configured
- ✅ Connection strings ready
Access it:
psql -h postgres.dev.me -U postgres# Or web UI: https://postgres-ui.dev.meThat’s why the catalog exists. Stop configuring infrastructure. Start building apps.
Workload Types
Section titled “Workload Types”System Workloads
Section titled “System Workloads”Infrastructure services like databases and message queues:
- Databases: PostgreSQL, MySQL, MongoDB
- Cache: Valkey (Redis-compatible)
- Message Queues: RabbitMQ
- Object Storage: Garage (S3-compatible)
DNS: <workload>.${DOMAIN} (e.g., postgres.dev.me)
User Workloads
Section titled “User Workloads”Your custom applications:
- Custom Helm charts
- Local images
- Third-party applications
DNS: <workload>.apps.${DOMAIN} or <workload>.${DOMAIN} (configurable)
Internal Components
Section titled “Internal Components”In-cluster components managed by LoKO:
- Traefik: Ingress controller (required, cannot be disabled)
- Zot: Container registry (optional, can be disabled)
- metrics-server: Resource metrics (optional, can be disabled)
Outside-of-cluster components:
- HAProxy: TCP load balancer for database/service access from host
- dnsmasq: In-cluster DNS resolver for
*.dev.medomain resolution
Listing Workloads
Section titled “Listing Workloads”Unless you pass --config / -c, workload commands target the active environment first and fall back to ./loko.yaml only when no environment is active.
All Enabled Workloads
Section titled “All Enabled Workloads”loko workloads listFilter by Type
Section titled “Filter by Type”loko workloads list --user # User workloads onlyloko workloads list --system # System workloads onlyloko workloads list --internal # Internal components onlyShow All (Including Disabled)
Section titled “Show All (Including Disabled)”loko workloads list --allloko workloads list --disabled # Disabled onlyOutput Formats
Section titled “Output Formats”loko workloads list --format json # JSON outputloko workloads list --format text # Plain text (TSV)loko workloads list --format json | jq # Pipe to jqAdding Workloads
Section titled “Adding Workloads”From Catalog
Section titled “From Catalog”# Add to config (enabled by default)loko workloads add postgres
# Add and deploy immediatelyloko workloads add postgres --now
# Add but keep disabledloko workloads add rabbitmq --disabledCustom Workload
Section titled “Custom Workload”Edit loko.yaml:
workloads: myapp: enabled: true namespace: apps config: chart: repo: myrepo name: myrepo/myapp version: 1.0.0 values: ingress: enabled: true hosts: - host: myapp.dev.meEnabling/Disabling
Section titled “Enabling/Disabling”Enable Workload
Section titled “Enable Workload”# Enable in config onlyloko workloads enable postgres
# Enable several at onceloko workloads enable mysql postgres mongodb
# Enable and deployloko workloads enable mysql postgres --nowDisable Workload
Section titled “Disable Workload”# Disable in config onlyloko workloads disable postgres
# Disable several at onceloko workloads disable mysql postgres mongodb
# Disable and undeployloko workloads disable mysql postgres --nowDeploying Workloads
Section titled “Deploying Workloads”Deploy All
Section titled “Deploy All”# Deploy all enabled user + system workloadsloko workloads deploy
# Include internal componentsloko workloads deploy --allDeploy Specific Workload
Section titled “Deploy Specific Workload”loko workloads deploy postgresloko workloads deploy mysql postgres # MultipleDeploy by Type
Section titled “Deploy by Type”loko workloads deploy --user # User workloads onlyloko workloads deploy --system # System workloads onlyUndeploying Workloads
Section titled “Undeploying Workloads”Undeploy Specific
Section titled “Undeploy Specific”loko workloads undeploy postgresloko workloads undeploy mysql postgresUndeploy All
Section titled “Undeploy All”loko workloads undeploy --allWorkload Information
Section titled “Workload Information”Show Catalog Entry
Section titled “Show Catalog Entry”loko workloads info postgresShows:
- Chart details
- Default configuration
- Endpoints and ports
- Connection strings
- Health checks
- Available UIs
Show Endpoints
Section titled “Show Endpoints”loko workloads endpoints postgresOutput:
┏━━━━━━━━┳━━━━━━━━━━┳━━━━━━┳━━━━━━━━━━━━━━━━━━━━┓┃ Name ┃ Protocol ┃ Port ┃ External URL ┃┡━━━━━━━━╇━━━━━━━━━━╇━━━━━━╇━━━━━━━━━━━━━━━━━━━━┩│ client │ tcp │ 5432 │ postgres.dev.me │└────────┴──────────┴──────┴────────────────────┘Connection Strings
Section titled “Connection Strings”# Show connection strings (password masked)loko workloads connect postgres
# Show with actual passwordloko workloads connect postgres --show-passwordloko workloads connect postgres -pExample output:
Connection strings for postgres:━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━default: postgresql://postgres:${PASS}@postgres.dev.me:5432/${DB}jdbc: jdbc:postgresql://postgres.dev.me:5432/${DB}?user=postgres&password=${PASS}Health Checks
Section titled “Health Checks”Infrastructure Tier (Port Checks)
Section titled “Infrastructure Tier (Port Checks)”Run basic port connectivity checks (no client tools required):
loko workloads check postgres # infrastructure tier (default)loko workloads check postgres --tier infrastructureloko workloads check postgres -t infra # aliasClient Tier (Service Validation)
Section titled “Client Tier (Service Validation)”Run deeper checks using client tools (requires mysql, psql, etc.):
loko workloads check postgres --tier clientloko workloads check postgres -t clientRun All Health Checks
Section titled “Run All Health Checks”loko workloads check postgres --allloko workloads check postgres -aUse Port-Forward
Section titled “Use Port-Forward”loko workloads check postgres --port-forwardloko workloads check postgres -fHealth check tiers:
- infrastructure: Port connectivity checks (no client tools needed, runs by default)
- client: Service validation using client tools (requires tools like mysql, psql, valkey-cli, etc.)
Viewing Logs
Section titled “Viewing Logs”Stream Logs
Section titled “Stream Logs”loko logs workload postgres
# Follow (real-time)loko logs workload postgres --followTail Logs
Section titled “Tail Logs”# Last 100 linesloko logs workload postgres --tail 100
# Last 5 minutesloko logs workload postgres --since 5mMulti-Container Pods
Section titled “Multi-Container Pods”loko logs workload traefik --container traefikPrevious Instance
Section titled “Previous Instance”loko logs workload postgres --previousCredentials Management
Section titled “Credentials Management”Fetch Secrets
Section titled “Fetch Secrets”loko secrets fetchFetches workload credentials from the cluster and updates persisted environment secrets.
Show Secrets
Section titled “Show Secrets”# Display in terminalloko secrets show
# JSON formatloko secrets show --format json
# Get specific passwordloko secrets show --format json | jq '.postgres.password'Auto-generated credentials for:
- PostgreSQL (postgres password)
- MySQL (root password)
- MongoDB (root password)
- RabbitMQ (admin password)
- Valkey (default password)
Web UIs
Section titled “Web UIs”Many workloads have linked web UI tools that provide visual interfaces for management.
Viewing Available UIs
Section titled “Viewing Available UIs”Use loko workloads info to see linked UI workloads:
loko workloads info postgres# Shows: postgres-ui (pgAdmin) as a linked workload
loko workloads info valkey# Shows: cache-ui (phpCacheAdmin) as a linked workloadAdding UI Workloads
Section titled “Adding UI Workloads”UI workloads are added just like any other workload:
# Add PostgreSQL and its UIloko workloads add postgresloko workloads add postgres-uiloko env create
# Add Valkey and its unified cache UIloko workloads add valkeyloko workloads add cache-uiloko env create
# Or add UI laterloko workloads add mysqlloko env create# Later: add the UIloko workloads add mysql-ui --nowAvailable UIs
Section titled “Available UIs”| Database | UI Workload | Tool | URL |
|---|---|---|---|
| postgres | postgres-ui | pgAdmin | postgres-ui.dev.me |
| mysql | mysql-ui | phpMyAdmin | mysql-ui.dev.me |
| mongodb | mongodb-ui | mongo-express | mongodb-ui.dev.me |
| valkey | cache-ui | phpCacheAdmin | cache-ui.dev.me |
| memcached | cache-ui | phpCacheAdmin | cache-ui.dev.me |
| nats | nats-ui | NATS Dashboard | nats-ui.dev.me |
| redpanda | redpanda-ui | Redpanda Console | redpanda-ui.dev.me |
| garage | garage-ui | Garage WebUI | garage-ui.dev.me |
| rabbitmq | (built-in) | Management UI | rabbitmq.dev.me |
Note: cache-ui provides a unified interface for both Valkey (Redis) and Memcached.
Real Developer Workflows
Section titled “Real Developer Workflows”Scenario 1: Building a Web App
Section titled “Scenario 1: Building a Web App”Stack: Node.js API + PostgreSQL + Valkey (cache) + React frontend
# Add backend servicesloko workloads add postgresloko workloads add valkeyloko env create
# Your API connects to:# - postgres.dev.me:5432# - valkey.dev.me:6379
# Build and push imagesdocker build -t cr.dev.me/api:v1 ./apidocker push cr.dev.me/api:v1
docker build -t cr.dev.me/frontend:v1 ./frontenddocker push cr.dev.me/frontend:v1
# Deploy to clusterkubectl apply -f k8s/
# Access:# - API: https://api.dev.me# - Frontend: https://app.dev.me# - Database: postgres-ui.dev.me (web UI)Scenario 2: Microservices Development
Section titled “Scenario 2: Microservices Development”Services: User service, Order service, Notification service
# Add infrastructureloko workloads add postgresloko workloads add rabbitmqloko workloads add valkeyloko env create
# Each service gets:# - Shared PostgreSQL database (postgres.dev.me)# - Message queue for async tasks (rabbitmq.dev.me)# - Shared cache (valkey.dev.me)
# Develop services locally, connect to cluster:# In your .env:DATABASE_URL=postgresql://postgres:PASSWORD@postgres.dev.me:5432/mydbRABBITMQ_URL=amqp://admin:PASSWORD@rabbitmq.dev.me:5672REDIS_URL=redis://valkey.dev.me:6379Scenario 3: Testing with Multiple Databases
Section titled “Scenario 3: Testing with Multiple Databases”Need: Test PostgreSQL and MongoDB migrations
# Add both databasesloko workloads add postgresloko workloads add mongodbloko env create
# Run testsnpm test -- --postgres-url=postgresql://postgres:PASS@postgres.dev.me:5432/testnpm test -- --mongodb-url=mongodb://root:PASS@mongodb.dev.me:27017/test
# Check data via web UIsopen https://postgres-ui.dev.meopen https://mongodb-ui.dev.meScenario 4: Event-Driven Architecture
Section titled “Scenario 4: Event-Driven Architecture”Stack: Services + RabbitMQ + Storage
# Add messaging and storageloko workloads add rabbitmqloko workloads add garageloko env create
# Now you have:# - Message queue: rabbitmq.dev.me# - S3-compatible storage: garage.dev.me# - RabbitMQ management UI: https://rabbitmq.dev.me
# Publish events, process async, store filesWorkload Catalog
Section titled “Workload Catalog”Available Workloads
Section titled “Available Workloads”Databases:
| Workload | Description | Web UI |
|---|---|---|
postgres | PostgreSQL database server | pgAdmin at postgres-ui.dev.me |
mysql | MySQL database server | phpMyAdmin at mysql-ui.dev.me |
mongodb | MongoDB document database | mongo-express at mongodb-ui.dev.me |
Cache:
| Workload | Description | Web UI |
|---|---|---|
valkey | Redis-compatible in-memory cache | phpCacheAdmin at cache-ui.dev.me |
memcached | Distributed memory caching system | phpCacheAdmin at cache-ui.dev.me |
Messaging:
| Workload | Description | Web UI |
|---|---|---|
rabbitmq | RabbitMQ message broker | Management UI at rabbitmq.dev.me |
nats | NATS messaging system with JetStream | Dashboard at nats-ui.dev.me |
redpanda | Kafka-compatible streaming platform | Console at redpanda-ui.dev.me |
elasticmq | SQS-compatible message queue | Web UI at elasticmq.dev.me |
goaws | SNS-compatible message service | API endpoint at sns.dev.me |
Storage:
| Workload | Description | Web UI |
|---|---|---|
garage | S3-compatible distributed object storage | WebUI at garage-ui.dev.me |
DevOps/GitOps:
| Workload | Description | Web UI |
|---|---|---|
forgejo | Self-hosted Git service (Gitea fork) | Web UI at forgejo.dev.me |
argocd | GitOps continuous delivery | Web UI at argocd.dev.me |
flux-operator | Flux CD operator for GitOps | - |
Collaboration:
| Workload | Description | Web UI |
|---|---|---|
excalidraw | Collaborative whiteboard | Web UI at excalidraw.dev.me |
penpot | Open-source design & prototyping (Figma alternative) | Web UI at penpot.dev.me |
DevTools:
| Workload | Description | Web UI |
|---|---|---|
httpbin | HTTP request & response testing service | Web UI at httpbin.dev.me |
it-tools | Developer utilities — converters, encoders, formatters | Web UI at it-tools.dev.me |
mock-smtp-sms | SMTP & SMS testing tool | Web UI at mock-smtp-sms.dev.me |
Each workload includes:
- ✅ Pre-configured Helm values
- ✅ Auto-generated passwords (saved in persisted environment secrets)
- ✅ DNS configuration (
.dev.meby default) - ✅ Health checks
- ✅ Connection strings
- ✅ Web UI tools (where applicable)
Custom Chart Repositories
Section titled “Custom Chart Repositories”Add Helm repositories:
loko config helm-repo-add \ --helm-repo-name bitnami \ --helm-repo-url https://charts.bitnami.com/bitnamiThen reference in config:
workloads: helm-repositories: - name: bitnami url: https://charts.bitnami.com/bitnami
user: - name: myapp config: repo: ref: bitnami chart: bitnami/nginx version: 15.0.0Advanced Scenarios
Section titled “Advanced Scenarios”Deploy with Custom Values
Section titled “Deploy with Custom Values”workloads: system: - name: postgres enabled: true config: values: storage: size: 50Gi resources: limits: memory: 2GiNode Affinity
Section titled “Node Affinity”workloads: system: - name: postgres config: values: affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: tier operator: In values: - applicationMultiple Instances
Section titled “Multiple Instances”workloads: system: - name: postgres-main config: chart: groundhog2k/postgres namespace: databases
- name: postgres-test config: chart: groundhog2k/postgres namespace: databases-testTroubleshooting
Section titled “Troubleshooting”Workload Not Deploying
Section titled “Workload Not Deploying”# Check if enabledloko workloads list --all
# Enable itloko workloads enable postgres --now
# Check Helm releasehelm list -A
# Check podskubectl get pods -AConnection Issues
Section titled “Connection Issues”# Check endpointsloko workloads endpoints postgres
# Check DNSloko check dnsLogs Show Errors
Section titled “Logs Show Errors”# View detailed logsloko logs workload postgres --tail 100
# Check eventskubectl get events -n common-servicesNext Steps
Section titled “Next Steps”- Network & DNS - Configure DNS resolution
- Registry - Use local container registry
- Troubleshooting - Common issues