Overview
This guide covers deploying Praxos to a Kubernetes cluster using Azure Kubernetes Service (AKS) as an example. The concepts apply to other Kubernetes platforms with minor adjustments.Prerequisites
- Kubernetes cluster (1.24+)
- kubectl configured
- Docker image built and pushed to registry
- Required secrets and config maps
- Load balancer or ingress controller
Architecture
Namespace
Create a namespace for Praxos:Secrets
Create Secret from Azure Key Vault
If using Azure Key Vault:Or create secrets directly
ConfigMap
Create a ConfigMap for non-sensitive configuration:API Deployment
Worker Deployment
Service
Ingress
Using NGINX Ingress
Using Azure Application Gateway
Horizontal Pod Autoscaler
API Autoscaler
Worker Autoscaler
Deployment Commands
Initial Deployment
Verify Deployment
Rolling Updates
Update Image
Rollback
Monitoring
Prometheus ServiceMonitor
Troubleshooting
Pod Not Starting
Connection Issues
Resource Issues
Best Practices
- Use resource limits - Prevent pods from consuming too many resources
- Health checks - Implement liveness and readiness probes
- Rolling updates - Zero-downtime deployments
- Autoscaling - Handle variable load
- Monitoring - Track metrics and logs
- Security - Use RBAC, network policies, pod security policies
- Secrets management - Use Key Vault or external secrets
- Multiple environments - Separate dev, staging, production