Skip to content

kmesh-net/kmesh-dns-plugin

Repository files navigation

kmesh-coredns-plugin

The plugin runs as a standlone server in the cluster, serving DNS A records over gRPC to CoreDNS.

Quick start

Step1: Deploy Kmesh coredns plugin

kubectl apply -f manifest/deploy.yaml

Step2: Forward coreDNS to Kmesh coredns plugin

kubectl edit cm coredns -n kube-system
apiVersion: v1
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 {
           max_concurrent 1000
        }
        cache 30
        loop
        reload
        loadbalance
    }
    // put the domain suffix here
    // e.g. for consul service 
    consul.local:53 {
        errors
        cache 30
        // the KMESHPLUGIN_IP is the kmesh coredns plugin service clusterip
        forward . $KMESHPLUGIN_IP:15053
    }
    // e.g. for nacos service 
    nacos:53 {
        errors
        cache 30
        // the KMESHPLUGIN_IP is the kmesh coredns plugin service clusterip
        forward . $KMESHPLUGIN_IP:15053
    }
kind: ConfigMap
metadata:
  name: coredns
  namespace: kube-system

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •