I was developing locally in docker-compose
, and had an nginx container doing a simple proxy_pass
like so:
location /app/ {
proxy_pass http://webapp:3000/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
resolver 127.0.0.11;
}
I now want to move over to kubernetes
in GKE, and the last line is giving me troubles.
I tried to switch the resolver to:
resolver kube-dns;
I also tried various other IPs and names, but I keep getting an error along the lines of:
nginx: [emerg] host not found in resolver "kube-dns"
My kubernetes setup is that I have a single pod, with 2 containers: 'webapp' and 'nginx'. I simply want to have an external service
pointing to nginx that can proxy_pass
to webapp.
Any ideas?