AliyunContainerService / minikube

普大喜奔,官方Minikube提供了完整对国内用户支持,完美支持Addon组件。 建议参考 https://yq.aliyun.com/articles/221687 或 https://github.com/AliyunContainerService/minikube/wiki 最新支持minikube v1.24.0
Apache License 2.0
1.28k stars 151 forks source link

minikube镜像已经下载不下来了... #17

Closed tianxiayu007 closed 4 years ago

tianxiayu007 commented 4 years ago

https://yq.aliyun.com/articles/221687?spm=a2c4e.11153940.0.0.7dd54cec9G3e0C&p=7#comments 看帖子吧...有好些人反应了..但是没有回复.. Snipaste_2020-05-01_16-59-28

denverdino commented 4 years ago

对于 -vm-driver docker 需要指明 --base-image 镜像

https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/commands/start.md

  --base-image string                 The base image to use for docker/podman drivers. Intended for local development. (default "gcr.io/k8s-minikube/kicbase:v0.0.10@sha256:f58e0c4662bac8a9b5dda7984b185bad8502ade5d9fa364bf2755d636ab51438")

我推送了一个mirror镜像,可以看一下是否work

--base-image registry.cn-hangzhou.aliyuncs.com/google_containers/kicbase:v0.0.10

tianxiayu007 commented 4 years ago

试了一下...需要最新的minikube(v1.9.2都没这个参数) 1.建议更新阿里云教程(好像没提到 --base-image啊,参数太多,一般人也注意不到😣) 2.我是按照下面链接来的,挺折腾的😥 kicbase image unavailable in CN registry mirrors

对于 -vm-driver docker 需要指明 --base-image 镜像

https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/commands/start.md

  --base-image string                 The base image to use for docker/podman drivers. Intended for local development. (default "gcr.io/k8s-minikube/kicbase:v0.0.10@sha256:f58e0c4662bac8a9b5dda7984b185bad8502ade5d9fa364bf2755d636ab51438")

我推送了一个mirror镜像,可以看一下是否work

--base-image registry.cn-hangzhou.aliyuncs.com/google_containers/kicbase:v0.0.10

tianxiayu007 commented 4 years ago

验证失败:

lbc@DESKTOP-KJ0R7P8:~$ ./minikube-linux-amd64 start --driver='docker' --base-image registry.cn-hangzhou.aliyuncs.com/google_containers/kicbase:v0.0.10 --image-mirror-country='cn' --image-repository=registry.cn-hangzhou.aliyuncs.com/google_containers --addons=ingress --addons=dashboard
😄  minikube v1.10.0-beta.2 on Ubuntu 18.04
✨  Using the docker driver based on user configuration
✅  Using image repository registry.cn-hangzhou.aliyuncs.com/google_containers
👍  Starting control plane node minikube in cluster minikube
🔥  Creating docker container (CPUs=2, Memory=2700MB) ...
🐳  Preparing Kubernetes v1.18.1 on Docker 19.03.2 ...
E0503 11:26:05.065308   17337 start.go:94] Unable to get host IP: inspect IP bridge network "155f4023a0a7\nbc8d1ce23b37".: docker inspect --format "{{(index .IPAM.Config 0).Gateway}}" 155f4023a0a7
bc8d1ce23b37: exit status 1
stdout:

stderr:
Error: No such object: 155f4023a0a7
bc8d1ce23b37

💣  failed to start node: startup failed: Failed to setup kubeconfig: inspect IP bridge network "155f4023a0a7\nbc8d1ce23b37".: docker inspect --format "{{(index .IPAM.Config 0).Gateway}}" 155f4023a0a7
bc8d1ce23b37: exit status 1
stdout:

stderr:
Error: No such object: 155f4023a0a7
bc8d1ce23b37

😿  minikube is exiting due to an error. If the above message is not useful, open an issue:
👉  https://github.com/kubernetes/minikube/issues/new/choose
RobertChou commented 4 years ago

阿里云的文章也被删掉了。

denverdino commented 4 years ago

https://yq.aliyun.com/articles/221687 当时在被审核

denverdino commented 4 years ago

已经提供了v1.11.0的阿里云版本,测试过docker/kvm2驱动都是可以的了 https://github.com/AliyunContainerService/minikube/wiki

tianxiayu007 commented 4 years ago

已经提供了v1.11.0的阿里云版本,测试过docker/kvm2驱动都是可以的了 https://github.com/AliyunContainerService/minikube/wiki


lbc@evilsay:~/Workspace/boss-web$ minikube start
😄  minikube v1.11.0 on Ubuntu 18.04
✨  Automatically selected the docker driver
👍  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
E0630 18:11:55.933797   29610 cache.go:63] save image to file "registry.cn-hangzhou.aliyuncs.com/google_containers/metrics-scraper:v1.0.2" -> "/home/lbc/.minikube/cache/images/registry.cn-hangzhou.aliyuncs.com/google_containers/metrics-scraper_v1.0.2" failed: write: error verifying sha256 checksum; got "3c1a16df9f06b8a12b3b6af15349345d87e240780129342b8f3195089a4e0619", want "0c6dcbb4470ea30cc152812036b409d584dd1dbf2f0d18e27c91a1bea9dc4f5f"
E0630 18:11:56.539481   29610 cache.go:63] save image to file "registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver:v1.18.3" -> "/home/lbc/.minikube/cache/images/registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver_v1.18.3" failed: write: error verifying sha256 checksum; got "a30f30114eddcdf0a523e93abbc95c1a01676506dab175cfd011695e1d799a8f", want "83b4483280e5187b2801b449338d5755e5874ab80c44bf1ce615d258142e7c8b"
E0630 18:11:57.716421   29610 cache.go:63] save image to file "registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler:v1.18.3" -> "/home/lbc/.minikube/cache/images/registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler_v1.18.3" failed: write: error verifying sha256 checksum; got "fadff3db23ccc1401fe14a523e93377eac0e5842da2f1f36b5655cb666fd4c44", want "83b4483280e5187b2801b449338d5755e5874ab80c44bf1ce615d258142e7c8b"
E0630 18:11:58.164468   29610 cache.go:63] save image to file "registry.cn-hangzhou.aliyuncs.com/google_containers/etcd:3.4.3-0" -> "/home/lbc/.minikube/cache/images/registry.cn-hangzhou.aliyuncs.com/google_containers/etcd_3.4.3-0" failed: write: error verifying sha256 checksum; got "c20dcbd56fdb2b7e2f07e911cda3e7274bf4455f8ad26e0b5abf44a92a35e766", want "39fafc05754f195f134ca11ecdb1c9a691ab0848c697fffeb5a85f900caaf6e1"
E0630 18:11:58.492404   29610 cache.go:63] save image to file "registry.cn-hangzhou.aliyuncs.com/google_containers/storage-provisioner:v1.8.1" -> "/home/lbc/.minikube/cache/images/registry.cn-hangzhou.aliyuncs.com/google_containers/storage-provisioner_v1.8.1" failed: write: error verifying sha256 checksum; got "ca97cdae6bb5f7d16e2112ff4061027d5eb9b9d56903a61e181f749bf882eec4", want "d9770ba67fb2c5e57e9ccff744f2bba3e93a02b80fd1cb7b19f220380b676f41"
E0630 18:12:00.618119   29610 cache.go:63] save image to file "registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager:v1.18.3" -> "/home/lbc/.minikube/cache/images/registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager_v1.18.3" failed: write: error verifying sha256 checksum; got "4528742171026c5550576868f9e7d4b36b136fac1e1b1f20847344efba9e251f", want "83b4483280e5187b2801b449338d5755e5874ab80c44bf1ce615d258142e7c8b"
E0630 18:12:00.723594   29610 cache.go:63] save image to file "registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy:v1.18.3" -> "/home/lbc/.minikube/cache/images/registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy_v1.18.3" failed: write: error verifying sha256 checksum; got "8bc6da1fffecc70c9f346b7335b1ca3910b4ddc497a60579f3219d68b2c8754c", want "83b4483280e5187b2801b449338d5755e5874ab80c44bf1ce615d258142e7c8b"
E0630 18:12:04.628834   29610 cache.go:63] save image to file "registry.cn-hangzhou.aliyuncs.com/google_containers/dashboard:v2.0.0" -> "/home/lbc/.minikube/cache/images/registry.cn-hangzhou.aliyuncs.com/google_containers/dashboard_v2.0.0" failed: write: error verifying sha256 checksum; got "ee581b258fb3b2f42cba2ba10710f3818301bfe8c89943fb799f3037bc99aefe", want "2a43ce254c7f361167ae5c0451c4b024a9a575bbe217f18260249345986f3596"
📶  Unfortunately, could not download the base image registry.cn-hangzhou.aliyuncs.com/google_containers/kicbase:v0.0.10
❗  In order to use the fall back image, you need to log in to the github packages registry📘  Please visit the following link for documentation around this:
https://help.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages#authenticating-to-github-packages

💡 Please either authenticate to the registry or use --base-image flag to use a different registry.


镜像tag不对的...
jiachaosun commented 4 years ago

@lubocheng 我这里可以

minikube start \
> --vm-driver=docker \
> --image-repository=registry.cn-hangzhou.aliyuncs.com/google_containers \
> --registry-mirror=https://****.mirror.aliyuncs.com \
> --base-image registry.cn-hangzhou.aliyuncs.com/google_containers/kicbase:v0.0.10

😄  minikube v1.11.0 on Ubuntu 18.04 (vbox/amd64)
✨  Using the docker driver based on existing profile
👍  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
🔥  Creating docker container (CPUs=2, Memory=2200MB) ...
🐳  Preparing Kubernetes v1.18.3 on Docker 19.03.2 ...
    ▪ kubeadm.pod-network-cidr=10.244.0.0/16
    > kubectl.sha256: 65 B / 65 B [--------------------------] 100.00% ? p/s 0s
    > kubelet.sha256: 65 B / 65 B [--------------------------] 100.00% ? p/s 0s
    > kubeadm.sha256: 65 B / 65 B [--------------------------] 100.00% ? p/s 0s
    > kubeadm: 37.97 MiB / 37.97 MiB [-------------] 100.00% 820.53 KiB p/s 48s
    > kubectl: 41.99 MiB / 41.99 MiB [-------------] 100.00% 841.71 KiB p/s 51s
    > kubelet: 108.04 MiB / 108.04 MiB [-----------] 100.00% 1.25 MiB p/s 1m27s
🔎  Verifying Kubernetes components...
🌟  Enabled addons: default-storageclass, storage-provisioner
🏄  Done! kubectl is now configured to use "minikube"
💡  For best results, install kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/
tianxiayu007 commented 4 years ago
lbc@evilsay:~/Workspace/auction-web$ minikube start --vm-driver=docker --image-repository=registry.cn-hangzhou.aliyuncs.com/google_containers --registry-mirror=https://****.mirror.aliyuncs.com --base-image registry.cn-hangzhou.aliyuncs.com/google_containers/kicbase:v0.0.10
😄  minikube v1.11.0 on Ubuntu 18.04
✨  Using the docker driver based on user configuration
✅  Using image repository registry.cn-hangzhou.aliyuncs.com/google_containers
👍  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
E0707 12:43:53.739970    6280 cache.go:63] save image to file "registry.cn-hangzhou.aliyuncs.com/google_containers/etcd:3.4.3-0" -> "/home/lbc/.minikube/cache/images/registry.cn-hangzhou.aliyuncs.com/google_containers/etcd_3.4.3-0" failed: write: error verifying sha256 checksum; got "3b7b64c82eab2dae20291ff9e6597f16589b0706d99736c5b742417abe4404c7", want "39fafc05754f195f134ca11ecdb1c9a691ab0848c697fffeb5a85f900caaf6e1"
E0707 12:43:54.572286    6280 cache.go:63] save image to file "registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy:v1.18.3" -> "/home/lbc/.minikube/cache/images/registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy_v1.18.3" failed: write: error verifying sha256 checksum; got "544cb5f73ab242cae665eb656caaa895471d11ac2b13f27e3ccc981586659dca", want "83b4483280e5187b2801b449338d5755e5874ab80c44bf1ce615d258142e7c8b"
E0707 12:43:54.579889    6280 cache.go:63] save image to file "registry.cn-hangzhou.aliyuncs.com/google_containers/storage-provisioner:v1.8.1" -> "/home/lbc/.minikube/cache/images/registry.cn-hangzhou.aliyuncs.com/google_containers/storage-provisioner_v1.8.1" failed: write: error verifying sha256 checksum; got "ba2cd0e6c681f1c2b7e9087d2606fce15016b92b6a84832bef57b119689424ee", want "d9770ba67fb2c5e57e9ccff744f2bba3e93a02b80fd1cb7b19f220380b676f41"
E0707 12:43:54.669590    6280 cache.go:63] save image to file "registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager:v1.18.3" -> "/home/lbc/.minikube/cache/images/registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager_v1.18.3" failed: write: error verifying sha256 checksum; got "0e8d16c4001256fb347d1689cc12f1375794be9f2351d5862ad5aa853bdfc2fd", want "83b4483280e5187b2801b449338d5755e5874ab80c44bf1ce615d258142e7c8b"
E0707 12:43:54.720986    6280 cache.go:63] save image to file "registry.cn-hangzhou.aliyuncs.com/google_containers/metrics-scraper:v1.0.2" -> "/home/lbc/.minikube/cache/images/registry.cn-hangzhou.aliyuncs.com/google_containers/metrics-scraper_v1.0.2" failed: write: error verifying sha256 checksum; got "08e9913832994cd1d6e878b335e1a6f2744916f19b6dd31256a9073f72ec46d0", want "0c6dcbb4470ea30cc152812036b409d584dd1dbf2f0d18e27c91a1bea9dc4f5f"
E0707 12:43:56.467295    6280 cache.go:63] save image to file "registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler:v1.18.3" -> "/home/lbc/.minikube/cache/images/registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler_v1.18.3" failed: write: error verifying sha256 checksum; got "dcfc5d42fef65e0673296facfece5d4d2456805286094ad0c763c8bea182c111", want "83b4483280e5187b2801b449338d5755e5874ab80c44bf1ce615d258142e7c8b"
E0707 12:44:00.705704    6280 cache.go:63] save image to file "registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver:v1.18.3" -> "/home/lbc/.minikube/cache/images/registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver_v1.18.3" failed: write: error verifying sha256 checksum; got "034c72833c80dbd74296b8c530b2080584b32adae485d733e21b076be65cbc96", want "2bfb66b13a96b7d5fc69b811b5995bf8b5ac056a18ff5af3d07e72cc712b1b77"
E0707 12:44:09.135865    6280 cache.go:63] save image to file "registry.cn-hangzhou.aliyuncs.com/google_containers/dashboard:v2.0.0" -> "/home/lbc/.minikube/cache/images/registry.cn-hangzhou.aliyuncs.com/google_containers/dashboard_v2.0.0" failed: write: error verifying sha256 checksum; got "ead74ddeb24b2c41c497e15ee96ff391215d050b54a6465503dd48c77c32a68b", want "2a43ce254c7f361167ae5c0451c4b024a9a575bbe217f18260249345986f3596"
🔥  Creating docker container (CPUs=2, Memory=2200MB) ...
E0707 12:48:18.779992    6280 cache.go:161] Error caching images:  Caching images for kubeadm: caching images: caching image "/home/lbc/.minikube/cache/images/registry.cn-hangzhou.aliyuncs.com/google_containers/etcd_3.4.3-0": write: error verifying sha256 checksum; got "3b7b64c82eab2dae20291ff9e6597f16589b0706d99736c5b742417abe4404c7", want "39fafc05754f195f134ca11ecdb1c9a691ab0848c697fffeb5a85f900caaf6e1"
🐳  Preparing Kubernetes v1.18.3 on Docker 19.03.2 ...
    ▪ kubeadm.pod-network-cidr=10.244.0.0/16
❌  Unable to load cached images: loading cached images: stat /home/lbc/.minikube/cache/images/registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler_v1.18.3: no such file or directory
🔎  Verifying Kubernetes components...
🌟  Enabled addons: default-storageclass, storage-provisioner
🏄  Done! kubectl is now configured to use "minikube"

镜像tag依然有问题,不过这次跑起来了~~~😂

denverdino commented 4 years ago

hmm, no idea for the sha 256 difference

shanehh commented 3 years ago

@lubocheng 我这里可以

minikube start \
> --vm-driver=docker \
> --image-repository=registry.cn-hangzhou.aliyuncs.com/google_containers \
> --registry-mirror=https://****.mirror.aliyuncs.com \
> --base-image registry.cn-hangzhou.aliyuncs.com/google_containers/kicbase:v0.0.10

😄  minikube v1.11.0 on Ubuntu 18.04 (vbox/amd64)
✨  Using the docker driver based on existing profile
👍  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
🔥  Creating docker container (CPUs=2, Memory=2200MB) ...
🐳  Preparing Kubernetes v1.18.3 on Docker 19.03.2 ...
    ▪ kubeadm.pod-network-cidr=10.244.0.0/16
    > kubectl.sha256: 65 B / 65 B [--------------------------] 100.00% ? p/s 0s
    > kubelet.sha256: 65 B / 65 B [--------------------------] 100.00% ? p/s 0s
    > kubeadm.sha256: 65 B / 65 B [--------------------------] 100.00% ? p/s 0s
    > kubeadm: 37.97 MiB / 37.97 MiB [-------------] 100.00% 820.53 KiB p/s 48s
    > kubectl: 41.99 MiB / 41.99 MiB [-------------] 100.00% 841.71 KiB p/s 51s
    > kubelet: 108.04 MiB / 108.04 MiB [-----------] 100.00% 1.25 MiB p/s 1m27s
🔎  Verifying Kubernetes components...
🌟  Enabled addons: default-storageclass, storage-provisioner
🏄  Done! kubectl is now configured to use "minikube"
💡  For best results, install kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/

niceee! it works for me