6

Any suggestion where I can get and install kubectl man pages? Asking Google all the time is getting annoying.

I want to be able to see the man page from the command line like:

$ man kubectl pods

I obviously know about the documentation online on the internet.

Thanks

smrt28
  • 294
  • 3
  • 11

2 Answers2

3

The kubectl CLI is written in Golang, and use Cobra features to automatic generate documentation based on subcommands, flags, etc.

So, you can use kubectl --help to see all the available options. Furthermore, you can dig into specific subcommands options (e.g., kubectl describe --help, kubectl get --help and so on).

More than that, you can use kubectl explain to describe the fields associated with each supported API resources, which is very useful when writing templates. Examples:

  # Get the documentation of the resource and its fields
  kubectl explain pods

  # Get the documentation of a specific field of a resource
  kubectl explain pods.spec.containers
1

I don't think there is a man page for this. But the CLI reference is here and can be bookmarked:

https://kubernetes.io/docs/reference/kubectl/kubectl/

xenoid
  • 5,376
  • 2
  • 16
  • 34
  • 1
    yah, this is exactly what I don't need :-D – smrt28 Apr 02 '19 at 08:56
  • @andrew.46 it wasn't. The "yah" in my previous post was mentioned sarcastically since I was asking for the man pages, not for the doc on the internet which I obviously know about. – smrt28 Apr 03 '19 at 07:47