kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.5k stars 4.89k forks source link

Unable to start minikube locally #19536

Closed divya-kumari-27 closed 2 months ago

divya-kumari-27 commented 2 months ago

What Happened?

minikube start command fails with the following logs

minikube start
šŸ˜„  minikube v1.25.2 on Ubuntu 20.04 (amd64)
āœØ  Using the docker driver based on existing profile
šŸ‘  Starting control plane node minikube in cluster minikube
šŸšœ  Pulling base image ...
šŸ¤·  docker "minikube" container is missing, will recreate.
šŸ”„  Creating docker container (CPUs=2, Memory=12500MB) ...
šŸ¤¦  StartHost failed, but will try again: recreate: creating host: create: creating: setting up container node: preparing volume for minikube container: docker run --rm --name minikube-preload-sidecar --label created_by.minikube.sigs.k8s.io=true --label name.minikube.sigs.k8s.io=minikube --entrypoint /usr/bin/test -v minikube:/var gcr.io/k8s-minikube/kicbase:v0.0.30@sha256:02c921df998f95e849058af14de7045efc3954d90320967418a0d1f182bbc0b2 -d /var/lib: exit status 125
stdout:

stderr:
Unable to find image 'gcr.io/k8s-minikube/kicbase:v0.0.30@sha256:02c921df998f95e849058af14de7045efc3954d90320967418a0d1f182bbc0b2' locally
docker: Error response from daemon: pull access denied for gcr.io/k8s-minikube/kicbase, repository does not exist or may require 'docker login': denied: Permission denied for "sha256:02c921df998f95e849058af14de7045efc3954d90320967418a0d1f182bbc0b2" from request "/v2/k8s-minikube/kicbase/manifests/sha256:02c921df998f95e849058af14de7045efc3954d90320967418a0d1f182bbc0b2".
See 'docker run --help'.

āŒ  Exiting due to GUEST_PROVISION: Failed to start host: recreate: creating host: create: creating: setting up container node: preparing volume for minikube container: docker run --rm --name minikube-preload-sidecar --label created_by.minikube.sigs.k8s.io=true --label name.minikube.sigs.k8s.io=minikube --entrypoint /usr/bin/test -v minikube:/var gcr.io/k8s-minikube/kicbase:v0.0.30@sha256:02c921df998f95e849058af14de7045efc3954d90320967418a0d1f182bbc0b2 -d /var/lib: exit status 125
stdout:

There are instances where above command is retried for an hour, and then the pull of the image starts working

stderr:

Unable to find image 'gcr.io/k8s-minikube/kicbase:v0.0.30@sha256:02c921df998f95e849058af14de7045efc3954d90320967418a0d1f182bbc0b2' locally
docker: Error response from daemon: pull access denied for gcr.io/k8s-minikube/kicbase, repository does not exist or may require 'docker login': denied: Permission denied for "sha256:02c921df998f95e849058af14de7045efc3954d90320967418a0d1f182bbc0b2" from request "/v2/k8s-minikube/kicbase/manifests/sha256:02c921df998f95e849058af14de7045efc3954d90320967418a0d1f182bbc0b2".
See 'docker run --help'.
* 

ā•­ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā•®

ā”‚                                                                                             ā”‚

ā”‚    * If the above advice does not help, please let us know:                                 ā”‚

ā”‚      https://github.com/kubernetes/minikube/issues/new/choose                               ā”‚

ā”‚                                                                                             ā”‚

ā”‚    * Please run `minikube logs --file=logs.txt` and attach logs.txt to the GitHub issue.    ā”‚

ā”‚                                                                                             ā”‚

ā•°ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā•Æ

 -- retrying
* Kubernetes 1.23.3 is now available. If you would like to upgrade, specify: --kubernetes-version=v1.23.3
* Using the docker driver based on existing profile
  - More information: https://docs.docker.com/engine/install/linux-postinstall/#your-kernel-does-not-support-cgroup-swap-limit-capabilities
  - More information: https://docs.docker.com/engine/install/linux-postinstall/#your-kernel-does-not-support-cgroup-swap-limit-capabilities

* Starting control plane node minikube in cluster minikube
* Pulling base image ...
* docker "minikube" container is missing, will recreate.
* Creating docker container (CPUs=4, Memory=16384MB) ...
* Preparing Kubernetes v1.21.0 on Docker 20.10.12 ...
  - kubelet.max-pods=555
  - kubelet.image-gc-high-threshold=98
  - kubelet.housekeeping-interval=5m
  - Generating certificates and keys ...
  - Booting up control plane ...
  - Configuring RBAC rules ...
* Verifying Kubernetes components...
  - Using image gcr.io/k8s-minikube/storage-provisioner:v5
* Enabled addons: storage-provisioner, default-storageclass

Attach the log file

logs.txt

Operating System

Ubuntu

Driver

Docker

spowelljr commented 2 months ago

See https://github.com/kubernetes/minikube/issues/19541, this should now be resolved.

lhsaq2009 commented 1 month ago

stderr: Unable to find image 'gcr.io/k8s-minikube/kicbase:v0.0.45@sha256:81df288595202a317b1a4dc2506ca2e4ed5f22373c19a441b88cfbf4b9867c85' locally docker: Error response from daemon: Get "https://gcr.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers). See 'docker run --help'.

spowelljr commented 1 month ago

Hi @lhsaq2009, you seem to be having a connection errors, I just tried pulling that image and can confirm that it exists. Based on your GitHub profile I can see that you're located in China, please take a look at the following docs for people trying to use minikube from China.

https://minikube.sigs.k8s.io/docs/faq/#i-am-in-china-and-i-encounter-errors-when-trying-to-start-minikube-what-should-i-do