From e24384643e09cefff81e54111a40f28544ad553c Mon Sep 17 00:00:00 2001 From: Roberto J Rojas Date: Sat, 13 May 2017 18:03:23 -0400 Subject: [PATCH] kubectl: fixes issues #45736 and #45737 Adds long description from #45902 --- pkg/kubectl/cmd/proxy.go | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pkg/kubectl/cmd/proxy.go b/pkg/kubectl/cmd/proxy.go index 02fa75ccdf1..667841d6618 100644 --- a/pkg/kubectl/cmd/proxy.go +++ b/pkg/kubectl/cmd/proxy.go @@ -35,23 +35,28 @@ import ( var ( defaultPort = 8001 proxyLong = templates.LongDesc(i18n.T(` - To proxy all of the kubernetes api and nothing else, use: + Creates a proxy server or application-level gateway between localhost and + the Kubernetes API Server. It also allows serving static content over specified + HTTP path. All incoming data enters through one port and gets forwarded to + the remote kubernetes API Server port, except for the path matching the static content path.`)) + + proxyExample = templates.Examples(i18n.T(` + # 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: + # 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'. + # The above lets you 'curl localhost:8001/api/v1/pods'. - To proxy the entire kubernetes api at a different root, use: + # 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'`)) + # The above lets you 'curl localhost:8001/custom/api/v1/pods' - proxyExample = templates.Examples(i18n.T(` # Run a proxy to kubernetes apiserver on port 8011, serving static content from ./local/www/ kubectl proxy --port=8011 --www=./local/www/