У меня следующая ошибка в Windows10 после установки kubectl
через choco install kubernetes-cli
:
PowerShell
PS C:\Users\userA> kubectl version
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.11", GitCommit:"637c7e288581ee40ab4ca210618a89a555b6e7e9", GitTreeState:"clean", BuildDate:"2018-11-26T14:38:32Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"windows/amd64"}
Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
Cmd
C:\Users\userA>kubectl version
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.11", GitCommit:"637c7e288581ee40ab4ca210618a89a555b6e7e9", GitTreeState:"clean", BuildDate:"2018-11-26T14:38:32Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"windows/amd64"}
Unable to connect to the server: dial tcp [::1]:8080: connectex: No connection could be made because the target machine actively refused it.
Iсоздали папку .kube
(C:\Users\userA\.kube
) и внутри нее пустой config
файл
Я установил переменную среды Windows:
Variable_name
: KUBECONFIG
value
:C:\Users\userA\.kube\config
РЕДАКТИРОВАТЬ: Я проверил это с running
мини-куб: