mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Merge pull request #25072 from AdoHe/deprecate_container_port
mark container-port flag as deprecated
This commit is contained in:
		@@ -85,7 +85,6 @@ kubectl expose deployment nginx --port=80 --target-port=8000
 | 
				
			|||||||
### Options
 | 
					### Options
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
      --container-port="": Synonym for --target-port
 | 
					 | 
				
			||||||
      --dry-run[=false]: If true, only print the object that would be sent, without creating it.
 | 
					      --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.
 | 
					      --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
 | 
					  -f, --filename=[]: Filename, directory, or URL to a file identifying the resource to expose a service
 | 
				
			||||||
@@ -144,7 +143,7 @@ kubectl expose deployment nginx --port=80 --target-port=8000
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
* [kubectl](kubectl.md)	 - kubectl controls the Kubernetes cluster manager
 | 
					* [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 -->
 | 
					<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
 | 
				
			||||||
[]()
 | 
					[]()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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().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().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().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("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("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.")
 | 
						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.")
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user