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
e31bc892
Commit
e31bc892
authored
Sep 28, 2015
by
feihujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix minor bugs in kubectl command
parent
ae81f0b5
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
15 additions
and
15 deletions
+15
-15
kubectl-attach.1
docs/man/man1/kubectl-attach.1
+2
-2
kubectl-exec.1
docs/man/man1/kubectl-exec.1
+1
-1
kubectl-run.1
docs/man/man1/kubectl-run.1
+1
-1
kubectl_attach.md
docs/user-guide/kubectl/kubectl_attach.md
+3
-3
kubectl_exec.md
docs/user-guide/kubectl/kubectl_exec.md
+2
-2
kubectl_run.md
docs/user-guide/kubectl/kubectl_run.md
+2
-2
attach.go
pkg/kubectl/cmd/attach.go
+2
-2
exec.go
pkg/kubectl/cmd/exec.go
+1
-1
run.go
pkg/kubectl/cmd/run.go
+1
-1
No files found.
docs/man/man1/kubectl-attach.1
View file @
e31bc892
...
...
@@ -19,7 +19,7 @@ Attach to a a process that is already running inside an existing container.
.SH OPTIONS
.PP
\fB\-c\fP, \fB\-\-container\fP=""
Container name
Container name
. If omitted, the first container in the pod will be chosen
.PP
\fB\-i\fP, \fB\-\-stdin\fP=false
...
...
@@ -135,7 +135,7 @@ $ kubectl attach 123456\-7890
# Get output from ruby\-container from pod 123456\-7890
$ kubectl attach 123456\-7890 \-c ruby\-container date
# Switch to raw terminal mode, sends stdin to 'bash' in ruby\-container from pod 123456\-780
# Switch to raw terminal mode, sends stdin to 'bash' in ruby\-container from pod 123456\-78
9
0
# and sends stdout/stderr from 'bash' back to the client
$ kubectl attach 123456\-7890 \-c ruby\-container \-i \-t
...
...
docs/man/man1/kubectl-exec.1
View file @
e31bc892
...
...
@@ -139,7 +139,7 @@ $ kubectl exec 123456\-7890 date
# Get output from running 'date' in ruby\-container from pod 123456\-7890
$ kubectl exec 123456\-7890 \-c ruby\-container date
# Switch to raw terminal mode, sends stdin to 'bash' in ruby\-container from pod 123456\-780
# Switch to raw terminal mode, sends stdin to 'bash' in ruby\-container from pod 123456\-78
9
0
# and sends stdout/stderr from 'bash' back to the client
$ kubectl exec 123456\-7890 \-c ruby\-container \-i \-t \-\- bash \-il
...
...
docs/man/man1/kubectl-run.1
View file @
e31bc892
...
...
@@ -216,7 +216,7 @@ $ kubectl run nginx \-\-image=nginx
$ kubectl run hazelcast \-\-image=hazelcast \-\-port=5701
# Start a single instance of hazelcast and set environment variables "DNS\_DOMAIN=cluster" and "POD\_NAMESPACE=default" in the container.
$ kubectl run hazelcast \-\-image=hazelcast \-\-env="DNS\_DOMAIN=
local
" \-\-env="POD\_NAMESPACE=default"
$ kubectl run hazelcast \-\-image=hazelcast \-\-env="DNS\_DOMAIN=
cluster
" \-\-env="POD\_NAMESPACE=default"
# Start a replicated instance of nginx.
$ kubectl run nginx \-\-image=nginx \-\-replicas=5
...
...
docs/user-guide/kubectl/kubectl_attach.md
View file @
e31bc892
...
...
@@ -53,7 +53,7 @@ $ kubectl attach 123456-7890
# Get output from ruby-container from pod 123456-7890
$ kubectl attach 123456-7890 -c ruby-container date
# Switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-780
# Switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-78
9
0
# and sends stdout/stderr from 'bash' back to the client
$ kubectl attach 123456-7890 -c ruby-container -i -t
```
...
...
@@ -61,7 +61,7 @@ $ kubectl attach 123456-7890 -c ruby-container -i -t
### Options
```
-c, --container="": Container name
-c, --container="": Container name
. If omitted, the first container in the pod will be chosen
-i, --stdin[=false]: Pass stdin to the container
-t, --tty[=false]: Stdin is a TTY
```
...
...
@@ -98,7 +98,7 @@ $ kubectl attach 123456-7890 -c ruby-container -i -t
*
[
kubectl
](
kubectl.md
)
- kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-09-
10 18:53:03.155651469
+0000 UTC
###### Auto generated by spf13/cobra at 2015-09-
28 05:58:08.934629688
+0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[

]()
...
...
docs/user-guide/kubectl/kubectl_exec.md
View file @
e31bc892
...
...
@@ -53,7 +53,7 @@ $ kubectl exec 123456-7890 date
# Get output from running 'date' in ruby-container from pod 123456-7890
$ kubectl exec 123456-7890 -c ruby-container date
# Switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-780
# Switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-78
9
0
# and sends stdout/stderr from 'bash' back to the client
$ kubectl exec 123456-7890 -c ruby-container -i -t -- bash -il
```
...
...
@@ -99,7 +99,7 @@ $ kubectl exec 123456-7890 -c ruby-container -i -t -- bash -il
*
[
kubectl
](
kubectl.md
)
- kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-09-
10 18:53:03.156052759
+0000 UTC
###### Auto generated by spf13/cobra at 2015-09-
28 05:58:08.934818621
+0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[

]()
...
...
docs/user-guide/kubectl/kubectl_run.md
View file @
e31bc892
...
...
@@ -55,7 +55,7 @@ $ kubectl run nginx --image=nginx
$ kubectl run hazelcast --image=hazelcast --port=5701
# Start a single instance of hazelcast and set environment variables "DNS_DOMAIN=cluster" and "POD_NAMESPACE=default" in the container.
$ kubectl run hazelcast --image=hazelcast --env="DNS_DOMAIN=
local
" --env="POD_NAMESPACE=default"
$ kubectl run hazelcast --image=hazelcast --env="DNS_DOMAIN=
cluster
" --env="POD_NAMESPACE=default"
# Start a replicated instance of nginx.
$ kubectl run nginx --image=nginx --replicas=5
...
...
@@ -135,7 +135,7 @@ $ kubectl run nginx --image=nginx --command -- <cmd> <arg1> ... <argN>
*
[
kubectl
](
kubectl.md
)
- kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-09-
10 18:53:03.1578383
5 +0000 UTC
###### Auto generated by spf13/cobra at 2015-09-
28 05:58:08.9354078
5 +0000 UTC
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[

]()
...
...
pkg/kubectl/cmd/attach.go
View file @
e31bc892
...
...
@@ -39,7 +39,7 @@ $ kubectl attach 123456-7890
# Get output from ruby-container from pod 123456-7890
$ kubectl attach 123456-7890 -c ruby-container date
# Switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-780
# Switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-78
9
0
# and sends stdout/stderr from 'bash' back to the client
$ kubectl attach 123456-7890 -c ruby-container -i -t`
)
...
...
@@ -64,7 +64,7 @@ func NewCmdAttach(f *cmdutil.Factory, cmdIn io.Reader, cmdOut, cmdErr io.Writer)
},
}
// TODO support UID
cmd
.
Flags
()
.
StringVarP
(
&
options
.
ContainerName
,
"container"
,
"c"
,
""
,
"Container name"
)
cmd
.
Flags
()
.
StringVarP
(
&
options
.
ContainerName
,
"container"
,
"c"
,
""
,
"Container name
. If omitted, the first container in the pod will be chosen
"
)
cmd
.
Flags
()
.
BoolVarP
(
&
options
.
Stdin
,
"stdin"
,
"i"
,
false
,
"Pass stdin to the container"
)
cmd
.
Flags
()
.
BoolVarP
(
&
options
.
TTY
,
"tty"
,
"t"
,
false
,
"Stdin is a TTY"
)
return
cmd
...
...
pkg/kubectl/cmd/exec.go
View file @
e31bc892
...
...
@@ -39,7 +39,7 @@ $ kubectl exec 123456-7890 date
# Get output from running 'date' in ruby-container from pod 123456-7890
$ kubectl exec 123456-7890 -c ruby-container date
# Switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-780
# Switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-78
9
0
# and sends stdout/stderr from 'bash' back to the client
$ kubectl exec 123456-7890 -c ruby-container -i -t -- bash -il`
)
...
...
pkg/kubectl/cmd/run.go
View file @
e31bc892
...
...
@@ -42,7 +42,7 @@ $ kubectl run nginx --image=nginx
$ kubectl run hazelcast --image=hazelcast --port=5701
# Start a single instance of hazelcast and set environment variables "DNS_DOMAIN=cluster" and "POD_NAMESPACE=default" in the container.
$ kubectl run hazelcast --image=hazelcast --env="DNS_DOMAIN=
local
" --env="POD_NAMESPACE=default"
$ kubectl run hazelcast --image=hazelcast --env="DNS_DOMAIN=
cluster
" --env="POD_NAMESPACE=default"
# Start a replicated instance of nginx.
$ kubectl run nginx --image=nginx --replicas=5
...
...
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