<p>I am very new to OpenWhisk and have some difficulties in the setup. 
The Ngnix Pod is running in a CrashLoopBackOff because of an error in the Pod.</p>

<pre><code>2018/07/02 16:14:27 [emerg] 1#1: host not found in resolver "kube-dns.kube-system" in /etc/nginx/nginx.conf:41
nginx: [emerg] host not found in resolver "kube-dns.kube-system" in /etc/nginx/nginx.conf:41
</code></pre>

<p>I cannot jump into the Pod itself but I ran a Docker Container with the same Image the Pod is using and looked inside the nginx.conf:</p>

<pre><code>user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    include /etc/nginx/conf.d/*.conf;
}
</code></pre>

<p>When I looked into the conf.d directory I found a single default.conf file in which the server_name was set to localhost:</p>

<pre><code>server {
    listen       80;
    server_name  localhost;

    #charset koi8-r;
    #access_log  /var/log/nginx/log/host.access.log  main;

    location / {
        root   /usr/share/nginx/html;
        index  index.html index.htm;
    }

    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }

    # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    #
    #location ~ \.php$ {
    #    proxy_pass   http://127.0.0.1;
    #}

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    #location ~ \.php$ {
    #    root           html;
    #    fastcgi_pass   127.0.0.1:9000;
    #    fastcgi_index  index.php;
    #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;
    #    include        fastcgi_params;
    #}

    # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    #location ~ /\.ht {
    #    deny  all;
    #}
}
</code></pre>

<p>I believe this is causing the Issue and that the kube.dns service cannot resolv localhost. </p>

<p>However I do not know how I can resolve this Issue or at least work around it.
Maybe I can set a static hostname for the Pod in the Ngnix Deployment and enter that hostname into the ngnix config?</p>

<p>Could Someone provide a workaround too me or even a fix?</p>

<p>Many thanks.</p>

rootdoot
<p>Are you using the "OpenWhisk Deployment on Kubernetes (<a href="https://github.com/apache/incubator-openwhisk-deploy-kube" rel="nofollow noreferrer">https://github.com/apache/incubator-openwhisk-deploy-kube</a>) project?  </p>

<p>I suspect you may be hitting the Kubernetes bug described in the <a href="https://github.com/apache/incubator-openwhisk-deploy-kube/blob/master/README.md" rel="nofollow noreferrer">README.md</a>: </p>

<blockquote>
  <p>However, multiple minor releases of Kubernetes, including 1.8.9 and 1.9.4 will not work for OpenWhisk due to bugs with volume mount subpaths (see[<a href="https://github.com/kubernetes/kubernetes/issues/61076" rel="nofollow noreferrer">1</a>]). This bug will surface as a failure when deploying the nginx container.</p>
</blockquote>

<p>The fix for this is using a version of Kubernetes that does not have the volume mount subpath bug.</p>
