mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Update kubectl help for 1.2 resources
This commit is contained in:
@@ -37,14 +37,14 @@ type ExposeOptions struct {
|
||||
}
|
||||
|
||||
const (
|
||||
expose_long = `Take a replication controller, service, replica set, deployment or pod and expose it as a new Kubernetes service.
|
||||
expose_long = `Take a deployment, service, replica set, replication controller, or pod and expose it as a new Kubernetes service.
|
||||
|
||||
Looks up a replication controller, service, replica set, deployment or pod by name and uses the selector
|
||||
for that resource as the selector for a new service on the specified port. A replica set will be exposed
|
||||
as a service only if it's selector is convertible to a selector that service supports, i.e. when the
|
||||
replica set selector contains only the matchLabels component. Note that if no port is specified
|
||||
via --port and the exposed resource has multiple ports, all will be re-used by the new service. Also
|
||||
if no labels are specified, the new service will re-use the labels from the resource it exposes.`
|
||||
Looks up a deployment, service, replica set, replication controller or pod by name and uses the selector
|
||||
for that resource as the selector for a new service on the specified port. A deployment or replica set
|
||||
will be exposed as a service only if its selector is convertible to a selector that service supports,
|
||||
i.e. when the selector contains only the matchLabels component. Note that if no port is specified via
|
||||
--port and the exposed resource has multiple ports, all will be re-used by the new service. Also if no
|
||||
labels are specified, the new service will re-use the labels from the resource it exposes.`
|
||||
|
||||
expose_example = `# Create a service for a replicated nginx, which serves on port 80 and connects to the containers on port 8000.
|
||||
kubectl expose rc nginx --port=80 --target-port=8000
|
||||
@@ -73,7 +73,7 @@ func NewCmdExposeService(f *cmdutil.Factory, out io.Writer) *cobra.Command {
|
||||
|
||||
cmd := &cobra.Command{
|
||||
Use: "expose (-f FILENAME | TYPE NAME) [--port=port] [--protocol=TCP|UDP] [--target-port=number-or-name] [--name=name] [--external-ip=external-ip-of-service] [--type=type]",
|
||||
Short: "Take a replication controller, service or pod and expose it as a new Kubernetes Service",
|
||||
Short: "Take a replication controller, service, or pod and expose it as a new Kubernetes Service",
|
||||
Long: expose_long,
|
||||
Example: expose_example,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
|
||||
Reference in New Issue
Block a user