The plugin runs as a standlone server in the cluster, serving DNS A records over gRPC to CoreDNS.
kubectl apply -f manifest/deploy.yaml
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