kubectl 命令报错couldn't get current server API group list: ... connect: connection refused

kubenets在运行时,依赖环境变量。如果所有的服务都是正常的,只是kubectl命令报错,那就是环境变量没有设置导致。一般报错样例如下: memcache.go:265] couldn't get current server API group list: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connect: connection refused。The connection to the server localhost:8080 was refused - did you specify the right host or port?

Go 修改ENV代理GoProxy解决运行官方样例代码无法获得module的问题

按照官方向导的样例代码,运行rsc.io/quote的部分 no required module provides package rsc.io/quote; to add it:,出现了我发找到所需模块mudule的报错 ,从mod tidy输出也是报无法连接 A connection attempt failed because the connected party did not properly respond after a period of time。可以通过修改代理GoProxy来解决。