2020/08/11 15:13:24 [emerg] 1#1: host not found in resolver "kube-dns.kube-system.svc.cluster.local" in /etc/nginx/conf.d/callisto-nginx.conf:17
nginx: [emerg] host not found in resolver "kube-dns.kube-system.svc.cluster.local" in /etc/nginx/conf.d/callisto-nginx.conf:17
When coredns used in cluster.
In this case I suggest to parametrize reslover in nginx.conf and get it value outside to values.yaml
In callisto-nginx-65f9c5c9bf-5plk2 logs:
In this case I suggest to parametrize reslover in nginx.conf and get it value outside to values.yaml
diff --git a/files/callisto-nginx.conf b/files/callisto-nginx.conf
index ace2d72..62d4991 100644
--- a/files/callisto-nginx.conf
+++ b/files/callisto-nginx.conf
@@ -14,7 +14,7 @@ access_log off;
server {
listen 80 default_server;
- resolver kube-dns.kube-system.svc.cluster.local;
+ resolver {{ .Values.nginx.resolver }};
access_log /var/log/nginx/access.log custom;
proxy_connect_timeout 600;
diff --git a/values.yaml b/values.yaml
index 5cde516..54ce68b 100644
--- a/values.yaml
+++ b/values.yaml
@@ -66,6 +66,8 @@ nginx:
tag: '1.17.2-alpine'
pullPolicy: Always
+ resolver: coredns.kube-system.svc.cluster.local
+
prometheusExporter:
image:
registry:
diff --git a/files/callisto-nginx.conf b/files/callisto-nginx.conf
index ace2d72..62d4991 100644
--- a/files/callisto-nginx.conf
+++ b/files/callisto-nginx.conf
@@ -14,7 +14,7 @@ access_log off;
server {
listen 80 default_server;
- resolver kube-dns.kube-system.svc.cluster.local;
+ resolver {{ .Values.nginx.resolver }};
access_log /var/log/nginx/access.log custom;
proxy_connect_timeout 600;
diff --git a/values.yaml b/values.yaml
index 5cde516..54ce68b 100644
--- a/values.yaml
+++ b/values.yaml
@@ -66,6 +66,8 @@ nginx:
tag: '1.17.2-alpine'
pullPolicy: Always
+ resolver: coredns.kube-system.svc.cluster.local
+
prometheusExporter:
image:
registry: