kubernetes label name 63 character limit

5/18/2018

As explained at https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ labels name and value have limit of 63 characters. Does anyone know what drives this limit? I am not looking for code condition but the real reason behind choosing this value.

-- Prateek Jain
kubernetes

2 Answers

5/21/2018

As Suresh Vishnoi wrote, it is a global restriction based on RFC-1123.

Here is a simple explanation of this restriction.

There is a commit in Kubernetes which provides the validation of labels' length.

-- Nick Rak
Source: StackOverflow

5/25/2018

Here is design documentation of the kubernetes. The following link provides detail information.

rfc1035/rfc1123 label (DNS_LABEL): An alphanumeric (a-z, and 0-9) string, with a maximum length of 63 characters, with the '-' character allowed anywhere except the first or last character, suitable for use as a hostname or segment in a domain name.

identifiers-and-names-in-kubernetes

-- Suresh Vishnoi
Source: StackOverflow