Difference between revisions of "Kubectl port-forward"

From wikieduonline
Jump to navigation Jump to search
Line 7: Line 7:
  
 
* <code>kubectl --namespace default port-forward $POD_NAME 3000</code>
 
* <code>kubectl --namespace default port-forward $POD_NAME 3000</code>
 +
 +
export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=grafana,app.kubernetes.io/instance=grafana" -o jsonpath="{.items[0].metadata.name}")
 +
kubectl --namespace default port-forward $POD_NAME 3000
  
 
== See also ==
 
== See also ==

Revision as of 19:44, 28 November 2021

This article is a Draft. Help us to complete it.

kubectl port-forward


  • kubectl --namespace default port-forward $POD_NAME 3000
export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=grafana,app.kubernetes.io/instance=grafana" -o jsonpath="{.items[0].metadata.name}")
kubectl --namespace default port-forward $POD_NAME 3000

See also

Advertising: