28 lines
850 B
Bash
Executable File
28 lines
850 B
Bash
Executable File
#!/bin/bash
|
|
# Setup shared Kubernetes cluster configuration
|
|
|
|
set -e
|
|
|
|
echo "☸️ Setting up shared Kubernetes cluster configuration..."
|
|
|
|
# Check prerequisites
|
|
command -v kubectl >/dev/null 2>&1 || { echo "❌ kubectl not found"; exit 1; }
|
|
|
|
# Apply namespace isolation
|
|
echo "🔒 Applying namespace isolation..."
|
|
kubectl apply -f namespace-isolation.yaml
|
|
|
|
# Apply ingress controller
|
|
echo "🚪 Setting up ingress controller..."
|
|
kubectl apply -f ingress-controller.yaml
|
|
|
|
# Wait for ingress controller
|
|
echo "⏳ Waiting for ingress controller to be ready..."
|
|
kubectl wait --for=condition=available --timeout=300s deployment/ingress-nginx-controller -n ingress-nginx
|
|
|
|
echo "✅ Shared Kubernetes cluster configuration complete!"
|
|
echo ""
|
|
echo "📝 Ingress controller is ready"
|
|
echo " Get external IP: kubectl get svc -n ingress-nginx ingress-nginx"
|
|
|