Kubernetes Deployment
Relevant source files
The following files were used as context for generating this wiki page:
Introduction
The Kubernetes deployment for Aether-X Ultimate provides a production-ready, orchestrated environment for a microservices-based AI platform. It utilizes a container-based architecture to manage eight core services, supporting complex operations such as text generation, image synthesis, and secure data processing. The deployment is designed for high availability and scalability, utilizing Kubernetes primitives like Deployments, Services, and Ingress controllers to manage the lifecycle and networking of the application components.
Sources: IMPLEMENTATION_COMPLETE.md:12-21, README.md:44-50
The infrastructure is managed within a dedicated namespace (aether-x) and includes integrated support for databases, message queues (Kafka), and a monitoring stack (Prometheus/Grafana). This setup ensures that the platform can handle unrestricted AI operations while maintaining robust resource management and service discovery.
Sources: deploy.sh:14-15, deploy.sh:58-75
Deployment Architecture
The platform architecture consists of multiple microservices coordinated through an API Gateway. Each service is deployed as a Kubernetes Deployment with associated ClusterIP services for internal communication.
High-Level Component Flow
The following diagram illustrates the flow of a request through the Kubernetes infrastructure:
The Ingress controller routes external traffic to the API Gateway, which then proxies requests to specific microservices based on the URL path.
Sources: k8s/deployment.yaml:263-294, k8s/api-gateway.yaml:1-12
Service Specifications
Each microservice is configured with specific resource constraints and health monitoring to ensure stability.
| Service Name | Replicas | Port | Memory (Req/Limit) | CPU (Req/Limit) |
|---|---|---|---|---|
text-generation | 3 | 8000 | 512Mi / 1Gi | 250m / 500m |
image-generation | 3 | 8001 | 1Gi / 2Gi | 500m / 1000m |
video-generation | 2 | 8002 | 1Gi / 2Gi | 500m / 1000m |
ai-models | 2 | 8003 | 1Gi / 2Gi | 500m / 1000m |
no-code-development | 2 | 8004 | 512Mi / 1Gi | 250m / 500m |
security | 2 | 8005 | 512Mi / 1Gi | 250m / 500m |
data-processing | 2 | 8006 | 512Mi / 1Gi | 250m / 500m |
api-gateway | 2 | 80 | 256Mi / 512Mi | 100m / 200m |
Sources: k8s/deployment.yaml:1-209, k8s/api-gateway.yaml:15-38
Storage and Persistence
The ai-models service requires persistent storage to maintain large model files across pod restarts. This is handled via a PersistentVolumeClaim (PVC) and a volume mount.
Persistent Volume Configuration
- Name:
models-pvc - Capacity: 10Gi
- Access Mode:
ReadWriteOnce - Mount Path:
/app/modelsinside theai-modelscontainer.
Sources: k8s/deployment.yaml:113-115, k8s/deployment.yaml:138-141, k8s/deployment.yaml:253-261
Ingress and External Access
External access is managed via an Nginx Ingress controller, which provides TLS termination and rate limiting.
Ingress Rules
The Ingress manifest defines how traffic is routed to the platform:
- Host:
aetherx.example.com - TLS Secret:
aether-x-tls - Annotations:
kubernetes.io/ingress.class: nginxnginx.ingress.kubernetes.io/rate-limit: "100"nginx.ingress.kubernetes.io/rate-limit-window: "1m"
| Path | Target Service | Port |
|---|---|---|
/ | api-gateway-service | 80 |
/dashboard | dashboard-service | 80 |
Sources: k8s/deployment.yaml:263-294
Deployment Lifecycle and Automation
The repository includes a comprehensive shell script (deploy.sh) to automate the deployment process.
Deployment Sequence
The deployment process follows a specific order of operations to ensure dependencies are met:
Sources: deploy.sh:137-148, deploy.sh:58-102
Verification and Monitoring
After deployment, the status can be verified using the script's built-in functions:
- Health Checks: The deployment defines
livenessProbeandreadinessProbefor all services, typically checking the/healthendpoint after an initial delay of 30 seconds. - Management: Commands like
kubectl get pods -n aether-xandkubectl logs -f deployment/<service-name>are used for runtime monitoring.
Sources: k8s/deployment.yaml:25-40, deploy.sh:121-125, deploy.sh:152-154
Summary
The Kubernetes deployment of Aether-X Ultimate establishes a resilient and scalable microservices environment. By utilizing standard Kubernetes manifests for deployments, services, and ingress, and automating the lifecycle through deploy.sh, the project ensures that its complex AI and security features are supported by a robust infrastructure capable of production-level workloads.