Skip to content

Instantly share code, notes, and snippets.

@jirfag
Created March 29, 2020 16:58
Show Gist options
  • Save jirfag/894ce07b6fcd6f409691d64f641781b4 to your computer and use it in GitHub Desktop.
Save jirfag/894ce07b6fcd6f409691d64f641781b4 to your computer and use it in GitHub Desktop.
Kubernetes port forwarding
#!/bin/bash
set -x
echo "grafana is in http://127.0.0.1:7000/"
echo "use login admin"
echo "use password $(kubectl get secret --namespace monitoring grafana -o jsonpath="{.data.adminPassword}" | base64 --decode)"
kubectl -n monitoring port-forward service/prometheus-operator-grafana 7000:80
#echo "prometheus is in http://127.0.0.1:9090/"
#kubectl -n monitoring port-forward service/prometheus-operator-prometheus 9090:9090
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment