The module has 1 alert.

The module is enabled by default in the Default bundle. The module is disabled by default in the following bundles: Managed, Minimal.

How to explicitly enable the module…

Set the spec.enabled module parameter to true or false in the ModuleConfig/kube-dns resource (create it, if necessary) to explicitly enable or disable the module, or use the deckhouse-controller module command in the d8-system/deckhouse pod.

Example of enabling the module:

  • by using the ModuleConfig resource:

    apiVersion: deckhouse.io/v1alpha1
    kind: ModuleConfig
    metadata:
      name: kube-dns
    spec:
      enabled: true
    
  • by using the deckhouse-controller command (you need a kubectl, configured to work with the cluster):

    kubectl -ti -n d8-system exec svc/deckhouse-leader -c deckhouse -- deckhouse-controller module enable kube-dns
    

Example of disabling the module:

  • by using the ModuleConfig resource:

    apiVersion: deckhouse.io/v1alpha1
    kind: ModuleConfig
    metadata:
      name: kube-dns
    spec:
      enabled: false
    
  • by using the deckhouse-controller command (you need a kubectl, configured to work with the cluster):

    kubectl -ti -n d8-system exec svc/deckhouse-leader -c deckhouse -- deckhouse-controller module disable kube-dns
    

The module is configured using the ModuleConfig custom resource named kube-dns (learn more about setting up Deckhouse…).

Example of the ModuleConfig/kube-dns resource for configuring the module:

apiVersion: deckhouse.io/v1alpha1
kind: ModuleConfig
metadata:
  name: kube-dns
spec:
  version: 1
  enabled: true
  settings: # <-- Module parameters from the "Parameters" section below.

Parameters

Schema version: 1

  • clusterDomainAliases
    array of strings

    A list of cluster domain aliases; these are resolved on par with global.discovery.clusterDomain.

    Please note: the domain alias must not match the domain used in the DNS name template in the publicDomainTemplate parameter.

    • Element of the array
      string

      Pattern: ^[0-9a-zA-Z\.-]+$

  • enableLogs
    boolean

    Enable CoreDNS logging.

    Default: false

  • hosts
    array of objects

    Not required value.

    A static list of hosts similar to that of /etc/hosts.

    • hosts.domain
      string

      Pattern: ^[0-9a-zA-Z\.-]+$

    • hosts.ip
      string

      Pattern: ^[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$

  • stubZones
    array of objects

    A list of additional zones CoreDNS should be authoritative for.

    Default: []

    Example:

    stubZones:
    - zone: example.com
      upstreamNameservers:
      - 8.8.8.8
      cacheTTLSeconds: 3600
      transportProtocolMode: PreferUDP
    
    • stubZones.cacheTTLSeconds
      integer

      Max TTL in seconds for NOERROR responses.

      Default: 30

      Allowed values: 1 <= X <= 3600

    • stubZones.transportProtocolMode
      string

      The mode of the transport protocol for communicating with the upstream DNS server:

      • PreferUDP — UDP is used, even if the original request came over TCP. Note that if the DNS response from the upstream DNS server exceeds 512 bytes and has been truncated and marked with the TC bit (RFC 1035), then it will be resent over TCP (RFC 5966). The request will not be resent over TCP if there are other UDP issues.
      • ForceTCP — Always uses TCP, even if the original request is over UDP.
      • KeepOriginal — Uses the same protocol (TCP or UDP) as the original request.

      Default: "PreferUDP"

      Allowed values: PreferUDP, ForceTCP, KeepOriginal

    • stubZones.upstreamNameservers
      array of strings

      Required value

      A list of IP addresses of recursive DNS servers that CoreDNS will use to resolve domains in this zone.

      • Element of the array
        string

        Pattern: ^[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}(:[0-9]{1,})?$

    • stubZones.zone
      string

      Required value

      The CoreDNS zone.

      Pattern: ^[0-9a-zA-Z\.-]+$

      Example:

      zone: consul.local
      
  • transportProtocolMode
    string

    The mode of the transport protocol for communicating with the upstream DNS server:

    • PreferUDP — UDP is used, even if the original request came over TCP. Note that if the DNS response from the upstream DNS server exceeds 512 bytes and has been truncated and marked with the TC bit (RFC 1035), then it will be resent over TCP (RFC 5966). The request will not be resent over TCP if there are other UDP issues.
    • ForceTCP — Always uses TCP, even if the original request is over UDP.
    • KeepOriginal — Uses the same protocol (TCP or UDP) as the original request.

    Default: "PreferUDP"

    Allowed values: PreferUDP, ForceTCP, KeepOriginal

  • upstreamNameservers
    array of strings

    A list of IP addresses of recursive DNS servers that CoreDNS will use to resolve external domains.

    By default, the /etc/resolv.conf list is used.

    • Element of the array
      string

      Pattern: ^[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}(:[0-9]{1,})?$