KUBERNETES(1) kubernetes KUBERNETES(1) (NAME) kubectl-port-forward - (SYNOPSIS) kubectl port-forward [OPTIONS] (DESCRIPTION) . / deployment/mydeployment . 'pod' . . . (OPTIONS) --address=[localhost] ( ). IP localhost . localhost kubectl 127.0.0.1 ::1 (bind) . --pod-running-timeout=1m0s ( 5s 2m 3h ) (OPTIONS INHERITED FROM PARENT COMMANDS) --as="" (impersonate) . (service account) (namespace) . --as-group=[] . --as-uid="" (UID) . --as-user-extra=[] (user extras) . --cache-dir="/home/username/.kube/cache" --certificate-authority="" (certificate authority) --client-certificate="" TLS --client-key="" TLS --cluster="" kubeconfig --context="" kubeconfig --disable-compression=false true --insecure-skip-tls-verify=false true . HTTPS --kubeconfig="" kubeconfig CLI. --kuberc="" kuberc (preferences). export feature gate KUBECTL_KUBERC=false KUBERC=off . --match-server-version=false -n, --namespace="" (namespace) CLI --password="" (basic authentication) API --profile="none" . (none|cpu|heap|goroutine|threadcreate|block|mutex|trace) --profile-output="profile.pprof" --request-timeout="0" . ( 1s 2m 3h). (timeout) . -s, --server="" Kubernetes API --tls-server-name="" . (hostname) --token="" Bearer API --user="" kubeconfig --username="" API --version=false --version --version=raw --version=vX.Y.Z... --warnings-as-errors=false (EXAMPLES) # 5000 6000 / 5000 6000 kubectl port-forward pod/mypod 5000 6000 # 5000 6000 / 5000 6000 (deployment) kubectl port-forward deployment/mydeployment 5000 6000 # 8443 targetPort "https" kubectl port-forward service/myservice 8443:https # 8888 5000 kubectl port-forward pod/mypod 8888:5000 # 8888 5000 kubectl port-forward --address 0.0.0.0 pod/mypod 8888:5000 # 8888 localhost IP 5000 kubectl port-forward --address localhost,10.19.21.23 pod/mypod 8888:5000 # 5000 kubectl port-forward pod/mypod :5000 (SEE ALSO) kubectl(1) (HISTORY) Eric Paris (eparis at redhat dot com) kubernetes ! Eric Paris Jan 2015 KUBERNETES(1)