Skip to content

Commit 0a5bab0

Browse files
docs: Fix RFC 1123 label names documentation
Correct RFC 1123 label names to require starting with alphabetic character to match the actual Kubernetes implementation regex [a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?. Add note about RelaxedServiceNameValidation feature gate exception for Services. Update explanation of RFC differences to reflect actual implementation where both RFC 1035 and RFC 1123 require starting with alphabetic characters, with the exception being the RelaxedServiceNameValidation feature gate for Service objects. This addresses issue 52578. Signed-off-by: srikanth-s2003 <[email protected]>
1 parent bbfd147 commit 0a5bab0

File tree

1 file changed

+10
-5
lines changed
  • content/en/docs/concepts/overview/working-with-objects

1 file changed

+10
-5
lines changed

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,14 @@ This means the name must:
5959

6060
- contain at most 63 characters
6161
- contain only lowercase alphanumeric characters or '-'
62-
- start with an alphanumeric character
62+
- start with an alphabetic character
6363
- end with an alphanumeric character
6464

65+
{{< note >}}
66+
When the `RelaxedServiceNameValidation` feature gate is enabled,
67+
Service object names are allowed to start with a digit.
68+
{{< /note >}}
69+
6570
### RFC 1035 Label Names
6671

6772
Some resource types require their names to follow the DNS
@@ -74,10 +79,10 @@ This means the name must:
7479
- end with an alphanumeric character
7580

7681
{{< note >}}
77-
The only difference between the RFC 1035 and RFC 1123
78-
label standards is that RFC 1123 labels are allowed to
79-
start with a digit, whereas RFC 1035 labels can start
80-
with a lowercase alphabetic character only.
82+
While RFC 1123 technically allows labels to start with digits, the current
83+
Kubernetes implementation requires both RFC 1035 and RFC 1123 labels to start
84+
with an alphabetic character. The exception is when the `RelaxedServiceNameValidation`
85+
feature gate is enabled for Service objects, which allows Service names to start with digits.
8186
{{< /note >}}
8287

8388
### Path Segment Names

0 commit comments

Comments
 (0)