Skip to content

Commit e6987bd

Browse files
authored
Merge pull request #41049 from able8/add-go-template-to-kubectl-output-format
Add the go-template output format in "kubectl Cheat Sheet" page
2 parents 2f077ab + b3c81f2 commit e6987bd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

content/en/docs/reference/kubectl/cheatsheet.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,8 @@ Output format | Description
431431
--------------| -----------
432432
`-o=custom-columns=<spec>` | Print a table using a comma separated list of custom columns
433433
`-o=custom-columns-file=<filename>` | Print a table using the custom columns template in the `<filename>` file
434+
`-o=go-template=<template>` | Print the fields defined in a [golang template](https://pkg.go.dev/text/template)
435+
`-o=go-template-file=<filename>` | Print the fields defined by the [golang template](https://pkg.go.dev/text/template) in the `<filename>` file
434436
`-o=json` | Output a JSON formatted API object
435437
`-o=jsonpath=<template>` | Print the fields defined in a [jsonpath](/docs/reference/kubectl/jsonpath) expression
436438
`-o=jsonpath-file=<filename>` | Print the fields defined by the [jsonpath](/docs/reference/kubectl/jsonpath) expression in the `<filename>` file

0 commit comments

Comments
 (0)