Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

Commit

Permalink
Merge pull request kubernetes#23222 from madhusudancs/kubectl-expose-…
Browse files Browse the repository at this point in the history
…deployment-example

Auto commit by PR queue bot
(cherry picked from commit 2c5903a)
  • Loading branch information
k8s-merge-robot authored and Alain Roy committed Mar 29, 2016
1 parent 35de841 commit 82fbe12
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docs/man/man1/kubectl-expose.1
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ kubectl expose rc streamer \-\-port=4100 \-\-protocol=udp \-\-name=video\-stream
# Create a service for a replicated nginx using replica set, which serves on port 80 and connects to the containers on port 8000.
kubectl expose rs nginx \-\-port=80 \-\-target\-port=8000

# Create a service for an nginx deployment, which serves on port 80 and connects to the containers on port 8000.
kubectl expose deployment nginx \-\-port=80 \-\-target\-port=8000

.fi
.RE

Expand Down
5 changes: 4 additions & 1 deletion docs/user-guide/kubectl/kubectl_expose.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ kubectl expose rc streamer --port=4100 --protocol=udp --name=video-stream
# Create a service for a replicated nginx using replica set, which serves on port 80 and connects to the containers on port 8000.
kubectl expose rs nginx --port=80 --target-port=8000
# Create a service for an nginx deployment, which serves on port 80 and connects to the containers on port 8000.
kubectl expose deployment nginx --port=80 --target-port=8000
```

### Options
Expand Down Expand Up @@ -105,7 +108,7 @@ kubectl expose rs nginx --port=80 --target-port=8000

* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager

###### Auto generated by spf13/cobra on 11-Mar-2016
###### Auto generated by spf13/cobra on 18-Mar-2016



Expand Down
5 changes: 4 additions & 1 deletion pkg/kubectl/cmd/expose.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ kubectl expose service nginx --port=443 --target-port=8443 --name=nginx-https
kubectl expose rc streamer --port=4100 --protocol=udp --name=video-stream
# Create a service for a replicated nginx using replica set, which serves on port 80 and connects to the containers on port 8000.
kubectl expose rs nginx --port=80 --target-port=8000`
kubectl expose rs nginx --port=80 --target-port=8000
# Create a service for an nginx deployment, which serves on port 80 and connects to the containers on port 8000.
kubectl expose deployment nginx --port=80 --target-port=8000`
)

func NewCmdExposeService(f *cmdutil.Factory, out io.Writer) *cobra.Command {
Expand Down

0 comments on commit 82fbe12

Please sign in to comment.