Skip to content

Commit

Permalink
Merge pull request #25072 from AdoHe/deprecate_container_port
Browse files Browse the repository at this point in the history
mark container-port flag as deprecated
  • Loading branch information
roberthbailey committed May 6, 2016
2 parents f6a6846 + ba69f0f commit bb08b27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions docs/user-guide/kubectl/kubectl_expose.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ kubectl expose deployment nginx --port=80 --target-port=8000
### Options

```
--container-port="": Synonym for --target-port
--dry-run[=false]: If true, only print the object that would be sent, without creating it.
--external-ip="": Additional external IP address (not managed by Kubernetes) to accept for the service. If this IP is routed to a node, the service can be accessed by this IP in addition to its generated service IP.
-f, --filename=[]: Filename, directory, or URL to a file identifying the resource to expose a service
Expand Down Expand Up @@ -144,7 +143,7 @@ kubectl expose deployment nginx --port=80 --target-port=8000

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

###### Auto generated by spf13/cobra on 10-Apr-2016
###### Auto generated by spf13/cobra on 3-May-2016

<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_expose.md?pixel)]()
Expand Down
1 change: 1 addition & 0 deletions pkg/kubectl/cmd/expose.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ func NewCmdExposeService(f *cmdutil.Factory, out io.Writer) *cobra.Command {
cmd.Flags().StringP("labels", "l", "", "Labels to apply to the service created by this call.")
cmd.Flags().Bool("dry-run", false, "If true, only print the object that would be sent, without creating it.")
cmd.Flags().String("container-port", "", "Synonym for --target-port")
cmd.Flags().MarkDeprecated("container-port", "--container-port will be removed in the future, please use --target-port instead")
cmd.Flags().String("target-port", "", "Name or number for the port on the container that the service should direct traffic to. Optional.")
cmd.Flags().String("external-ip", "", "Additional external IP address (not managed by Kubernetes) to accept for the service. If this IP is routed to a node, the service can be accessed by this IP in addition to its generated service IP.")
cmd.Flags().String("overrides", "", "An inline JSON override for the generated object. If this is non-empty, it is used to override the generated object. Requires that the object supply a valid apiVersion field.")
Expand Down

0 comments on commit bb08b27

Please sign in to comment.