-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(source): optional expose of nodes internal ipv6 #5192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
k8s-ci-robot
merged 11 commits into
kubernetes-sigs:master
from
hjoshi123:feat-expose-internal-ipv6
Mar 26, 2025
Merged
Changes from 8 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
87e3c4b
feat: added expose internal ipv6 flag
hjoshi123 1fbcb57
Merge branch 'master' of github.com:hjoshi123/external-dns into feat-…
hjoshi123 ed2419a
fix: removing fmt.Printf
hjoshi123 794cdd2
fix: fixing ci lint
hjoshi123 1d61159
docs: added documentation in node source
hjoshi123 1bf31da
edited docs and made new test
hjoshi123 bf43ddf
added warn log
hjoshi123 df517cf
detailed documentation with no-expose
hjoshi123 af3a7df
added new tests to handle edge case
hjoshi123 04f1661
renaming variable
hjoshi123 719cc78
removing reduntant code
hjoshi123 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,12 +4,40 @@ This tutorial describes how to configure ExternalDNS to use the cluster nodes as | |
Using nodes (`--source=node`) as source is possible to synchronize a DNS zone with the nodes of a cluster. | ||
|
||
The node source adds an `A` record per each node `externalIP` (if not found, any IPv4 `internalIP` is used instead). | ||
It also adds an `AAAA` record per each node IPv6 `internalIP`. | ||
It also adds an `AAAA` record per each node IPv6 `internalIP`. Refer to the [IPv6 Behavior](#ipv6-behavior) section for more details. | ||
The TTL of the records can be set with the `external-dns.alpha.kubernetes.io/ttl` node annotation. | ||
|
||
Nodes marked as **Unschedulable** as per [core/v1/NodeSpec](https://pkg.go.dev/k8s.io/[email protected]/core/v1#NodeSpec) are excluded. | ||
This avoid exposing Unhealthy, NotReady or SchedulingDisabled (cordon) nodes. | ||
|
||
## IPv6 Behavior | ||
|
||
By default, ExternalDNS exposes the IPv6 `InternalIP` of the nodes. To prevent this, you can use the `--no-expose-internal-ipv6` flag. | ||
**The default behavior will change in the next minor release.** ExternalDNS will no longer expose the IPv6 `InternalIP` addresses by default. | ||
You can still explicitly expose the internal ipv6 addresses by using the `--expose-internal-ipv6` flag, if needed. | ||
|
||
### Example spec (without exposing IPv6 `InternalIP` addresses) | ||
|
||
```yaml | ||
spec: | ||
serviceAccountName: external-dns | ||
containers: | ||
- name: external-dns | ||
image: registry.k8s.io/external-dns/external-dns:v0.16.1 # update this to the desired external-dns version | ||
args: | ||
- --source=node # will use nodes as source | ||
- --provider=aws | ||
- --zone-name-filter=external-dns-test.my-org.com # will make ExternalDNS see only the hosted zones matching provided domain, omit to process all available hosted zones | ||
- --domain-filter=external-dns-test.my-org.com | ||
- --aws-zone-type=public | ||
- --registry=txt | ||
- --fqdn-template={{.Name}}.external-dns-test.my-org.com | ||
- --txt-owner-id=my-identifier | ||
- --policy=sync | ||
- --log-level=debug | ||
- --no-expose-internal-ipv6 | ||
``` | ||
|
||
## Manifest (for cluster without RBAC enabled) | ||
|
||
```yaml | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.