Skip to content

Commit

Permalink
Merge pull request #51 from tengqm/fix-kubectl-for-1.11
Browse files Browse the repository at this point in the history
Fix kubectl reference doc generation for release-1.11
  • Loading branch information
steveperry-53 authored Jun 14, 2018
2 parents f1baf7f + 29d2566 commit 857109f
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 4 deletions.
1 change: 1 addition & 0 deletions gen-kubectldocs/generators/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
manifest.json
8 changes: 4 additions & 4 deletions gen-kubectldocs/generators/read_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ limitations under the License.
package generators

import (
"io/ioutil"
"os"
// "io/ioutil"
// "os"
"sort"

"github.com/spf13/cobra"
"github.com/spf13/pflag"

"k8s.io/kubernetes/pkg/kubectl/cmd"
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
// cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
)

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

// Create the structural representation
return NewKubectlSpec(kubectl)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# <strong>APP MANAGEMENT</strong>

This section contains commands for creating, updating, deleting, and
viewing your workloads in a Kubernetes cluster.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# <strong>GETTING STARTED</strong>

This section contains the most basic commands for getting a workload
running on your cluster.

- `run` will start running 1 or more instances of a container image on your cluster.
- `expose` will load balance traffic across the running instances, and can create a HA proxy for accessing the containers from outside the cluster.

Once your workloads are running, you can use the commands in the
[WORKING WITH APPS](#-strong-working-with-apps-strong-) section to
inspect them.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# <strong>WORKING WITH APPS</strong>

This section contains commands for inspecting and debugging your
applications.

- `logs` will print the logs from the specified pod + container.
- `exec` can be used to get an interactive shell on a pod + container.
- `describe` will print debug information about the given resource.
59 changes: 59 additions & 0 deletions gen-kubectldocs/generators/v1_11/toc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
categories:
- name: GETTING STARTED
include: _getting_started.md
commands:
- create
- get
- run
- expose
- delete
- name: APP MANAGEMENT
include: _app_management.md
commands:
- apply
- annotate
- autoscale
- convert
- edit
- label
- patch
- replace
- rollout
- scale
- set
- wait
- name: WORKING WITH APPS
include: _working_with_apps.md
commands:
- attach
- auth
- cp
- describe
- exec
- logs
- port-forward
- proxy
- top
- name: CLUSTER MANAGEMENT
commands:
- api-versions
- certificate
- cluster-info
- cordon
- drain
- taint
- uncordon
- name: KUBECTL SETTINGS AND USAGE
commands:
- alpha
- api-resources
- completion
- config
- explain
- options
- plugin
- version
- name: DEPRECATED COMMANDS
commands:
- rolling-update
- run-container

0 comments on commit 857109f

Please sign in to comment.