Skip to content

Commit 023db16

Browse files
authored
Merge pull request #31518 from mtardy/main
Add warning for creating namespaces with the same name as public TLDs
2 parents 32bd772 + 61174c4 commit 023db16

File tree

1 file changed

+15
-0
lines changed
  • content/en/docs/concepts/overview/working-with-objects

1 file changed

+15
-0
lines changed

content/en/docs/concepts/overview/working-with-objects/namespaces.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,21 @@ across namespaces, you need to use the fully qualified domain name (FQDN).
101101
As a result, all namespace names must be valid
102102
[RFC 1123 DNS labels](/docs/concepts/overview/working-with-objects/names/#dns-label-names).
103103

104+
{{< warning >}}
105+
By creating namespaces with the same name as [public top-level
106+
domains](https://data.iana.org/TLD/tlds-alpha-by-domain.txt), Services in these
107+
namespaces can have short DNS names that overlap with public DNS records.
108+
Workloads from any namespace performing a DNS lookup without a [trailing dot](https://datatracker.ietf.org/doc/html/rfc1034#page-8) will
109+
be redirected to those services, taking precedence over public DNS.
110+
111+
To mitigate this, limit privileges for creating namespaces to trusted users. If
112+
required, you could additionally configure third-party security controls, such
113+
as [admission
114+
webhooks](/docs/reference/access-authn-authz/extensible-admission-controllers/),
115+
to block creating any namespace with the name of [public
116+
TLDs](https://data.iana.org/TLD/tlds-alpha-by-domain.txt).
117+
{{< /warning >}}
118+
104119
## Not All Objects are in a Namespace
105120

106121
Most Kubernetes resources (e.g. pods, services, replication controllers, and others) are

0 commit comments

Comments
 (0)