Example: use WSL with the
/.kube/config
file located in the Windows user's home directory
-
Update the
KUBE
variable in Taskfile.yml to match your path, if necessarythe special var {{.USER}} will return the current user's name
env: CLUSTER_NAME: kubepal KUBE: export KUBECONFIG=/mnt/c/Users/{{.USER}}/.kube/config
-
Update the backend.tf to match the path of your
/.kube/config
file:Warning: Variables, locals, and functions may not be used here.
terraform { backend "kubernetes" { secret_suffix = "state" config_paths = [ "/mnt/c/Users/devops/.kube/config", # WSL path "c:\\Users\\devops\\.kube\\config" # PowerShell path ] } }