Difference between revisions of "Kubectl config view --help"
Jump to navigation
Jump to search
(Created page with "{{lc}} == See also == * {{kubectl config}} * {{kubectl info}} * {{kubectl}} Category:Kubernetes") Tags: Mobile web edit, Mobile edit |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{lc}} | {{lc}} | ||
+ | |||
+ | [[kubectl config view]] --help | ||
+ | <pre> | ||
+ | Display merged kubeconfig settings or a specified kubeconfig file. | ||
+ | |||
+ | You can use --output jsonpath={...} to extract specific values using a jsonpath expression. | ||
+ | |||
+ | Examples: | ||
+ | # Show merged kubeconfig settings | ||
+ | kubectl config view | ||
+ | |||
+ | # Show merged kubeconfig settings and raw certificate data | ||
+ | kubectl config view --raw | ||
+ | |||
+ | # Get the password for the e2e user | ||
+ | kubectl config view -o jsonpath='{.users[?(@.name == "e2e")].user.password}' | ||
+ | |||
+ | Options: | ||
+ | --allow-missing-template-keys=true: | ||
+ | If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to | ||
+ | golang and jsonpath output formats. | ||
+ | |||
+ | --flatten=false: | ||
+ | Flatten the resulting kubeconfig file into self-contained output (useful for creating portable kubeconfig | ||
+ | files) | ||
+ | |||
+ | --merge=true: | ||
+ | Merge the full hierarchy of kubeconfig files | ||
+ | |||
+ | --minify=false: | ||
+ | Remove all information not used by current-context from the output | ||
+ | |||
+ | -o, --output='yaml': | ||
+ | Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, | ||
+ | jsonpath-as-json, jsonpath-file). | ||
+ | |||
+ | --raw=false: | ||
+ | Display raw byte data | ||
+ | |||
+ | --show-managed-fields=false: | ||
+ | If true, keep the managedFields when printing objects in JSON or YAML format. | ||
+ | |||
+ | --template='': | ||
+ | Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format | ||
+ | is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. | ||
+ | |||
+ | Usage: | ||
+ | kubectl config view [flags] [options] | ||
+ | |||
+ | Use "kubectl options" for a list of global command-line options (applies to all commands). | ||
+ | </pre> | ||
== See also == | == See also == | ||
* {{kubectl config}} | * {{kubectl config}} | ||
* {{kubectl info}} | * {{kubectl info}} | ||
− | |||
[[Category:Kubernetes]] | [[Category:Kubernetes]] |
Latest revision as of 11:36, 4 July 2022
kubectl config view --help
Display merged kubeconfig settings or a specified kubeconfig file. You can use --output jsonpath={...} to extract specific values using a jsonpath expression. Examples: # Show merged kubeconfig settings kubectl config view # Show merged kubeconfig settings and raw certificate data kubectl config view --raw # Get the password for the e2e user kubectl config view -o jsonpath='{.users[?(@.name == "e2e")].user.password}' Options: --allow-missing-template-keys=true: If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. --flatten=false: Flatten the resulting kubeconfig file into self-contained output (useful for creating portable kubeconfig files) --merge=true: Merge the full hierarchy of kubeconfig files --minify=false: Remove all information not used by current-context from the output -o, --output='yaml': Output format. One of: (json, yaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file). --raw=false: Display raw byte data --show-managed-fields=false: If true, keep the managedFields when printing objects in JSON or YAML format. --template='': Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview]. Usage: kubectl config view [flags] [options] Use "kubectl options" for a list of global command-line options (applies to all commands).
See also[edit]
kubectl config
[view | get-contexts | current-context | get-clusters | set-context | set-credentials ], ~/.kube/config, kubectl config --help
,kubectx
, Kubernetes contexts,KUBECONFIG, kubectl --kubeconfig
- Kubectl information commands:
cluster-info
|view
|pods
|nodes
|services
|version
|describe | logs
Advertising: