You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kubeconfigCmd.Flags().DurationP("expiration", "", 8*time.Hour, "kubeconfig will expire after given time")
75
-
kubeconfigCmd.Flags().Bool("merge", true, "merges the kubeconfig into default kubeconfig instead of printing it to the console")
75
+
kubeconfigCmd.Flags().Bool("merge", true, "merges the kubeconfig into the current kubeconfig")
76
+
kubeconfigCmd.Flags().Bool("print-only", false, "only prints the kubeconfig to the console instead of writing it")
77
+
kubeconfigCmd.Flags().String("auth-type", string(kubernetes.AuthTypeExec), `the way how the resulting kubeconfig authenticates at the api server. can be "exec" or "certs".
78
+
"exec" injects an exec config into the kubeconfig, which uses this CLI to automatically renew certificates when they expire.
79
+
"certs" simply adds the client certificates to the kubeconfig, there is no automatic renewal once the certificates have expired, the CLI is not called automatically.`)
76
80
kubeconfigCmd.Flags().String("kubeconfig", "", "specify an explicit path for the merged kubeconfig to be written, defaults to default kubeconfig paths if not provided")
kubeconfigCmd.Flags().StringP("project", "p", "", "the project in which the cluster resides for which to get the kubeconfig for")
118
118
kubeconfigCmd.Flags().DurationP("expiration", "", 8*time.Hour, "kubeconfig will expire after given time")
119
-
kubeconfigCmd.Flags().Bool("merge", true, "merges the kubeconfig into default kubeconfig instead of printing it to the console")
119
+
kubeconfigCmd.Flags().Bool("merge", true, "merges the kubeconfig into the current kubeconfig")
120
+
kubeconfigCmd.Flags().Bool("print-only", false, "only prints the kubeconfig to the console instead of writing it")
121
+
kubeconfigCmd.Flags().String("auth-type", string(kubernetes.AuthTypeExec), `the way how the resulting kubeconfig authenticates at the api server. can be "exec" or "certs".
122
+
"exec" injects an exec config into the kubeconfig, which uses this CLI to automatically renew certificates when they expire.
123
+
"certs" simply adds the client certificates to the kubeconfig, there is no automatic renewal once the certificates have expired, the CLI is not called automatically.`)
120
124
kubeconfigCmd.Flags().String("kubeconfig", "", "specify an explicit path for the merged kubeconfig to be written, defaults to default kubeconfig paths if not provided")
APIVersion: "client.authentication.k8s.io/v1", // since k8s 1.22, if earlier versions are used, the API version is client.authentication.k8s.io/v1beta1
APIVersion: "client.authentication.k8s.io/v1", // since k8s 1.22, if earlier versions are used, the API version is client.authentication.k8s.io/v1beta1
Copy file name to clipboardExpand all lines: docs/metal_cluster_kubeconfig.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,10 +9,14 @@ metal cluster kubeconfig [flags]
9
9
### Options
10
10
11
11
```
12
+
--auth-type string the way how the resulting kubeconfig authenticates at the api server. can be "exec" or "certs".
13
+
"exec" injects an exec config into the kubeconfig, which uses this CLI to automatically renew certificates when they expire.
14
+
"certs" simply adds the client certificates to the kubeconfig, there is no automatic renewal once the certificates have expired, the CLI is not called automatically. (default "exec")
12
15
--expiration duration kubeconfig will expire after given time (default 8h0m0s)
13
16
-h, --help help for kubeconfig
14
17
--kubeconfig string specify an explicit path for the merged kubeconfig to be written, defaults to default kubeconfig paths if not provided
15
-
--merge merges the kubeconfig into default kubeconfig instead of printing it to the console (default true)
18
+
--merge merges the kubeconfig into the current kubeconfig (default true)
19
+
--print-only only prints the kubeconfig to the console instead of writing it
16
20
-p, --project string the project in which the cluster resides for which to get the kubeconfig for
0 commit comments