I'm trying to start minikube but it gives me this error
this vM is having trouble accessing https://k8s.gcr.io
To pull new external images, you may need to configure a proxy:
https://minikube.sigs.k8s.io/docs/reference/networking/proxy/
I tried docker and HyperV and VirtualBox same error kubectl is working fine but whenever I tried to pull a namespace like Kubernetes-dashboard I get errimagepull
CodePudding user response:
Option 1:
- Try to set up a proxy
- https://minikube.sigs.k8s.io/docs/handbook/vpn_and_proxy/
### Linux
# Set your proxy
export HTTP_PROXY=http://<proxy hostname:port>
export HTTPS_PROXY=https://<proxy hostname:port>
### Windows
set HTTP_PROXY=http://<proxy hostname:port>
set HTTPS_PROXY=https://<proxy hostname:port>
# Start minikube
minikube start
Option 2:
minikube start --image-repository=auto
Option 3:
# Remove old content (minikube context)
minikube delete
# Start minikube with docker driver in case you have been using something else
minikube start --driver=docker
Option 4. (If you are in china)
$ minikube start \
--driver=docker \
##
## Try with or without this flag if it's not working for you
## [optional] --image-mirror-country
--image-mirror-country=cn \
--registry-mirror=https://registry.docker-cn.com \
--image-repository=registry.cn-hangzhou.aliyuncs.com/google_containers
CodePudding user response:
@CodeWizard Thank you Your Solution work after I added NO_PROXY=localhost,127.0.0.1,10.96.0.0/12,192.168.59.0/24,192.168.49.0/24,192.168.39.0/24 to my env variables the error disappear
- minikube v1.26.1 on Microsoft Windows 11 Pro 10.0.22000 Build 22000
- Automatically selected the docker driver. Other choices: hyperv, ssh
- Using Docker Desktop driver with root privileges
- Starting control plane node minikube in cluster minikube
- Pulling base image ...
- Creating docker container (CPUs=2, Memory=4096MB) ...
- Found network options:
- NO_PROXY=localhost,127.0.0.1,10.96.0.0/12,192.168.59.0/24,192.168.49.0/24,192.168.39.0/24
- no_proxy=localhost,127.0.0.1,10.96.0.0/12,192.168.59.0/24,192.168.49.0/24,192.168.39.0/24,192.168.49.2
- Preparing Kubernetes v1.24.3 on Docker 20.10.17 ...
- env NO_PROXY=localhost,127.0.0.1,10.96.0.0/12,192.168.59.0/24,192.168.49.0/24,192.168.39.0/24,192.168.49.2
- 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
- Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
but whenever I'm trying to add the kubernates-dashboard I got errimagepull
kubernetes-dashboard-6c75475678-bhjrz 0/1 ImagePullBackOff 0 5m13s