This guide explains how to deploy the CDN service on Kubernetes.
- Kubernetes cluster
- kubectl configured
- Docker registry access
- cdn-service: Main application deployment
- redis: Cache service
- configmap: Configuration values
- service: Load balancer configuration
- Create namespace (optional):
kubectl create namespace cdn
kubectl config set-context --current --namespace=cdn
- Apply ConfigMap:
kubectl apply -f configmap.yaml
- Deploy Redis:
kubectl apply -f redis.yaml
- Deploy CDN Service:
kubectl apply -f deployment.yaml
kubectl apply -f service.yaml
Check deployment status:
kubectl get pods
kubectl get services
Check application logs:
kubectl logs -f deployment/cdn-service
Scale the deployment:
kubectl scale deployment cdn-service --replicas=5
Access metrics at:
- Health check: http://[LOAD_BALANCER_IP]/health
- Metrics: http://[LOAD_BALANCER_IP]/metrics