<p>I'm having a use case where each openshift project belongs to an own VLAN, which  has more than just Openshift Nodes in it. Each VLAN has it's own independent DNS to resolve all the Hosts within that VLAN. The Openshift Cluster itself hosts more of such VLANs on the same time. To get the per-project dns resolution done, it is elementary to get a project-based DNS resolving implemented.
Is there a way to change the pod's /etc/resolv.conf dependent on the Openshift project it runs in? The Cluster runs on RHEL 7.x, Openshift is 3.11</p>

nuttah
<p>Personally I think the <code>OpenShift</code> has not been supported configuration of <code>DNS</code> per a <code>project</code> unit. But you can consider the <code>CustomPodDNS</code> feature to configure <code>DNS</code> per <code>Pod</code> unit. So you might configure the <code>Pods</code> to use same <code>DNS</code> config in a <code>project</code> using this feature.</p>

<ul>
<li>You can enable the <code>CustomPodDNS</code> feature for <code>OCP</code> cluster, if you configure the following parameters in <code>/etc/origin/master/master-config.yaml</code>.</li>
</ul>

<pre><code>kubernetesMasterConfig:
  apiServerArguments:
    feature-gates:
    - CustomPodDNS=true
  controllerArguments:
    feature-gates:
    - CustomPodDNS=true
</code></pre>

<ul>
<li>You can also enable this feature on one node host as configuring it in the <code>/etc/origin/node/node-config.yaml</code>.</li>
</ul>

<pre><code>kubeletArguments:
  feature-gates:
  - CustomPodDNS=true
</code></pre>

<p>You should restart the related services <code>master</code> and <code>node</code> to take effect the changes.</p>

<ul>
<li>The config of <code>Pod</code>, refer <a href="https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-config" rel="nofollow noreferrer">Pod's Config</a> for more details.</li>
</ul>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  namespace: default
  name: dns-example
spec:
  containers:
    - name: test
      image: nginx
  dnsPolicy: "None"
  dnsConfig:
    nameservers:
      - 1.2.3.4
    searches:
      - ns1.svc.cluster.local
      - my.dns.search.suffix
    options:
      - name: ndots
        value: "2"
      - name: edns0
</code></pre>
