Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubernetes始终处于Starting状态 #116

Open
fawdlstty opened this issue Nov 4, 2020 · 17 comments
Open

Kubernetes始终处于Starting状态 #116

fawdlstty opened this issue Nov 4, 2020 · 17 comments

Comments

@fawdlstty
Copy link

win10 2004 (19041.610)
docker desktop版本2.5.0.0 (49427) stable
kubernetes版本1.19.3
已按步骤下载好了镜像,但Kubernetes始终处于Starting状态,另外参考了这两个issue,问题依旧没解决。
service.txt日志:

[20:22:56.153][LoggingMessageHandler][Info   ] [473a6efc] <Server start> GET http://localhost/version
[20:22:56.154][LoggingMessageHandler][Info   ] [473a6efc] <Server end> GET http://localhost/version -> 200 OK (took 0ms)
[20:22:56.171][LoggingMessageHandler][Info   ] [ac8ce09d] <Server start> GET http://localhost/hyperv/vhdx-size?path=C:%5CProgramData%5CDockerDesktop%5Cvm-data%5CDockerDesktop.vhdx
[20:22:56.171][LoggingMessageHandler][Info   ] [ac8ce09d] <Server end> GET http://localhost/hyperv/vhdx-size?path=C:%5CProgramData%5CDockerDesktop%5Cvm-data%5CDockerDesktop.vhdx -> 200 OK (took 0ms)
[20:22:56.184][LoggingMessageHandler][Info   ] [157a6e63] <Server start> POST http://localhost/migrate/app
[20:22:56.184][LoggingMessageHandler][Info   ] [157a6e63] <Server end> POST http://localhost/migrate/app -> 204 NoContent (took 0ms)
[20:22:56.236][LoggingMessageHandler][Info   ] [47645eb5] <Server start> POST http://localhost/versionpack/enable
[20:22:56.240][LoggingMessageHandler][Info   ] [47645eb5] <Server end> POST http://localhost/versionpack/enable -> 204 NoContent (took 4ms)
[20:22:56.250][LoggingMessageHandler][Info   ] [dee0a8bb] <Server start> POST http://localhost/cloudcli/toggle
[20:22:56.284][LoggingMessageHandler][Info   ] [dee0a8bb] <Server end> POST http://localhost/cloudcli/toggle -> 204 NoContent (took 34ms)
[20:22:56.322][LoggingMessageHandler][Info   ] [6ec8bddc] <Server start> POST http://localhost/dns/refresh-hosts
[20:22:56.397][LoggingMessageHandler][Info   ] [6ec8bddc] <Server end> POST http://localhost/dns/refresh-hosts -> 204 NoContent (took 75ms)
@zhusaidong
Copy link
Contributor

zhusaidong commented Nov 5, 2020

把images.properties里的coredns升级到1.7.0,再执行.\load_images.ps1试试
k8s.gcr.io/coredns:1.7.0=registry.cn-hangzhou.aliyuncs.com/google_containers/coredns:1.7.0

@zhusaidong
Copy link
Contributor

我也是这样。
当我执行kubectl get pods -n kube-system时发现其它都是running,就coredns是ImagePullBackOff。
然后用kubectl describe pod coredns-f9fd979d6-72pt2 -n kube-system查看详情,
发现它一直在下载coredns:1.7.0,下载失败
而master分支的images.properties竟然是coredns:1.6.2

@fawdlstty
Copy link
Author

fawdlstty commented Nov 5, 2020

我执行kubectl get pods -n kube-system
windows环境提示:
Error from server (InternalError): an error on the server ("") has prevented the request from succeeding
debian wsl环境提示:
The connection to the server localhost:8080 was refused - did you specify the right host or port?
找了下类似的错误#71647#1962,但还是没太懂这么解决

@itxd
Copy link

itxd commented Nov 6, 2020

REPOSITORY TAG IMAGE ID CREATED SIZE
docker/desktop-kubernetes kubernetes-v1.19.3-cni-v0.8.5-critools-v1.17.0 7f85afe431d8 3 weeks ago 285MB
k8s.gcr.io/kube-proxy v1.19.3 cdef7632a242 3 weeks ago 118MB
k8s.gcr.io/kube-controller-manager v1.19.3 9b60aca1d818 3 weeks ago 111MB
k8s.gcr.io/kube-apiserver v1.19.3 a301be0cd44b 3 weeks ago 119MB
k8s.gcr.io/kube-scheduler v1.19.3 aaefbfa906bd 3 weeks ago 45.7MB
k8s.gcr.io/etcd 3.4.13-0 0369cf4303ff 2 months ago 253MB
k8s.gcr.io/coredns 1.7.0 bfe3a36ebd25 4 months ago 45.2MB
docker/desktop-storage-provisioner v1.1 e704287ce753 7 months ago 41.8MB
docker/desktop-vpnkit-controller v1.0 79da37e5a3aa 8 months ago 36.6MB
k8s.gcr.io/pause 3.2 80d28bedfe5d 8 months ago 683kB
quay.io/kubernetes-ingress-controller/nginx-ingress-controller 0.26.1 29024c9c6e70 13 months ago 483MB

@itxd
Copy link

itxd commented Nov 6, 2020

v1.19.3 is runing

@fawdlstty
Copy link
Author

我在debian wsl2环境执行minikube start --kubernetes-version=v1.19.3,已经成功带起了k8s环境。
在debian wsl2环境:

fa@FAWDLSTTY-PC:/mnt/c/Users/fawdlstty$ kubectl version
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T12:50:19Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T12:41:49Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"linux/amd64"}
fa@FAWDLSTTY-PC:/mnt/c/Users/fawdlstty$ kubectl get pod -A
NAMESPACE     NAME                               READY   STATUS    RESTARTS   AGE
kube-system   coredns-f9fd979d6-bzgth            1/1     Running   1          18m
kube-system   etcd-minikube                      1/1     Running   1          18m
kube-system   kube-apiserver-minikube            1/1     Running   3          18m
kube-system   kube-controller-manager-minikube   1/1     Running   1          18m
kube-system   kube-proxy-cc7xh                   1/1     Running   1          18m
kube-system   kube-scheduler-minikube            1/1     Running   1          18m
kube-system   storage-provisioner                1/1     Running   3          18m
fa@FAWDLSTTY-PC:/mnt/c/Users/fawdlstty$

在windows cmd环境:

C:\WINDOWS\System32>kubectl version
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T12:50:19Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"windows/amd64"}
Error from server (InternalError): an error on the server ("") has prevented the request from succeeding

C:\WINDOWS\System32>kubectl get pod -A
Error from server (InternalError): an error on the server ("") has prevented the request from succeeding

C:\WINDOWS\System32>

然后docker desktop的k8s依旧是Starting状态。感觉还有地方不正确

@mintya
Copy link

mintya commented Nov 16, 2020

删掉用户目录下的.kube目录试试

@fawdlstty
Copy link
Author

试了一下,无效,k8s依旧是starting状态

@ssghost
Copy link

ssghost commented Jan 15, 2021

me too, Mac OSX 10.15, Docker Desktop

@brandChen
Copy link

me too, Mac OSX 10.15, Docker Desktop

解决了吗

@zendwang
Copy link

zendwang commented Feb 9, 2021

解决没

@wuwenbao
Copy link

重启后也行就好了

@leidong-xiy
Copy link

Hey, just got to Troubleshoot tap and try Clean / Purge data and Reset to factory defaults.
Those works for me.
Hope it helps.

@mazyi
Copy link
Contributor

mazyi commented Apr 2, 2021

Please try delete C:\Users\yourUserName\AppData\Local\Docker\pki\ and restart, you can also check log in this dir.

@mazyi
Copy link
Contributor

mazyi commented Apr 2, 2021

latest version of docker for windows change the pki folder's path

@namehuxing
Copy link

win10 docker-desktop版本是3.3.3,安装的k8s版本是v1.19.3
按照https://github.com/AliyunContainerService/k8s-for-docker-desktop/安装,但无法启动,报错为 POST http://localhost/dns/refresh-hosts -> 204 NoContent
解决方法如下:
1、关闭docker-desktop
2、删除C:\Users\yourUserName\AppData\Local\Docker、删除C:\ProgramData\DockerDesktop、删除C:\Users\yourUserName.kube
3、host文件增加
127.0.0.1 kubernetes.docker.internal
4、重启

@mafeifan
Copy link

中国人学个k8s太不容易了,大部分其实是网络和版本问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests