mirror of
https://github.com/rancher/k3k.git
synced 2026-08-19 04:16:16 +00:00
cli - fix bug with Kubeconfig value resolution
This commit is contained in:
+3
-1
@@ -2,6 +2,7 @@ package cmds
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/rancher/k3k/pkg/apis/k3k.io/v1alpha1"
|
||||
"github.com/rancher/k3k/pkg/buildinfo"
|
||||
@@ -28,7 +29,8 @@ var (
|
||||
EnvVars: []string{"KUBECONFIG"},
|
||||
Usage: "kubeconfig path",
|
||||
Destination: &Kubeconfig,
|
||||
Value: "$HOME/.kube/config",
|
||||
Value: os.Getenv("HOME") + "/.kube/config",
|
||||
DefaultText: "$HOME/.kube/config",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "namespace",
|
||||
|
||||
@@ -39,7 +39,7 @@ Create new cluster
|
||||
|
||||
**--cluster-cidr**="": cluster CIDR
|
||||
|
||||
**--kubeconfig**="": kubeconfig path (default: "$HOME/.kube/config")
|
||||
**--kubeconfig**="": kubeconfig path (default: $HOME/.kube/config)
|
||||
|
||||
**--kubeconfig-server**="": override the kubeconfig server host
|
||||
|
||||
@@ -67,7 +67,7 @@ Delete an existing cluster
|
||||
|
||||
>k3kcli cluster delete [command options] NAME
|
||||
|
||||
**--kubeconfig**="": kubeconfig path (default: "$HOME/.kube/config")
|
||||
**--kubeconfig**="": kubeconfig path (default: $HOME/.kube/config)
|
||||
|
||||
**--namespace**="": namespace to create the k3k cluster in
|
||||
|
||||
@@ -87,7 +87,7 @@ Generate kubeconfig for clusters
|
||||
|
||||
**--expiration-days**="": Expiration date of the certificates used for the kubeconfig (default: 356)
|
||||
|
||||
**--kubeconfig**="": kubeconfig path (default: "$HOME/.kube/config")
|
||||
**--kubeconfig**="": kubeconfig path (default: $HOME/.kube/config)
|
||||
|
||||
**--kubeconfig-server**="": override the kubeconfig server host
|
||||
|
||||
|
||||
Reference in New Issue
Block a user