Difference between revisions of "Kubectl port-forward"

From wikieduonline
Jump to navigation Jump to search
Line 24: Line 24:
 
* <code>[[kubectl get pods]]</code>
 
* <code>[[kubectl get pods]]</code>
 
* [[Port forwarding]]
 
* [[Port forwarding]]
 +
* [[Kubernetes services]]
  
 
== See also ==
 
== See also ==

Revision as of 15:17, 3 February 2022

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

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
error: unable to forward port because pod is not running. Current status=Failed
kubectl --namespace default port-forward $POD_NAME 3000
error: unable to forward port because pod is not running. Current status=Pending
kubectl --namespace default port-forward $POD_NAME 3000
Forwarding from 127.0.0.1:3000 -> 3000
Forwarding from [::1]:3000 -> 3000
kubectl --namespace default port-forward $POD_NAME 3000
error: You must be logged in to the server (Unauthorized)


Related

See also

Advertising: