Update imperative-command.md (#7699)

- Original example (with <myservicename> replaced with my-svc) will result in the following error:
error: at least one tcp port specifier must be provided

- Use the same example in this section seems ideal
This commit is contained in:
githubat
2018-03-23 10:00:03 -07:00
committed by k8s-ci-robot
parent 58c8f49189
commit 57303f8790
@@ -127,7 +127,7 @@ creation. This is done by piping the output of the `create` command to the
`set` command, and then back to the `create` command. Here's an example:
```sh
kubectl create service clusterip <myservicename> -o yaml --dry-run | kubectl set selector --local -f - 'environment=qa' -o yaml | kubectl create -f -
kubectl create service clusterip my-svc --clusterip="None" -o yaml --dry-run | kubectl set selector --local -f - 'environment=qa' -o yaml | kubectl create -f -
```
1. The `kubectl create service -o yaml --dry-run` command creates the configuration for the Service, but prints it to stdout as YAML instead of sending it to the Kubernetes API server.