Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add short docs about automatic port-forwarding #1637

Merged
merged 2 commits into from
Feb 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions docs/content/en/docs/how-tos/portforward/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@ linkTitle: "Port forwarding"
weight: 50
---

This page discusses how to set up port forwarding for container ports from pods.

{{% todo 1076 %}}
This page discusses how Skaffold sets up port forwarding for container ports from pods. When Skaffold deploys an application, it will automatically forward any ports mentioned in the pod spec.

For example, if we have the following pod manifest, Skaffold will forward port 8000 to port 8000 on our machine:

```
apiVersion: v1
kind: Pod
metadata:
name: example
spec:
containers:
- name: skaffold-example
image: gcr.io/k8s-skaffold/skaffold-example
ports:
- name: web
containerPort: 8000
```

If port 8000 isn't available, another random port will be chosen.