mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Add a Deployment example for kubectl expose.
This commit is contained in:
parent
62399077d8
commit
67b70d7c89
@ -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
|
||||
|
||||
|
@ -72,6 +72,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
|
||||
@ -134,7 +137,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 2-Mar-2016
|
||||
###### Auto generated by spf13/cobra on 18-Mar-2016
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user