Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

kubernetes label name 63 character limit

Tags:

kubernetes

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.

like image 897
Prateek Jain Avatar asked May 18 '18 13:05

Prateek Jain


People also ask

What is a label in Kubernetes?

Kubernetes labels are key-value pairs that can connect identifying metadata with Kubernetes objects. Kubernetes offers integrated support for using these labels to query objects and perform bulk operations on selected subsets.

What is difference between labels and selectors in Kubernetes?

Labels are properties that we can attach to each item for example for their type, kind, and so on. Selectors help us in finding these items. You can think of a selector as a filter. We could label pods based on some attributes i.e. app name, front-end, back-end.


1 Answers

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.

like image 133
2 revs Avatar answered Sep 28 '22 03:09

2 revs