change kubeconfig loading order

This commit is contained in:
deads2k
2015-04-10 08:54:22 -04:00
parent b59266ad84
commit de4be5422c
50 changed files with 446 additions and 409 deletions

View File

@@ -84,15 +84,20 @@ If the contents of the kubernetes_auth file conflict with entries in .kubeconfig
## Loading and merging rules
The rules for loading and merging the .kubeconfig files are straightforward, but there are a lot of them. The final config is built in this order:
1. Merge together the kubeconfig itself. This is done with the following hierarchy and merge rules:
1. Get the kubeconfig from disk. This is done with the following hierarchy and merge rules:
If the CommandLineLocation (the value of the `kubeconfig` command line option) is set, use this file only. No merging. Only one instance of this flag is allowed.
Else, if EnvVarLocation (the value of $KUBECONFIG) is available, use it as a list of files that should be merged.
Merge files together based on the following rules.
Empty filenames are ignored. Files with non-deserializable content produced errors.
The first file to set a particular value or map key wins and the value or map key is never changed.
This means that the first file to set CurrentContext will have its context preserved. It also means that if two files specify a "red-user", only values from the first file's red-user are used. Even non-conflicting entries from the second file's "red-user" are discarded.
1. CommandLineLocation - the value of the `kubeconfig` command line option
1. EnvVarLocation - the value of $KUBECONFIG
1. CurrentDirectoryLocation - ``pwd``/.kubeconfig
1. HomeDirectoryLocation = ~/.kube/.kubeconfig
Otherwise, use HomeDirectoryLocation (~/.kube/config) with no merging.
1. Determine the context to use based on the first hit in this chain
1. command line argument - the value of the `context` command line option
1. current-context from the merged kubeconfig file

View File

@@ -66,4 +66,4 @@ kubectl
* [kubectl update](kubectl_update.md) - Update a resource by filename or stdin.
* [kubectl version](kubectl_version.md) - Print the client and server version information.
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.641789142 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.392549632 +0000 UTC

View File

@@ -50,4 +50,4 @@ kubectl api-versions
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.641051929 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.39227534 +0000 UTC

View File

@@ -50,4 +50,4 @@ kubectl cluster-info
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.640723377 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.392162759 +0000 UTC

View File

@@ -7,6 +7,12 @@ config modifies kubeconfig files
config modifies kubeconfig files using subcommands like "kubectl config set current-context my-context"
The loading order follows these rules:
1. If the --kubeconfig flag is set, then only that file is loaded. The flag may only be set once and no merging takes place.
2. If $KUBECONFIG environment variable is set, then it is used a list of paths (normal path delimitting rules for your system). These paths are merged together. When a value is modified, it is modified in the file that defines the stanza. When a value is created, it is created in the first file that exists. If no files in the chain exist, then it creates the last file in the list.
3. Otherwise, ${HOME}/.kube/config is used and no merging takes place.
```
kubectl config SUBCOMMAND
```
@@ -14,11 +20,8 @@ kubectl config SUBCOMMAND
### Options
```
--envvar=false: use the kubeconfig from $KUBECONFIG
--global=false: use the kubeconfig from /home/username/.kube/.kubeconfig
-h, --help=false: help for config
--kubeconfig="": use a particular kubeconfig file
--local=false: use the kubeconfig in the current directory
```
### Options inherrited from parent commands
@@ -60,4 +63,4 @@ kubectl config SUBCOMMAND
* [kubectl config use-context](kubectl_config_use-context.md) - Sets the current-context in a kubeconfig file
* [kubectl config view](kubectl_config_view.md) - displays Merged kubeconfig settings or a specified kubeconfig file.
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.640323684 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.392043616 +0000 UTC

View File

@@ -45,10 +45,7 @@ $ kubectl config set-cluster e2e --insecure-skip-tls-verify=true
--client-key="": Path to a client key file for TLS.
--cluster="": The name of the kubeconfig cluster to use
--context="": The name of the kubeconfig context to use
--envvar=false: use the kubeconfig from $KUBECONFIG
--global=false: use the kubeconfig from /home/username/.kube/.kubeconfig
--kubeconfig="": use a particular kubeconfig file
--local=false: use the kubeconfig in the current directory
--log_backtrace_at=:0: when logging hits line file:N, emit a stack trace
--log_dir=: If non-empty, write log files in this directory
--log_flush_frequency=5s: Maximum number of seconds between log flushes
@@ -68,4 +65,4 @@ $ kubectl config set-cluster e2e --insecure-skip-tls-verify=true
### SEE ALSO
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.637680508 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.39119629 +0000 UTC

View File

@@ -38,11 +38,8 @@ $ kubectl config set-context gce --user=cluster-admin
--client-certificate="": Path to a client key file for TLS.
--client-key="": Path to a client key file for TLS.
--context="": The name of the kubeconfig context to use
--envvar=false: use the kubeconfig from $KUBECONFIG
--global=false: use the kubeconfig from /home/username/.kube/.kubeconfig
--insecure-skip-tls-verify=false: If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
--kubeconfig="": use a particular kubeconfig file
--local=false: use the kubeconfig in the current directory
--log_backtrace_at=:0: when logging hits line file:N, emit a stack trace
--log_dir=: If non-empty, write log files in this directory
--log_flush_frequency=5s: Maximum number of seconds between log flushes
@@ -61,4 +58,4 @@ $ kubectl config set-context gce --user=cluster-admin
### SEE ALSO
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.638371771 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.391488399 +0000 UTC

View File

@@ -59,11 +59,8 @@ $ kubectl set-credentials cluster-admin --client-certificate=~/.kube/admin.crt -
--certificate-authority="": Path to a cert. file for the certificate authority.
--cluster="": The name of the kubeconfig cluster to use
--context="": The name of the kubeconfig context to use
--envvar=false: use the kubeconfig from $KUBECONFIG
--global=false: use the kubeconfig from /home/username/.kube/.kubeconfig
--insecure-skip-tls-verify=false: If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
--kubeconfig="": use a particular kubeconfig file
--local=false: use the kubeconfig in the current directory
--log_backtrace_at=:0: when logging hits line file:N, emit a stack trace
--log_dir=: If non-empty, write log files in this directory
--log_flush_frequency=5s: Maximum number of seconds between log flushes
@@ -81,4 +78,4 @@ $ kubectl set-credentials cluster-admin --client-certificate=~/.kube/admin.crt -
### SEE ALSO
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.638019407 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.391323192 +0000 UTC

View File

@@ -30,11 +30,8 @@ kubectl config set PROPERTY_NAME PROPERTY_VALUE
--client-key="": Path to a client key file for TLS.
--cluster="": The name of the kubeconfig cluster to use
--context="": The name of the kubeconfig context to use
--envvar=false: use the kubeconfig from $KUBECONFIG
--global=false: use the kubeconfig from /home/username/.kube/.kubeconfig
--insecure-skip-tls-verify=false: If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
--kubeconfig="": use a particular kubeconfig file
--local=false: use the kubeconfig in the current directory
--log_backtrace_at=:0: when logging hits line file:N, emit a stack trace
--log_dir=: If non-empty, write log files in this directory
--log_flush_frequency=5s: Maximum number of seconds between log flushes
@@ -55,4 +52,4 @@ kubectl config set PROPERTY_NAME PROPERTY_VALUE
### SEE ALSO
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.638724317 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.391618859 +0000 UTC

View File

@@ -29,11 +29,8 @@ kubectl config unset PROPERTY_NAME
--client-key="": Path to a client key file for TLS.
--cluster="": The name of the kubeconfig cluster to use
--context="": The name of the kubeconfig context to use
--envvar=false: use the kubeconfig from $KUBECONFIG
--global=false: use the kubeconfig from /home/username/.kube/.kubeconfig
--insecure-skip-tls-verify=false: If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
--kubeconfig="": use a particular kubeconfig file
--local=false: use the kubeconfig in the current directory
--log_backtrace_at=:0: when logging hits line file:N, emit a stack trace
--log_dir=: If non-empty, write log files in this directory
--log_flush_frequency=5s: Maximum number of seconds between log flushes
@@ -54,4 +51,4 @@ kubectl config unset PROPERTY_NAME
### SEE ALSO
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.639325332 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.391735806 +0000 UTC

View File

@@ -28,11 +28,8 @@ kubectl config use-context CONTEXT_NAME
--client-key="": Path to a client key file for TLS.
--cluster="": The name of the kubeconfig cluster to use
--context="": The name of the kubeconfig context to use
--envvar=false: use the kubeconfig from $KUBECONFIG
--global=false: use the kubeconfig from /home/username/.kube/.kubeconfig
--insecure-skip-tls-verify=false: If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
--kubeconfig="": use a particular kubeconfig file
--local=false: use the kubeconfig in the current directory
--log_backtrace_at=:0: when logging hits line file:N, emit a stack trace
--log_dir=: If non-empty, write log files in this directory
--log_flush_frequency=5s: Maximum number of seconds between log flushes
@@ -53,4 +50,4 @@ kubectl config use-context CONTEXT_NAME
### SEE ALSO
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.639859272 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.391848246 +0000 UTC

View File

@@ -50,11 +50,8 @@ $ kubectl config view -o template --template='{{range .users}}{{ if eq .name "e2
--client-key="": Path to a client key file for TLS.
--cluster="": The name of the kubeconfig cluster to use
--context="": The name of the kubeconfig context to use
--envvar=false: use the kubeconfig from $KUBECONFIG
--global=false: use the kubeconfig from /home/username/.kube/.kubeconfig
--insecure-skip-tls-verify=false: If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
--kubeconfig="": use a particular kubeconfig file
--local=false: use the kubeconfig in the current directory
--log_backtrace_at=:0: when logging hits line file:N, emit a stack trace
--log_dir=: If non-empty, write log files in this directory
--log_flush_frequency=5s: Maximum number of seconds between log flushes
@@ -75,4 +72,4 @@ $ kubectl config view -o template --template='{{range .users}}{{ if eq .name "e2
### SEE ALSO
* [kubectl config](kubectl_config.md) - config modifies kubeconfig files
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.637312729 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.391073075 +0000 UTC

View File

@@ -63,4 +63,4 @@ $ cat pod.json | kubectl create -f -
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.629142674 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.388588064 +0000 UTC

View File

@@ -81,4 +81,4 @@ $ kubectl delete pods --all
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.630884641 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.389412973 +0000 UTC

View File

@@ -53,4 +53,4 @@ kubectl describe RESOURCE ID
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.628735136 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.388410556 +0000 UTC

View File

@@ -64,4 +64,4 @@ $ kubectl exec -p 123456-7890 -c ruby-container -i -t -- bash -il
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.632991694 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.390127525 +0000 UTC

View File

@@ -82,4 +82,4 @@ $ kubectl expose streamer --port=4100 --protocol=udp --service-name=video-stream
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.636399596 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.390792874 +0000 UTC

View File

@@ -85,4 +85,4 @@ $ kubectl get rc/web service/frontend pods/web-pod-13je7
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.620151758 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.387483074 +0000 UTC

View File

@@ -81,4 +81,4 @@ $ kubectl label pods foo bar-
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.636842283 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.390937166 +0000 UTC

View File

@@ -62,4 +62,4 @@ $ kubectl log -f 123456-7890 ruby-container
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.631637812 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.389728881 +0000 UTC

View File

@@ -53,4 +53,4 @@ kubectl namespace [namespace]
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.63128386 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.389609191 +0000 UTC

View File

@@ -68,4 +68,4 @@ $ kubectl port-forward -p mypod 0:5000
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.633423694 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.390241417 +0000 UTC

View File

@@ -65,4 +65,4 @@ $ kubectl proxy --api-prefix=k8s-api
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.633829265 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.390360738 +0000 UTC

View File

@@ -68,4 +68,4 @@ $ kubectl resize --current-replicas=2 --replicas=3 replicationcontrollers foo
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.632560634 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.389989377 +0000 UTC

View File

@@ -68,4 +68,4 @@ $ cat frontend-v2.json | kubectl rolling-update frontend-v1 -f -
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.632023561 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.38985117 +0000 UTC

View File

@@ -78,4 +78,4 @@ $ kubectl run-container nginx --image=dockerfile/nginx --overrides='{ "apiVersio
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.634391744 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.390501802 +0000 UTC

View File

@@ -72,4 +72,4 @@ $ kubectl stop -f path/to/resources
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.635920945 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.390631789 +0000 UTC

View File

@@ -67,4 +67,4 @@ $ kubectl update pods my-pod --patch='{ "apiVersion": "v1beta1", "desiredState":
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.630218109 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.388743178 +0000 UTC

View File

@@ -51,4 +51,4 @@ kubectl version
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-04-14 19:53:16.641381587 +0000 UTC
###### Auto generated by spf13/cobra at 2015-04-16 17:04:37.392395408 +0000 UTC

View File

@@ -68,22 +68,10 @@ Specifying a name that already exists will merge new fields on top of existing v
\fB\-\-context\fP=""
The name of the kubeconfig context to use
.PP
\fB\-\-envvar\fP=false
use the kubeconfig from $KUBECONFIG
.PP
\fB\-\-global\fP=false
use the kubeconfig from /home/username/.kube/.kubeconfig
.PP
\fB\-\-kubeconfig\fP=""
use a particular kubeconfig file
.PP
\fB\-\-local\fP=false
use the kubeconfig in the current directory
.PP
\fB\-\-log\_backtrace\_at\fP=:0
when logging hits line file:N, emit a stack trace

View File

@@ -64,14 +64,6 @@ Specifying a name that already exists will merge new fields on top of existing v
\fB\-\-context\fP=""
The name of the kubeconfig context to use
.PP
\fB\-\-envvar\fP=false
use the kubeconfig from $KUBECONFIG
.PP
\fB\-\-global\fP=false
use the kubeconfig from /home/username/.kube/.kubeconfig
.PP
\fB\-\-insecure\-skip\-tls\-verify\fP=false
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
@@ -80,10 +72,6 @@ Specifying a name that already exists will merge new fields on top of existing v
\fB\-\-kubeconfig\fP=""
use a particular kubeconfig file
.PP
\fB\-\-local\fP=false
use the kubeconfig in the current directory
.PP
\fB\-\-log\_backtrace\_at\fP=:0
when logging hits line file:N, emit a stack trace

View File

@@ -87,14 +87,6 @@ Bearer token and basic auth are mutually exclusive.
\fB\-\-context\fP=""
The name of the kubeconfig context to use
.PP
\fB\-\-envvar\fP=false
use the kubeconfig from $KUBECONFIG
.PP
\fB\-\-global\fP=false
use the kubeconfig from /home/username/.kube/.kubeconfig
.PP
\fB\-\-insecure\-skip\-tls\-verify\fP=false
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
@@ -103,10 +95,6 @@ Bearer token and basic auth are mutually exclusive.
\fB\-\-kubeconfig\fP=""
use a particular kubeconfig file
.PP
\fB\-\-local\fP=false
use the kubeconfig in the current directory
.PP
\fB\-\-log\_backtrace\_at\fP=:0
when logging hits line file:N, emit a stack trace

View File

@@ -57,14 +57,6 @@ PROPERTY\_VALUE is the new value you wish to set.
\fB\-\-context\fP=""
The name of the kubeconfig context to use
.PP
\fB\-\-envvar\fP=false
use the kubeconfig from $KUBECONFIG
.PP
\fB\-\-global\fP=false
use the kubeconfig from /home/username/.kube/.kubeconfig
.PP
\fB\-\-insecure\-skip\-tls\-verify\fP=false
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
@@ -73,10 +65,6 @@ PROPERTY\_VALUE is the new value you wish to set.
\fB\-\-kubeconfig\fP=""
use a particular kubeconfig file
.PP
\fB\-\-local\fP=false
use the kubeconfig in the current directory
.PP
\fB\-\-log\_backtrace\_at\fP=:0
when logging hits line file:N, emit a stack trace

View File

@@ -56,14 +56,6 @@ PROPERTY\_NAME is a dot delimited name where each token represents either a attr
\fB\-\-context\fP=""
The name of the kubeconfig context to use
.PP
\fB\-\-envvar\fP=false
use the kubeconfig from $KUBECONFIG
.PP
\fB\-\-global\fP=false
use the kubeconfig from /home/username/.kube/.kubeconfig
.PP
\fB\-\-insecure\-skip\-tls\-verify\fP=false
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
@@ -72,10 +64,6 @@ PROPERTY\_NAME is a dot delimited name where each token represents either a attr
\fB\-\-kubeconfig\fP=""
use a particular kubeconfig file
.PP
\fB\-\-local\fP=false
use the kubeconfig in the current directory
.PP
\fB\-\-log\_backtrace\_at\fP=:0
when logging hits line file:N, emit a stack trace

View File

@@ -55,14 +55,6 @@ Sets the current\-context in a kubeconfig file
\fB\-\-context\fP=""
The name of the kubeconfig context to use
.PP
\fB\-\-envvar\fP=false
use the kubeconfig from $KUBECONFIG
.PP
\fB\-\-global\fP=false
use the kubeconfig from /home/username/.kube/.kubeconfig
.PP
\fB\-\-insecure\-skip\-tls\-verify\fP=false
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
@@ -71,10 +63,6 @@ Sets the current\-context in a kubeconfig file
\fB\-\-kubeconfig\fP=""
use a particular kubeconfig file
.PP
\fB\-\-local\fP=false
use the kubeconfig in the current directory
.PP
\fB\-\-log\_backtrace\_at\fP=:0
when logging hits line file:N, emit a stack trace

View File

@@ -87,14 +87,6 @@ You can use \-\-output=template \-\-template=TEMPLATE to extract specific values
\fB\-\-context\fP=""
The name of the kubeconfig context to use
.PP
\fB\-\-envvar\fP=false
use the kubeconfig from $KUBECONFIG
.PP
\fB\-\-global\fP=false
use the kubeconfig from /home/username/.kube/.kubeconfig
.PP
\fB\-\-insecure\-skip\-tls\-verify\fP=false
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.
@@ -103,10 +95,6 @@ You can use \-\-output=template \-\-template=TEMPLATE to extract specific values
\fB\-\-kubeconfig\fP=""
use a particular kubeconfig file
.PP
\fB\-\-local\fP=false
use the kubeconfig in the current directory
.PP
\fB\-\-log\_backtrace\_at\fP=:0
when logging hits line file:N, emit a stack trace

View File

@@ -15,16 +15,14 @@ kubectl config \- config modifies kubeconfig files
.PP
config modifies kubeconfig files using subcommands like "kubectl config set current\-context my\-context"
.PP
The loading order follows these rules:
1. If the \-\-kubeconfig flag is set, then only that file is loaded. The flag may only be set once and no merging takes place.
2. If $KUBECONFIG environment variable is set, then it is used a list of paths (normal path delimitting rules for your system). These paths are merged together. When a value is modified, it is modified in the file that defines the stanza. When a value is created, it is created in the first file that exists. If no files in the chain exist, then it creates the last file in the list.
3. Otherwise, $\{HOME\}/.kube/config is used and no merging takes place.
.SH OPTIONS
.PP
\fB\-\-envvar\fP=false
use the kubeconfig from $KUBECONFIG
.PP
\fB\-\-global\fP=false
use the kubeconfig from /home/username/.kube/.kubeconfig
.PP
\fB\-h\fP, \fB\-\-help\fP=false
help for config
@@ -33,10 +31,6 @@ config modifies kubeconfig files using subcommands like "kubectl config set curr
\fB\-\-kubeconfig\fP=""
use a particular kubeconfig file
.PP
\fB\-\-local\fP=false
use the kubeconfig in the current directory
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP