Skip to content

Commit 857109f

Browse files
Merge pull request #51 from tengqm/fix-kubectl-for-1.11
Fix kubectl reference doc generation for release-1.11
2 parents f1baf7f + 29d2566 commit 857109f

File tree

6 files changed

+87
-4
lines changed

6 files changed

+87
-4
lines changed

gen-kubectldocs/generators/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
manifest.json

gen-kubectldocs/generators/read_cmd.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@ limitations under the License.
1717
package generators
1818

1919
import (
20-
"io/ioutil"
21-
"os"
20+
// "io/ioutil"
21+
// "os"
2222
"sort"
2323

2424
"github.com/spf13/cobra"
2525
"github.com/spf13/pflag"
2626

2727
"k8s.io/kubernetes/pkg/kubectl/cmd"
28-
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
28+
// cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
2929
)
3030

3131
func GetSpec() KubectlSpec {
3232
// Initialize a kubectl command that we can use to get the help documentation
33-
kubectl := cmd.NewKubectlCommand(cmdutil.NewFactory(nil), os.Stdin, ioutil.Discard, ioutil.Discard)
33+
kubectl := cmd.NewDefaultKubectlCommand()
3434

3535
// Create the structural representation
3636
return NewKubectlSpec(kubectl)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# <strong>APP MANAGEMENT</strong>
2+
3+
This section contains commands for creating, updating, deleting, and
4+
viewing your workloads in a Kubernetes cluster.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# <strong>GETTING STARTED</strong>
2+
3+
This section contains the most basic commands for getting a workload
4+
running on your cluster.
5+
6+
- `run` will start running 1 or more instances of a container image on your cluster.
7+
- `expose` will load balance traffic across the running instances, and can create a HA proxy for accessing the containers from outside the cluster.
8+
9+
Once your workloads are running, you can use the commands in the
10+
[WORKING WITH APPS](#-strong-working-with-apps-strong-) section to
11+
inspect them.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# <strong>WORKING WITH APPS</strong>
2+
3+
This section contains commands for inspecting and debugging your
4+
applications.
5+
6+
- `logs` will print the logs from the specified pod + container.
7+
- `exec` can be used to get an interactive shell on a pod + container.
8+
- `describe` will print debug information about the given resource.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
categories:
2+
- name: GETTING STARTED
3+
include: _getting_started.md
4+
commands:
5+
- create
6+
- get
7+
- run
8+
- expose
9+
- delete
10+
- name: APP MANAGEMENT
11+
include: _app_management.md
12+
commands:
13+
- apply
14+
- annotate
15+
- autoscale
16+
- convert
17+
- edit
18+
- label
19+
- patch
20+
- replace
21+
- rollout
22+
- scale
23+
- set
24+
- wait
25+
- name: WORKING WITH APPS
26+
include: _working_with_apps.md
27+
commands:
28+
- attach
29+
- auth
30+
- cp
31+
- describe
32+
- exec
33+
- logs
34+
- port-forward
35+
- proxy
36+
- top
37+
- name: CLUSTER MANAGEMENT
38+
commands:
39+
- api-versions
40+
- certificate
41+
- cluster-info
42+
- cordon
43+
- drain
44+
- taint
45+
- uncordon
46+
- name: KUBECTL SETTINGS AND USAGE
47+
commands:
48+
- alpha
49+
- api-resources
50+
- completion
51+
- config
52+
- explain
53+
- options
54+
- plugin
55+
- version
56+
- name: DEPRECATED COMMANDS
57+
commands:
58+
- rolling-update
59+
- run-container

0 commit comments

Comments
 (0)