Merge pull request #1246 from holser/disable_dns_for_kube_services

Change DNS policy for kubernetes components
This commit is contained in:
Matthew Mosesohn 2017-04-20 16:12:52 +03:00 committed by GitHub
commit cb52d78845
5 changed files with 5 additions and 5 deletions

View file

@ -9,7 +9,7 @@ metadata:
spec:
hostNetwork: true
{% if kube_version | version_compare('v1.6', '>=') %}
dnsPolicy: ClusterFirstWithHostNet
dnsPolicy: ClusterFirst
{% endif %}
containers:
- name: kube-apiserver

View file

@ -8,7 +8,7 @@ metadata:
spec:
hostNetwork: true
{% if kube_version | version_compare('v1.6', '>=') %}
dnsPolicy: ClusterFirstWithHostNet
dnsPolicy: ClusterFirst
{% endif %}
containers:
- name: kube-controller-manager

View file

@ -8,7 +8,7 @@ metadata:
spec:
hostNetwork: true
{% if kube_version | version_compare('v1.6', '>=') %}
dnsPolicy: ClusterFirstWithHostNet
dnsPolicy: ClusterFirst
{% endif %}
containers:
- name: kube-scheduler

View file

@ -8,7 +8,7 @@ metadata:
spec:
hostNetwork: true
{% if kube_version | version_compare('v1.6', '>=') %}
dnsPolicy: ClusterFirstWithHostNet
dnsPolicy: ClusterFirst
{% endif %}
containers:
- name: kube-proxy

View file

@ -16,7 +16,7 @@
{{dns_domain}}.{{d}}./{{d}}.{{d}}./com.{{d}}./
{%- endfor %}
default_resolver: >-
{%- if cloud_provider is defined and cloud_provider == 'gce' -%}169.254.169.254{%- else -%}8.8.8.8{%- endif -%}
{%- if cloud_provider is defined and cloud_provider in [ 'gce', 'aws' ] -%}169.254.169.254{%- else -%}8.8.8.8{%- endif -%}
- name: check if kubelet is configured
stat: