Difference between revisions of "Corefile"

From wikieduonline
Jump to navigation Jump to search
Line 2: Line 2:
  
 
Default Corefile, <ref>https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/</pre>
 
Default Corefile, <ref>https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/</pre>
<pre>
+
 
apiVersion: v1
+
apiVersion: v1
kind: ConfigMap
+
[[kind: ConfigMap]]
metadata:
+
metadata:
  name: coredns
+
  name: coredns
  namespace: kube-system
+
  namespace: kube-system
data:
+
data:
  Corefile: |
+
  Corefile: |
    .:53 {
+
    .:53 {
        errors
+
        errors
        health {
+
        health {
            lameduck 5s
+
            lameduck 5s
        }
+
        }
        ready
+
        ready
        kubernetes cluster.local in-addr.arpa ip6.arpa {
+
        kubernetes cluster.local in-addr.arpa ip6.arpa {
            pods insecure
+
            pods insecure
            fallthrough in-addr.arpa ip6.arpa
+
            fallthrough in-addr.arpa ip6.arpa
            ttl 30
+
            ttl 30
        }
+
        }
        prometheus :9153
+
        prometheus :9153
        forward . /etc/resolv.conf
+
        forward . /etc/resolv.conf
        cache 30
+
        cache 30
        loop
+
        loop
        reload
+
        reload
        loadbalance
+
        loadbalance
    }     
+
    }     
</pre>
 
  
  
 
{{CoreDNS}}
 
{{CoreDNS}}

Revision as of 17:24, 1 December 2022


Default Corefile, <ref>https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/

apiVersion: v1
kind: ConfigMap
metadata:
  name: coredns
  namespace: kube-system
data:
  Corefile: |
    .:53 {
        errors
        health {
            lameduck 5s
        }
        ready
        kubernetes cluster.local in-addr.arpa ip6.arpa {
            pods insecure
            fallthrough in-addr.arpa ip6.arpa
            ttl 30
        }
        prometheus :9153
        forward . /etc/resolv.conf
        cache 30
        loop
        reload
        loadbalance
    }    


CoreDNS, kube-dns, Know how to configure and use CoreDNS, Corefile

Advertising: