Minikube拉取外部镜像失败求助:无法拉取redis-ha及quay.io镜像
Hey there, let's work through your Minikube image pulling issues. Based on what you've shared—local builds working fine, mssql-linux installing successfully via Helm, but failures pulling from quay.io and redis-ha images—here are targeted fixes to try:
First, confirm the Minikube VM can reach external registries. Jump into the Minikube shell:
minikube ssh
Then test connectivity to quay.io directly:
curl -v https://quay.io/v2/
If this fails, the issue is likely network-related:
- Try starting Minikube with public DNS servers to rule out DNS issues:
minikube start --dns=8.8.8.8 --dns=8.8.4.4 - If your host uses a proxy, pass proxy settings to Minikube's Docker daemon:
minikube start --docker-env HTTP_PROXY=http://your-proxy:port --docker-env HTTPS_PROXY=http://your-proxy:port --docker-env NO_PROXY=localhost,127.0.0.1,minikube.internal
If the quay.io or redis-ha images are in private repositories, you need to authenticate Minikube to access them:
- Log into quay.io via Docker on your host:
docker login quay.io - Create a Kubernetes secret from your Docker config:
kubectl create secret generic quay-registry --from-file=.dockerconfigjson=$HOME/.docker/config.json --type=kubernetes.io/dockerconfigjson - Attach this secret to your default service account so all pods can use it:
kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "quay-registry"}]}'
Repeat this process for any other private registries hosting the redis-ha image.
Sometimes pull failures stem from incorrect image paths. Check the default image settings for the redis-ha chart:
helm show values stable/redis-ha
If the image.repository or image.tag looks off, override them during installation:
helm install my-redis stable/redis-ha --set image.repository=quay.io/smile/redis-ha --set image.tag=latest
Even though you ran eval $(minikube docker-env), environment variable conflicts can sometimes cause issues. Try resetting this:
- Close your current terminal and open a new one
- Re-run the environment setup command:
eval $(minikube docker-env) - Test pulling an image directly via Minikube's Docker daemon:
minikube ssh docker pull quay.io/your-target-image
Older Minikube versions can have bugs related to image pulling. Try a fresh install:
minikube stop minikube delete minikube start --driver=docker # Use your preferred driver here
内容的提问来源于stack exchange,提问作者afreeland

