Difference between revisions of "Kubectl port-forward"
Jump to navigation
Jump to search
Line 4: | Line 4: | ||
* <code>[[kubectl]] [[port-forward]]</code> | * <code>[[kubectl]] [[port-forward]]</code> | ||
* <code>kubectl --namespace default port-forward $POD_NAME 3000</code> | * <code>kubectl --namespace default port-forward $POD_NAME 3000</code> | ||
+ | * <code>kubectl port-forward svc/[[argocd]]-server -n argocd 8080:443</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}") | 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}") |
Revision as of 15:15, 3 February 2022
This article is a Draft. Help us to complete it.
kubectl port-forward
kubectl --namespace default port-forward $POD_NAME 3000
kubectl port-forward svc/argocd-server -n argocd 8080:443
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
kubectl
: [cp | config | create
|delete
|edit | explain |
apply
|exec
|get
|set
|drain | uncordon | rolling-update
|rollout
|logs
|run
|auth
|label | annotate
|version
|top
|diff
|debug
|replace
|describe
|port-forward | proxy
|scale
|rollout
|api-resources
| expose deployment | expose | patch | attach | get endpoints | ~/.kube/config | kubectl logs --help | kubectl --help, kubectl-convert, kubectl autoscale, kubectl.kubernetes.io
Advertising: