Skip to main content

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 NameTargetMinMaxCurrentStatus
diagcorp-nginxNginx deployment373HPA active but deployment at 0
diagcorp-phpPHP deployment3103HPA active but deployment at 0

Note: HPAs are configured but deployment replicas set to 0

Workload Categories

ALL SCALED TO ZERO (4 deployments)

NameReplicasStatusPurpose
diagcorp-nginx0/0InactiveWeb server
diagcorp-php0/0InactivePHP-FPM application server
diagcorp-worker0/0InactiveBackground worker
redis-master0/0InactiveRedis cache

Services

NameTypeCluster IPPortsPurpose
diag-corp-nginxNodePort10.8.16.3780:32536Nginx web server (inactive)
diag-corp-phpClusterIP10.8.20.829000PHP-FPM service (inactive)
redis-svcClusterIP10.8.30.1476379Redis cache (inactive)
wordpress-diskClusterIP10.8.31.1122049, 20048, 111NFS 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

  1. Review Usage:

    • Determine if diagcorp portal is still needed
    • Last scaled down: Check deployment history
    • If permanently unused → consider namespace deletion
  2. If Reactivating:

    • Test in staging first
    • Verify database connectivity
    • Check Redis configuration
    • Scale up gradually (nginx → php → worker)
    • Monitor HPA behavior
  3. If No Longer Needed:

    • Document decision to decommission
    • Back up any important data
    • Export configurations
    • Delete namespace: kubectl delete namespace diagcorp
  4. 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