diagcorp
Overview
- Namespace:
diagcorp - Purpose: DIAG Corporate Portal - INACTIVE
- Age: ~4 years 273 days
- Status: INACTIVE - All deployments scaled to 0
- Workloads: 4 deployments (ALL scaled to 0)
- Environment: PRODUCTION (Currently inactive)
Architecture
DIAG corporate portal (PHP/Nginx based):
- Nginx: Web server (0 replicas)
- PHP-FPM: PHP application server (0 replicas)
- Worker: Background job processor (0 replicas)
- Redis: Cache/session storage (0 replicas)
Status: All components scaled to 0 (inactive)
Auto-Scaling Configuration
HorizontalPodAutoscalers (2 HPAs - Inactive)
| HPA Name | Target | Min | Max | Current | Status |
|---|---|---|---|---|---|
| diagcorp-nginx | Nginx deployment | 3 | 7 | 3 | HPA active but deployment at 0 |
| diagcorp-php | PHP deployment | 3 | 10 | 3 | HPA active but deployment at 0 |
Note: HPAs are configured but deployment replicas set to 0
Workload Categories
ALL SCALED TO ZERO (4 deployments)
| Name | Replicas | Status | Purpose |
|---|---|---|---|
| diagcorp-nginx | 0/0 | Inactive | Web server |
| diagcorp-php | 0/0 | Inactive | PHP-FPM application server |
| diagcorp-worker | 0/0 | Inactive | Background worker |
| redis-master | 0/0 | Inactive | Redis cache |
Services
| Name | Type | Cluster IP | Ports | Purpose |
|---|---|---|---|---|
| diag-corp-nginx | NodePort | 10.8.16.37 | 80:32536 | Nginx web server (inactive) |
| diag-corp-php | ClusterIP | 10.8.20.82 | 9000 | PHP-FPM service (inactive) |
| redis-svc | ClusterIP | 10.8.30.147 | 6379 | Redis cache (inactive) |
| wordpress-disk | ClusterIP | 10.8.31.112 | 2049, 20048, 111 | NFS storage (2y280d old) |
Access & Management
View all resources:
kubectl get all -n diagcorp
Check deployment status:
# All deployments scaled to 0
kubectl get deployments -n diagcorp
# Check HPAs (still active)
kubectl get hpa -n diagcorp
Scale up if needed:
# Scale nginx (will trigger HPA)
kubectl scale deployment diagcorp-nginx --replicas=1 -n diagcorp
# Scale PHP
kubectl scale deployment diagcorp-php --replicas=1 -n diagcorp
# Scale worker
kubectl scale deployment diagcorp-worker --replicas=1 -n diagcorp
# Scale Redis
kubectl scale deployment redis-master --replicas=1 -n diagcorp
View logs (if scaled up):
kubectl logs -f deployment/diagcorp-nginx -n diagcorp
kubectl logs -f deployment/diagcorp-php -n diagcorp
Data Flow (When Active)
NodePort 32536
↓
Nginx (diagcorp-nginx)
↓
PHP-FPM (diagcorp-php:9000)
↓
Redis Cache (redis-svc:6379)
↓
Database (external)
Production Considerations
Current Status
INACTIVE:
- All deployments at 0 replicas
- HPAs configured but not active
- Services still exist (ready to activate)
- Age: ~4 years (very old)
Recommendations
-
Review Usage:
- Determine if diagcorp portal is still needed
- Last scaled down: Check deployment history
- If permanently unused → consider namespace deletion
-
If Reactivating:
- Test in staging first
- Verify database connectivity
- Check Redis configuration
- Scale up gradually (nginx → php → worker)
- Monitor HPA behavior
-
If No Longer Needed:
- Document decision to decommission
- Back up any important data
- Export configurations
- Delete namespace:
kubectl delete namespace diagcorp
-
Persistent Storage:
- wordpress-disk service exists (2y280d)
- Check if NFS storage has important data
- Back up before deletion
Troubleshooting
Check why scaled to 0:
# Check deployment history
kubectl rollout history deployment/diagcorp-nginx -n diagcorp
# Check recent events
kubectl get events -n diagcorp --sort-by='.lastTimestamp' | head -20
# Check annotations
kubectl get deployment diagcorp-nginx -n diagcorp -o yaml | grep -A 5 "annotations"
Reactivate service:
# Scale all components
kubectl scale deployment diagcorp-nginx --replicas=1 -n diagcorp
kubectl scale deployment diagcorp-php --replicas=1 -n diagcorp
kubectl scale deployment diagcorp-worker --replicas=1 -n diagcorp
kubectl scale deployment redis-master --replicas=1 -n diagcorp
# Wait for pods to be ready
kubectl wait --for=condition=ready pod -l app=diagcorp-nginx -n diagcorp --timeout=300s
# Check status
kubectl get pods -n diagcorp
# Test service
kubectl port-forward -n diagcorp service/diag-corp-nginx 8080:80
# Access: http://localhost:8080
If issues after scaling up:
# Check pod logs
kubectl logs -f deployment/diagcorp-nginx -n diagcorp
kubectl logs -f deployment/diagcorp-php -n diagcorp
# Check pod events
kubectl describe pod -n diagcorp
# Check HPA status
kubectl describe hpa diagcorp-nginx -n diagcorp
Performance Metrics
Current Scale
- All Deployments: 0 replicas (INACTIVE)
- HPAs: 2 configured (nginx: 3-7, php: 3-10)
- Age: ~4 years 273 days
- Status: Inactive/Decommissioned
Historical Context
- Last Active: Unknown (all at 0 replicas)
- Architecture: PHP/Nginx corporate portal
- Purpose: DIAG internal corporate website
- Decision Needed: Keep or decommission?
Architecture Notes
- LAMP-like Stack: Nginx + PHP-FPM + Redis
- WordPress Storage: NFS service still exists
- NodePort Access: Port 32536 (external access when active)
- Inactive: All workloads scaled to 0
- Review Needed: Determine if namespace should be deleted