Difference between revisions of "Kubectl config view --help"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
{{lc}}
 
{{lc}}
 +
 +
[[kubectl config view]] --help
 
<pre>
 
<pre>
 
Display merged kubeconfig settings or a specified kubeconfig file.
 
Display merged kubeconfig settings or a specified kubeconfig file.
Line 53: Line 55:
 
* {{kubectl config}}
 
* {{kubectl config}}
 
* {{kubectl info}}
 
* {{kubectl info}}
* {{kubectl}}
 
  
 
[[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]

Advertising: