You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem:kubectl proxy --help command directly jumps into the examples of the command without explaining what the command does. For example:
$ kubectl proxy -h
To proxy all of the kubernetes api and nothing else, use:
$ kubectl proxy --api-prefix=/
To proxy only part of the kubernetes api and also some static files:
$ kubectl proxy --www=/my/files --www-prefix=/static/ --api-prefix=/api/
The above lets you 'curl localhost:8001/api/v1/pods'.
To proxy the entire kubernetes api at a different root, use:
$ kubectl proxy --api-prefix=/custom/
The above lets you 'curl localhost:8001/custom/api/v1/pods'
Examples:
# Run a proxy to kubernetes apiserver on port 8011, serving static content from ./local/www/
kubectl proxy --port=8011 --www=./local/www/
# Run a proxy to kubernetes apiserver on an arbitrary local port.
# The chosen port for the server will be output to stdout.
kubectl proxy --port=0
# Run a proxy to kubernetes apiserver, changing the api prefix to k8s-api
# This makes e.g. the pods api available at localhost:8001/k8s-api/v1/pods/
kubectl proxy --api-prefix=/k8s-api
...
Compare this with:
kubectl apply -h
Apply a configuration to a resource by filename or stdin. This resource will be created if it doesn't exist yet. To use
'apply', always create the resource initially with either 'apply' or 'create --save-config'.
JSON and YAML formats are accepted.
Alpha Disclaimer: the --prune functionality is not yet complete. Do not use unless you are aware of what the current
state is. See https://issues.k8s.io/34274.
Examples:
[...]
$ kubectl rollout -h
Manage a deployment using subcommands like "kubectl rollout undo deployment/abc"
Examples:
[...]
The text was updated successfully, but these errors were encountered:
Automatic merge from submit-queue (batch tested with PRs 38990, 45781, 46225, 44899, 43663)
kubectl: fixes issues #45736 and #45737
**What this PR does / why we need it**:
This PR improves the help displayed by the `kubectl proxy` command.
**Which issue this PR fixes**:
fixes#45736, fixes#45737
**Special notes for your reviewer**:
NONE
**Release note**:
NONE
```release-note
```
kubectl Version: 1.6.2
Problem:
kubectl proxy --help
command directly jumps into the examples of the command without explaining what the command does. For example:Compare this with:
The text was updated successfully, but these errors were encountered: