echo"✅ Grafana Application deployed successfully. Press Enter to continue..."
read-p""
# Wait for Grafana pod to be ready
echo"⏳ Waiting for Grafana pod to be ready..."
kubectl wait--for=condition=ready pod -lapp=grafana-pod --timeout=120s
echo"✅ Grafana pod is ready. Press Enter to continue..."
read-p""
# Get the Grafana Application pod name
echo"📋 Checking Grafana Application deployment status -> kubectl get all"
read-p""
kubectl get all
echo"✅ Grafana Application status listed. Press Enter to continue..."
read-p""
# Port forward the Grafana Application
echo"🔌 Setting up port forwarding for Grafana -> kubectl port-forward \$(kubectl get pods -l app=grafana-pod -o jsonpath='{.items[0].metadata.name}') 3000:3000"
read-p""
pod_name=$(kubectl get pods -lapp=grafana-pod -ojsonpath='{.items[0].metadata.name}')
kubectl port-forward $pod_name 3000:3000
echo"✅ Grafana port forwarding established. Press Enter to continue..."