k8s with kubespray fails at dns config

4/6/2018

My k8s with kubespray always bails out at the following error "Too many nameservers. You can relax this check by set docker_dns_servers_strict=no and we will only use the first 3

In my cluster.yml I have this under - hosts - docker_dns_servers_strict: no but I still get the error. What am I missing?

-- curiousengineer
docker
kubernetes

2 Answers

9/15/2018

In my case I added docker_dns_servers_strict: false in the all.yaml file. It's solved my problem.

-- vg.cloudpro
Source: StackOverflow

4/6/2018

As explained here, check the format of your yaml file.

Here is one example:

- hosts: k8s-cluster:etcd:calico-rr
  any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
  vars:
    - docker_dns_servers_strict: no
  roles:
    - { role: kubespray-defaults}
    - { role: kernel-upgrade, tags: kernel-upgrade, when: kernel_upgrade is defined and kernel_upgrade }
    - { role: kubernetes/preinstall, tags: preinstall }
    - { role: docker, tags: docker }
    - role: rkt
      tags: rkt
      when: "'rkt' in [etcd_deployment_type, kubelet_deployment_type, vault_deployment_type]"

As mentioned in this issue:

This usually happens if you configure one set of dns servers on the servers before you run the kubespray role.

-- VonC
Source: StackOverflow