Skip to content

Commit

Permalink
Merge pull request #1637 from michaelbeaumont/patch-1
Browse files Browse the repository at this point in the history
Add short docs about automatic port-forwarding
  • Loading branch information
dgageot authored Feb 10, 2019
2 parents 19edc4e + 2611dd1 commit aa0bdc3
Showing 1 changed file with 19 additions and 3 deletions.
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.

0 comments on commit aa0bdc3

Please sign in to comment.