Merge pull request #41049 from able8/add-go-template-to-kubectl-output-format

Add the go-template output format in "kubectl Cheat Sheet" page
pull/42622/head
Kubernetes Prow Robot 2023-08-18 11:14:28 -07:00 committed by GitHub
commit e6987bde68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -431,6 +431,8 @@ Output format | Description
--------------| -----------
`-o=custom-columns=<spec>` | Print a table using a comma separated list of custom columns
`-o=custom-columns-file=<filename>` | Print a table using the custom columns template in the `<filename>` file
`-o=go-template=<template>` | Print the fields defined in a [golang template](https://pkg.go.dev/text/template)
`-o=go-template-file=<filename>` | Print the fields defined by the [golang template](https://pkg.go.dev/text/template) in the `<filename>` file
`-o=json` | Output a JSON formatted API object
`-o=jsonpath=<template>` | Print the fields defined in a [jsonpath](/docs/reference/kubectl/jsonpath) expression
`-o=jsonpath-file=<filename>` | Print the fields defined by the [jsonpath](/docs/reference/kubectl/jsonpath) expression in the `<filename>` file