#!/bin/bash # Simple Kubernetes deployment script echo "🚀 Deploying Proxy Detection API to Kubernetes..." # Apply secret (API key) echo "📋 Creating secret..." kubectl apply -f k8s-secret.yaml # Apply deployment and service echo "🔧 Deploying application..." kubectl apply -f k8s-deployment.yaml # Optional: Apply ingress read -p "Do you want to deploy ingress? (y/N): " -n 1 -r echo if [[ $REPLY =~ ^[Yy]$ ]]; then echo "🌐 Deploying ingress..." kubectl apply -f k8s-ingress.yaml fi # Check deployment status echo "📊 Checking deployment status..." kubectl rollout status deployment/proxy-detection-api # Show service info echo "📋 Service information:" kubectl get service proxy-detection-service echo "✅ Deployment completed!" echo "💡 To test the API:" echo " kubectl port-forward service/proxy-detection-service 8080:80" echo " curl http://localhost:8080/health"