问题
Trying to run kubefwd with microk8s
:
sudo kubefwd svc
It fails with an error:
Runtime error: pkg/mod/k8s.io/client-go@v0.0.0-20191108070106-f8f007fd456c/tools/cache/reflector.go:108:
Failed to list *v1.Service: Get "http://localhost:8080/api/v1/namespaces/default/services?
limit=500&resourceVersion=0": dial tcp 127.0.0.1:8080: connect: connection refused
回答1:
kubefwd
does not use kubectl
, only the configuration files, so ask microk8s
to write its config as its README.md says:
sudo microk8s.kubectl config view --raw > $HOME/.kube/config
After this step kubefwd
should work.
来源:https://stackoverflow.com/questions/60828007/kubefwd-with-microk8s-127-0-0-18080-connect-connection-refused