Prateek Jain
Prateek Jain

Reputation: 3075

kubernetes label name 63 character limit

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.

Upvotes: 30

Views: 50889

Answers (2)

Suresh Vishnoi
Suresh Vishnoi

Reputation: 18383

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

Upvotes: 6

Nick Rak
Nick Rak

Reputation: 2720

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.

Upvotes: 22

Related Questions