Genesis will provide you with the container image URL. Replace
<container-registry-url> throughout this document with the URL provided by Genesis.Prerequisites
Azure AKS Cluster Requirements
AKS Cluster
Kubernetes version 1.23 or higher
kubectl
Configured to access your AKS cluster
Helm 3.8+
For deploying the Genesis Helm chart
Azure CLI
Configured with appropriate credentials
Additional Requirements
- Azure Disk CSI Driver: Required for persistent storage (see Azure Disk CSI Driver Setup)
- Ingress Controller: For external access (see Ingress Controller Setup)
Network Access
| Requirement | Purpose |
|---|---|
| Outbound Internet | Cluster nodes must pull container images from the registry URL provided by Genesis |
| DNS Resolution | For accessing external APIs (OpenAI, Azure OpenAI, etc.) if using those LLM providers |
Azure Permissions
The AKS cluster’s managed identity or service principal needs appropriate permissions for:- Azure Disk operations (for persistent volumes)
- Azure Container Registry access (if using ACR)
- Azure Key Vault access (if storing secrets in Key Vault)
Azure Disk CSI Driver Setup
Genesis requires persistent storage for its database, git repositories, and uploaded files. The Azure Disk CSI driver must be installed in your cluster to provision Azure managed disks.The Azure Disk CSI driver is automatically installed by default on AKS clusters. However, verify it’s running and properly configured.
Installation Instructions
If not installed, refer to the Azure Kubernetes Service documentation for detailed Azure Disk CSI driver installation steps.
Ingress Controller Setup
Genesis requires an ingress controller for external access. Choose one based on your requirements:- Application Gateway (Recommended)
- NGINX Ingress Controller
The Application Gateway Ingress Controller (AGIC) integrates Azure Application Gateway with AKS for ingress management.Install Application Gateway Ingress Controller:Verify installation:
Genesis Container Configuration
Container Image
| Setting | Description |
|---|---|
| Repository | Genesis will provide the container image URL (e.g., <container-registry-url>/genesis) |
| Tags | Genesis will specify the appropriate tag to use (typically latest or a specific version) |
| Registry Access | Genesis will provide details about authentication requirements, if any |
Image Pull Secrets (If Required)
If the container registry requires authentication, Genesis will provide the necessary credentials. Create a Kubernetes secret:Exposed Ports
| Port | Service | Description |
|---|---|---|
| 8080 | FastAPI | Primary application with React GUI and modern APIs |
| 8082 | Flask | UDF proxy, OAuth, external integrations |
| 8501 | Streamlit | Legacy Streamlit interface |
Persistent Storage Requirements
Genesis requires persistent storage for:| Path | Purpose |
|---|---|
/app/.genesis/db/genesis.db | SQLite database |
/app/bot_git | Cloned git repositories |
/app/bot_storage | Uploaded files and bot storage |
/app/tmp | Runtime temp files |
Recommended Storage Size: 50Gi minimum (adjust based on expected usage)Storage Class: Uses cluster default (typically
managed-csi or managed-premium on AKS)Environment Variables
Required Configuration
Required Configuration
| Variable | Default | Description |
|---|---|---|
SQLITE_DB_PATH | /app/.genesis/db/genesis.db | Path to SQLite database |
DATABASE_URL | sqlite:///app/.genesis/db/genesis.db | SQLite connection string |
OpenAI Configuration
OpenAI Configuration
Azure OpenAI Configuration
Azure OpenAI Configuration
Authentication (Optional)
Authentication (Optional)
| Variable | Value | Description |
|---|---|---|
AUTH_ENABLED | "true" | Enable authentication |
AUTH_PROVIDER | "proxy" | For ingress-based auth |
Logging
Logging
| Variable | Options | Description |
|---|---|---|
LOG_LEVEL | DEBUG, INFO, WARNING, ERROR | Log verbosity |
LOGS_FORMAT | json, text | Log output format |
Deployment Steps
1
Prepare Helm Chart
Genesis will provide you with the Helm chart as an archive file. Extract it:
2
Create Values File
Create a
genesis-values.yaml file with your configuration:3
Deploy Genesis
4
Verify Deployment
5
Access Genesis
- Via Ingress (Recommended)
- Port Forward (For Testing)
For Application Gateway Ingress Controller: Get the Application Gateway public IP:Access via: Access via:
http://<public-ip> or https://genesis.yourdomain.comFor NGINX Ingress: Get the external IP:http://<external-ip> or http://genesis.yourdomain.com (if DNS configured)Kubernetes-Specific Configuration
StatefulSet
Genesis is deployed as a StatefulSet (not Deployment) to ensure:- Stable network identity (pod name:
genesis-0) - Ordered, graceful deployment and scaling
- Stable persistent storage (PVC name:
genesis-data-genesis-0)
Persistent Volume Claim
The StatefulSet creates a PersistentVolumeClaim with:| Property | Value |
|---|---|
| Name | genesis-data-genesis-0 |
| Storage Class | Uses cluster default (typically managed-csi or managed-premium) |
| Access Mode | ReadWriteOnce (single pod access) |
| Retention | PVC is retained when StatefulSet is deleted (data preservation) |
Volume Mounts
The Genesis container mounts the persistent volume at multiple paths:| Mount Path | Purpose |
|---|---|
/app/.genesis/db | Database files |
/app/bot_git | Git repositories |
/app/bot_storage | File storage and uploads |
/app/tmp | Temporary files |
Health Checks
Genesis includes liveness and readiness probes:Liveness Probe
- Endpoint:
GET /api/healthon port 8080 - Initial delay: 60 seconds
- Period: 30 seconds
- Timeout: 5 seconds
- Failure threshold: 3
Readiness Probe
- Endpoint:
GET /api/healthon port 8080 - Initial delay: 30 seconds
- Period: 10 seconds
- Timeout: 5 seconds
- Failure threshold: 3
Resource Requirements
Default resource requests:| Resource | Request |
|---|---|
| CPU | 2000m (2 cores) |
| Memory | 6Gi |
No resource limits are set by default to avoid OOM kills. Adjust based on your workload.
Azure-Specific Considerations
Managed Identity for Azure OpenAI
If using Azure OpenAI, you can configure a managed identity to access Azure OpenAI without storing API keys in Kubernetes secrets:1
Create Managed Identity
If not using cluster’s managed identity:
2
Grant Permissions
3
Configure Pod Identity
For Workload Identity:
- Create a service account with the managed identity annotation
- Configure the StatefulSet to use the service account
4
Retrieve API Key (Optional)
Using managed identity in an init container or startup script:
Azure Disk Encryption
Azure managed disks created by the Azure Disk CSI driver on AKS are encrypted by default. Verify:Virtual Network Configuration
Ensure your AKS cluster nodes have:| Requirement | Purpose |
|---|---|
| Outbound Internet Access | For pulling images from the container registry provided by Genesis |
| DNS Resolution | For external API calls (OpenAI, Azure OpenAI, etc.) |
| Network Security Group Rules | Allow ingress on ports 80/443 if using Application Gateway, or node port if using NodePort service |
Troubleshooting
Pod Not Starting
Pod Not Starting
- Image pull errors: Check network connectivity to the container registry provided by Genesis
- PVC issues: Verify Azure Disk CSI driver is installed and storage class exists
- Resource constraints: Check node resources
Persistent Volume Issues
Persistent Volume Issues
Ingress Not Working
Ingress Not Working
For Application Gateway Ingress Controller:For NGINX Ingress:
Database Issues
Database Issues
Viewing Logs
Viewing Logs
Upgrading Genesis
When a new Genesis version is released:The StatefulSet will perform a rolling update, and the persistent volume will be reattached to the new pod.

