Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
e2438464
Commit
e2438464
authored
May 13, 2017
by
Roberto J Rojas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kubectl: fixes issues #45736 and #45737
Adds long description from #45902
parent
c717a0ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
proxy.go
pkg/kubectl/cmd/proxy.go
+11
-6
No files found.
pkg/kubectl/cmd/proxy.go
View file @
e2438464
...
@@ -35,23 +35,28 @@ import (
...
@@ -35,23 +35,28 @@ import (
var
(
var
(
defaultPort
=
8001
defaultPort
=
8001
proxyLong
=
templates
.
LongDesc
(
i18n
.
T
(
`
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=/
$ 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/
$ 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/
$ 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/
# Run a proxy to kubernetes apiserver on port 8011, serving static content from ./local/www/
kubectl proxy --port=8011 --www=./local/www/
kubectl proxy --port=8011 --www=./local/www/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment