mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-07 04:03:20 +00:00
change kubeconfig loading order
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user