Skip to content

Instantly share code, notes, and snippets.

@peteristhegreat
Created January 31, 2023 21:20
Show Gist options
  • Save peteristhegreat/b599cf991fe4a274be70d39bf072e53c to your computer and use it in GitHub Desktop.
Save peteristhegreat/b599cf991fe4a274be70d39bf072e53c to your computer and use it in GitHub Desktop.
kubectl k8s rancher-desktop wsl2 from ubuntu, "invalid configuration: no configuration has been provided"

Symptoms

kubectl
I0131 15:58:33.503088    3620 versioner.go:58] invalid configuration: no configuration has been provided
E0131 15:58:33.611994    3620 memcache.go:238] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
E0131 15:58:33.613258    3620 memcache.go:238] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
E0131 15:58:33.615923    3620 memcache.go:238] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
E0131 15:58:33.618294    3620 memcache.go:238] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
E0131 15:58:33.620878    3620 memcache.go:238] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused

Fix

export KUBECONFIG=/mnt/c/Users/<username>/.kube/config

Links

terraform-aws-modules/terraform-aws-eks#1234 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment