Miniku可能无法在Windows 8中工作
我是库伯内特斯的新手。在Kubernetes文档的帮助下,我在我的Windows机器上安装了Miniku可能无法在Windows 8中工作,windows,kubernetes,virtualbox,kubectl,minikube,Windows,Kubernetes,Virtualbox,Kubectl,Minikube,我是库伯内特斯的新手。在Kubernetes文档的帮助下,我在我的Windows机器上安装了minikube(v0.24.1)和kubectl。我的机器上也安装了VirtualBox(版本5.1.18) 在启动minikube之前,我已经在Windows命令提示符下执行了设置HTTP_PROXY=xx.xx.xx:8080和设置NO_PROXY=localhost,127.0.0.0/8192.0.0.0.0/8 通过传递代理详细信息启动minikube: C:\minikube>mini
minikube
(v0.24.1)和kubectl
。我的机器上也安装了VirtualBox(版本5.1.18)
在启动minikube
之前,我已经在Windows命令提示符下执行了设置HTTP_PROXY=xx.xx.xx:8080
和设置NO_PROXY=localhost,127.0.0.0/8192.0.0.0.0/8
通过传递代理详细信息启动minikube
:
C:\minikube>minikube start --memory 4096 --vm-driver=virtualbox --docker-env http_proxy=xx.xx.xx:8080 --docker-env https_proxy=xx.xx.xx:8080 --docker-env no_proxy=localhost,127.0.0.0/8,192.0.0.0/8 --cache-images=false
Starting local Kubernetes v1.9.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
Kubectl is now configured to use the cluster.
Loading cached images from config file.
来自Kubectl的错误:
C:\minikube>kubectl version
Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.0", GitCommit:"925c127ec6b946659ad0fd596fa959be43f0cc05", GitTreeState:"clean", BuildDate:"2017-12-15T21:07:38Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"windows/amd64"}
Unable to connect to the server: dial tcp 192.168.99.100:8443: connectex: An attempt was made to access a socket in a way forbidden by its access permissions.
Minikube日志:
Feb 01 08:48:35 minikube localkube[2941]: E0201 08:48:35.223594 2941 proxier.go:1701] Failed to delete stale service IP 10.96.0.10 connections, error: error deleting connection tracking
file not found in $PATH
Feb 01 08:48:38 minikube localkube[2941]: I0201 08:48:38.738404 2941 node_controller.go:857] Controller detected that some Nodes are Ready. Exiting master disruption mode.
Feb 01 08:48:45 minikube localkube[2941]: W0201 08:48:45.765543 2941 conversion.go:110] Could not get instant cpu stats: different number of cpus
Feb 01 08:48:55 minikube localkube[2941]: W0201 08:48:55.776172 2941 conversion.go:110] Could not get instant cpu stats: different number of cpus
Feb 01 08:49:24 minikube localkube[2941]: E0201 08:49:24.338731 2941 healthcheck.go:317] Failed to start node healthz on 0: listen tcp: address 0: missing port in address
Feb 01 08:50:24 minikube localkube[2941]: E0201 08:50:24.341890 2941 healthcheck.go:317] Failed to start node healthz on 0: listen tcp: address 0: missing port in address
Feb 01 08:51:24 minikube localkube[2941]: E0201 08:51:24.342845 2941 healthcheck.go:317] Failed to start node healthz on 0: listen tcp: address 0: missing port in address
Feb 01 08:52:24 minikube localkube[2941]: E0201 08:52:24.344497 2941 healthcheck.go:317] Failed to start node healthz on 0: listen tcp: address 0: missing port in address
Feb 01 08:53:24 minikube localkube[2941]: E0201 08:53:24.349095 2941 healthcheck.go:317] Failed to start node healthz on 0: listen tcp: address 0: missing port in address
Feb 01 08:54:24 minikube localkube[2941]: E0201 08:54:24.351143 2941 healthcheck.go:317] Failed to start node healthz on 0: listen tcp: address 0: missing port in address
如何解决这个问题?正如@ivthillo已经指出的,这个问题可能是因为您在代理后面。在此链接中,他们解释了当您使用代理时配置minikube的解决方案: 试着像这样启动minikube:
minikube start --docker-env HTTP_PROXY=http://$YOURPROXY:PORT \ --docker-env HTTPS_PROXY=https://$YOURPROXY:PORT
这将配置docker以使用您的代理
在这里,他们还提出了其他解决方案:您是否支持代理?是的。我的windows计算机在代理之后。如果说“在代理之后”,您的意思是,在安装Kubernetes和minikube之前,您已经有了
HTTP(S)\u proxy
环境变量,然后,您可以考虑设置<代码> No.Posivs/Cux>环境变量,以便在访问MyKube IPs时不使用代理。我已通过以下命令启动MixKube。http://xx.xx.xx:8080 \--docker env https\u代理=http://xx.xx.xx:8080 --码头环境无代理=192.168.99.0/24。但是没有运气:(当我在命令提示符下执行set NO_PROXY=192.168.0.0/16
并启动minikube时,我收到错误消息无法连接到服务器:拨打tcp 192.168.99.102:8443:connectex:试图以访问权限所禁止的方式访问套接字。
当我试图执行kubectl get pod
时>我已经启动了上面评论中给出的minikube。当我执行kubectl get pod
命令时,收到一条错误消息,即无法连接到服务器:net/http:TLS握手超时
您可以执行minikube ssh并尝试curl google.com吗?例如,当我登录到minikube服务器时,它似乎缺少CA权限使用minikube ssh
并执行curl google.com
,得到的响应为curl:(7)无法连接到google.com端口80:连接超时
。如何在minikube ssh内设置代理再次超时,就好像代理未生效一样。您是否可以执行env以确认变量已设置(在minikube机器内)minikube机器内部的env
命令的输出:SSH_CONNECTION=10.0.2.2 52799 10.0.2.15 22 EDITOR=/bin/vi USER=docker PAGER=/bin/more PWD=/home/docker home=/home/docker SSH_CLIENT=10.0.2.2.2 52799 22 SSH_TTY=/dev/pts/0 MAIL=/var/MAIL/docker TERM=xterm=/bin/bash SHLVL=1 LOGNAME=docker路径=/bin:/sbir:/usr/sbin=/PS1_=/bin/env