Skip to content

Commit e7d068e

Browse files
authored
[kubeforward] add to external plugin (#323)
Signed-off-by: Paramoshka <[email protected]>
1 parent 7607601 commit e7d068e

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

content/explugins/kubeforward.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
+++
2+
title = "kubeforward"
3+
description = "*kubeforward* - dynamically updates DNS forwarders based on changes to a specified Kubernetes Service."
4+
weight = 10
5+
tags = ["plugin", "kubeforward", "kubernetes", "dns"]
6+
categories = ["plugin", "external"]
7+
date = "2025-04-04T17:15:00+00:00"
8+
repo = "https://github.com/deckhouse/coredns-kubeforward"
9+
home = "https://github.com/deckhouse/coredns-kubeforward/blob/main/README.md"
10+
+++
11+
12+
## Description
13+
14+
The **kubeforward** plugin enables CoreDNS to dynamically update its list of DNS forwarders by monitoring changes to a specified Kubernetes Service. It observes `EndpointSlices` associated with the Service and adjusts the DNS forwarding configuration in real-time as endpoints are added, removed, or updated. This functionality enhances the reliability and resilience of DNS services within Kubernetes clusters.
15+
16+
## Syntax
17+
18+
```txt
19+
kubeforward {
20+
namespace <namespace>
21+
service_name <service_name>
22+
port_name <port_name>
23+
expire <duration>
24+
health_check <duration>
25+
force_tcp
26+
prefer_udp
27+
}
28+
```
29+
30+
## Configuration Parameters
31+
32+
- `namespace` (required): Specifies the Kubernetes namespace where the target Service resides.
33+
34+
- `service_name` (required): The name of the Service to monitor for endpoint changes.
35+
36+
- `port_name`: The name of the port in the Service resource responsible for handling DNS queries.
37+
38+
- `expire`: Duration after which cached connections expire. Default is 10s.
39+
40+
- `health_check`: Interval for performing health checks on upstream servers. Default is 0.5s.
41+
42+
- `force_tcp`: Forces the use of TCP for forwarding queries.
43+
44+
- `prefer_udp`: Prefers the use of UDP for forwarding queries.
45+
46+
## Examples
47+
48+
```
49+
.:53 {
50+
errors
51+
log
52+
kubeforward {
53+
namespace kube-system
54+
service_name kube-dns
55+
port_name dns
56+
expire 10m
57+
health_check 5s
58+
prefer_udp
59+
force_tcp
60+
}
61+
}
62+
```
63+
64+
## Limitations
65+
66+
Limited Support for Forward Plugin Options: The plugin utilizes the functionality of the forward plugin for serving DNS under the hood but does not support the full list of classic forward options due to the lack of a public interface for configuring options.
67+
68+
69+

0 commit comments

Comments
 (0)