Skip to content

Commit

Permalink
Update imperative-command.md
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
githubat authored Mar 10, 2018
1 parent 3472cfd commit ebc5a25
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit ebc5a25

Please sign in to comment.