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
0dd625ff
Commit
0dd625ff
authored
Mar 25, 2015
by
Clayton Coleman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Order the commands in kubectl by importance and function
Move the client config commands towards the bottom, keep the primary verbs near the top. Version goes at the bottom.
parent
8183a480
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
18 deletions
+18
-18
kubectl-port-forward.md
docs/kubectl-port-forward.md
+2
-2
kubectl.md
docs/kubectl.md
+5
-5
kubectl-port-forward.1
docs/man/man1/kubectl-port-forward.1
+2
-2
kubectl.1
docs/man/man1/kubectl.1
+1
-1
cmd.go
pkg/kubectl/cmd/cmd.go
+6
-6
portforward.go
pkg/kubectl/cmd/portforward.go
+2
-2
No files found.
docs/kubectl-port-forward.md
View file @
0dd625ff
## kubectl port-forward
## kubectl port-forward
Forward
1
or more local ports to a pod.
Forward
one
or more local ports to a pod.
### Synopsis
### Synopsis
Forward
1
or more local ports to a pod.
Forward
one
or more local ports to a pod.
```
```
kubectl port-forward -p POD [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N]
kubectl port-forward -p POD [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N]
...
...
docs/kubectl.md
View file @
0dd625ff
...
@@ -45,24 +45,24 @@ kubectl
...
@@ -45,24 +45,24 @@ kubectl
```
```
### SEE ALSO
### SEE ALSO
*
[
kubectl-version
](
kubectl-version.md
)
*
[
kubectl-apiversions
](
kubectl-apiversions.md
)
*
[
kubectl-clusterinfo
](
kubectl-clusterinfo.md
)
*
[
kubectl-proxy
](
kubectl-proxy.md
)
*
[
kubectl-get
](
kubectl-get.md
)
*
[
kubectl-get
](
kubectl-get.md
)
*
[
kubectl-describe
](
kubectl-describe.md
)
*
[
kubectl-describe
](
kubectl-describe.md
)
*
[
kubectl-create
](
kubectl-create.md
)
*
[
kubectl-create
](
kubectl-create.md
)
*
[
kubectl-update
](
kubectl-update.md
)
*
[
kubectl-update
](
kubectl-update.md
)
*
[
kubectl-delete
](
kubectl-delete.md
)
*
[
kubectl-delete
](
kubectl-delete.md
)
*
[
kubectl-config
](
kubectl-config.md
)
*
[
kubectl-namespace
](
kubectl-namespace.md
)
*
[
kubectl-namespace
](
kubectl-namespace.md
)
*
[
kubectl-log
](
kubectl-log.md
)
*
[
kubectl-log
](
kubectl-log.md
)
*
[
kubectl-rollingupdate
](
kubectl-rollingupdate.md
)
*
[
kubectl-rollingupdate
](
kubectl-rollingupdate.md
)
*
[
kubectl-resize
](
kubectl-resize.md
)
*
[
kubectl-resize
](
kubectl-resize.md
)
*
[
kubectl-exec
](
kubectl-exec.md
)
*
[
kubectl-exec
](
kubectl-exec.md
)
*
[
kubectl-port-forward
](
kubectl-port-forward.md
)
*
[
kubectl-port-forward
](
kubectl-port-forward.md
)
*
[
kubectl-proxy
](
kubectl-proxy.md
)
*
[
kubectl-run-container
](
kubectl-run-container.md
)
*
[
kubectl-run-container
](
kubectl-run-container.md
)
*
[
kubectl-stop
](
kubectl-stop.md
)
*
[
kubectl-stop
](
kubectl-stop.md
)
*
[
kubectl-expose
](
kubectl-expose.md
)
*
[
kubectl-expose
](
kubectl-expose.md
)
*
[
kubectl-label
](
kubectl-label.md
)
*
[
kubectl-label
](
kubectl-label.md
)
*
[
kubectl-config
](
kubectl-config.md
)
*
[
kubectl-clusterinfo
](
kubectl-clusterinfo.md
)
*
[
kubectl-apiversions
](
kubectl-apiversions.md
)
*
[
kubectl-version
](
kubectl-version.md
)
docs/man/man1/kubectl-port-forward.1
View file @
0dd625ff
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
.SH NAME
.SH NAME
.PP
.PP
kubectl port\-forward \- Forward
1
or more local ports to a pod.
kubectl port\-forward \- Forward
one
or more local ports to a pod.
.SH SYNOPSIS
.SH SYNOPSIS
...
@@ -13,7 +13,7 @@ kubectl port\-forward \- Forward 1 or more local ports to a pod.
...
@@ -13,7 +13,7 @@ kubectl port\-forward \- Forward 1 or more local ports to a pod.
.SH DESCRIPTION
.SH DESCRIPTION
.PP
.PP
Forward
1
or more local ports to a pod.
Forward
one
or more local ports to a pod.
.SH OPTIONS
.SH OPTIONS
...
...
docs/man/man1/kubectl.1
View file @
0dd625ff
...
@@ -128,7 +128,7 @@ Find more information at
...
@@ -128,7 +128,7 @@ Find more information at
.SH SEE ALSO
.SH SEE ALSO
.PP
.PP
\fBkubectl\-
version(1)\fP, \fBkubectl\-apiversions(1)\fP, \fBkubectl\-clusterinfo(1)\fP, \fBkubectl\-proxy(1)\fP, \fBkubectl\-get(1)\fP, \fBkubectl\-describe(1)\fP, \fBkubectl\-create(1)\fP, \fBkubectl\-update(1)\fP, \fBkubectl\-delete(1)\fP, \fBkubectl\-config(1)\fP, \fBkubectl\-namespace(1)\fP, \fBkubectl\-log(1)\fP, \fBkubectl\-rollingupdate(1)\fP, \fBkubectl\-resize(1)\fP, \fBkubectl\-exec(1)\fP, \fBkubectl\-port\-forward(1)\fP, \fBkubectl\-run\-container(1)\fP, \fBkubectl\-stop(1)\fP, \fBkubectl\-expose(1)\fP, \fBkubectl\-label
(1)\fP,
\fBkubectl\-
get(1)\fP, \fBkubectl\-describe(1)\fP, \fBkubectl\-create(1)\fP, \fBkubectl\-update(1)\fP, \fBkubectl\-delete(1)\fP, \fBkubectl\-namespace(1)\fP, \fBkubectl\-log(1)\fP, \fBkubectl\-rollingupdate(1)\fP, \fBkubectl\-resize(1)\fP, \fBkubectl\-exec(1)\fP, \fBkubectl\-port\-forward(1)\fP, \fBkubectl\-proxy(1)\fP, \fBkubectl\-run\-container(1)\fP, \fBkubectl\-stop(1)\fP, \fBkubectl\-expose(1)\fP, \fBkubectl\-label(1)\fP, \fBkubectl\-config(1)\fP, \fBkubectl\-clusterinfo(1)\fP, \fBkubectl\-apiversions(1)\fP, \fBkubectl\-version
(1)\fP,
.SH HISTORY
.SH HISTORY
...
...
pkg/kubectl/cmd/cmd.go
View file @
0dd625ff
...
@@ -200,18 +200,12 @@ Find more information at https://github.com/GoogleCloudPlatform/kubernetes.`,
...
@@ -200,18 +200,12 @@ Find more information at https://github.com/GoogleCloudPlatform/kubernetes.`,
f
.
BindFlags
(
cmds
.
PersistentFlags
())
f
.
BindFlags
(
cmds
.
PersistentFlags
())
cmds
.
AddCommand
(
f
.
NewCmdVersion
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdApiVersions
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdClusterInfo
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdProxy
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdGet
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdGet
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdDescribe
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdDescribe
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdCreate
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdCreate
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdUpdate
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdUpdate
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdDelete
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdDelete
(
out
))
cmds
.
AddCommand
(
cmdconfig
.
NewCmdConfig
(
out
))
cmds
.
AddCommand
(
NewCmdNamespace
(
out
))
cmds
.
AddCommand
(
NewCmdNamespace
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdLog
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdLog
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdRollingUpdate
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdRollingUpdate
(
out
))
...
@@ -219,6 +213,7 @@ Find more information at https://github.com/GoogleCloudPlatform/kubernetes.`,
...
@@ -219,6 +213,7 @@ Find more information at https://github.com/GoogleCloudPlatform/kubernetes.`,
cmds
.
AddCommand
(
f
.
NewCmdExec
(
in
,
out
,
err
))
cmds
.
AddCommand
(
f
.
NewCmdExec
(
in
,
out
,
err
))
cmds
.
AddCommand
(
f
.
NewCmdPortForward
())
cmds
.
AddCommand
(
f
.
NewCmdPortForward
())
cmds
.
AddCommand
(
f
.
NewCmdProxy
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdRunContainer
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdRunContainer
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdStop
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdStop
(
out
))
...
@@ -226,6 +221,11 @@ Find more information at https://github.com/GoogleCloudPlatform/kubernetes.`,
...
@@ -226,6 +221,11 @@ Find more information at https://github.com/GoogleCloudPlatform/kubernetes.`,
cmds
.
AddCommand
(
f
.
NewCmdLabel
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdLabel
(
out
))
cmds
.
AddCommand
(
cmdconfig
.
NewCmdConfig
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdClusterInfo
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdApiVersions
(
out
))
cmds
.
AddCommand
(
f
.
NewCmdVersion
(
out
))
return
cmds
return
cmds
}
}
...
...
pkg/kubectl/cmd/portforward.go
View file @
0dd625ff
...
@@ -45,8 +45,8 @@ $ kubectl port-forward -p mypod 0:5000`
...
@@ -45,8 +45,8 @@ $ kubectl port-forward -p mypod 0:5000`
func
(
f
*
Factory
)
NewCmdPortForward
()
*
cobra
.
Command
{
func
(
f
*
Factory
)
NewCmdPortForward
()
*
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
Use
:
"port-forward -p POD [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N]"
,
Use
:
"port-forward -p POD [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N]"
,
Short
:
"Forward
1
or more local ports to a pod."
,
Short
:
"Forward
one
or more local ports to a pod."
,
Long
:
"Forward
1
or more local ports to a pod."
,
Long
:
"Forward
one
or more local ports to a pod."
,
Example
:
portforward_example
,
Example
:
portforward_example
,
Run
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
Run
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
err
:=
RunPortForward
(
f
,
cmd
,
args
)
err
:=
RunPortForward
(
f
,
cmd
,
args
)
...
...
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