Kubernetes pods not starting, running behind a proxy


I am running kubernetes on minikube, I am behind a proxy, so I had set the env variables(HTTP_PROXY & NO_PROXY) for docker in /etc/systemd/system/docker.service.d/http-proxy.conf. I was able to do docker pull but when I run the below example

kubectl run hello-minikube --image=gcr.io/google_containers/echoserver:1.4 --port=8080
kubectl expose deployment hello-minikube --type=NodePort
kubectl get pod

pod never starts and I get the error

desc = unable to pull sandbox image \"gcr.io/google_containers/pause-amd64:3.0\"

docker pull gcr.io/google_containers/echoserver:1.4 works fine


I was able to fix it myself. I had Docker on my host and there is Docker in Minikube. Docker in Minukube had issues I had to ssh into minikube VM and follow this post

Cannot download Docker images behind a proxy and it all works nows,

There should be a better way of doing this, on starting minikube i have passed docker env like below, which did not work

minikube start --docker-env HTTP_PROXY=http://xxxx:8080 --docker-env HTTPS_PROXY=http://xxxx:8080 
--docker-env NO_PROXY=localhost,, --extra-config=kubelet.PodInfraContainerImage=myhub/pause:3.0

I had set the same env variable inside Minikube VM, to make it work

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at


Login to comment


Kubernetes Ingress running behind nginx reverse proxy

running pods and containers in Kubernetes

Running PHP SoapServer behind a proxy

Kubernetes Docker Containers behind proxy

Communicating to all Kubernetes pods behind a service

Configure starting index of StatefulSet's pods in Kubernetes

Urls of a symfony app running behind a reverse proxy

Are there issues with running user pods on a Kubernetes master node?

kubernetes list all running pods name

Kubernetes prometheus metrics for running pods and nodes?

Consul on Kubernetes: Consul pods are running but not ready

How to update a set of pods running in kubernetes?

Running a command on all kubernetes pods of a service

How to change running pods limits in Kubernetes?

Monitoring the number of threads running on kubernetes PODS

How to install Kubernetes cluster behind proxy with Kubeadm?

How to list names of all pods serving traffic behind a service in kubernetes

Running Graylog in a Kubernetes cluster behind an ingress controller

Configure the starting index of pods being created by a StatefulSet in kubernetes

Running Kubernetes master and node on the same server (scheduling pods on Kubernetes master)

Istio 1.0 does not inject envoy proxy to pods on Kubernetes 1.9.3

Access JMX enabled application running behind an HTTP proxy server

Running Go server behind Nginx Reverse Proxy with SSL

Running Apache with virtual Hosts behind node.js proxy

Angular App running on nginx and behind an additional nginx reverse proxy

How to debug Kotlin applications running in Kubernetes pods in IntelliJ?

Running a shell script to initialize pods in kubernetes (initializing my db cluster)

REST-based services running as pods on Kubernetes in Azure with intermittent timeouts

Does kubernetes rolling update may impact applications running in pods or not?