Developer · Validator

Kubernetes name validator.

Check an object name against the rules Kubernetes applies. Pick the resource kind or the rule directly. Runs in your browser; nothing is sent anywhere.

Advertisement

Input

Kinds map to the rule stated on that kind's Kubernetes documentation page. For any other kind, choose the rule its docs name.

Result

Enter a name and press Validate.

The four Kubernetes name rules

DNS subdomain (most resource types, for example Pod, Deployment, ConfigMap, Secret): at most 253 characters; lowercase letters, digits, - or .; each dot-separated part starts and ends with a letter or digit.

DNS label, RFC 1123 (for example Namespace, Service, StatefulSet): at most 63 characters; lowercase letters, digits or -; no dots; ends with a letter or digit. The Kubernetes docs say it must start with a letter, while RFC 1123 section 2.1 relaxed host names to allow a leading digit and the Kubernetes validation code accepts one. This tool accepts a leading digit and shows a warning.

DNS label, RFC 1035: same limits, but it must start with a lowercase letter (<letter> [ [ <ldh-str> ] <let-dig> ] in RFC 1035 section 2.3.1).

Path segment name: the name may not be . or .. and may not contain / or %.

Sources: Kubernetes: Object Names and IDs; the apimachinery validation code; RFC 1123 section 2.1; RFC 1035 section 2.3.1.

Frequently asked questions

Why is my uppercase name rejected?

All four Kubernetes DNS-based rules allow lowercase letters only. Convert MyApp to myapp or my-app.

Why do Deployment and Job names still matter as labels?

Their docs allow a DNS subdomain but warn that Pod names and hostnames derived from them can behave unexpectedly, and recommend the stricter DNS label rules for best compatibility. Try the label rule if you want that safety margin.

Does a valid result mean I can create the object?

No. It only means the name is well formed. The name must also be unused for that kind and namespace, and your cluster may add its own policies.

Syntax check only

This tool checks name format only. It cannot tell whether a name already exists in a cluster, and rules can differ by Kubernetes version or resource, so confirm against the documentation for your resource.

Advertisement
Advertisement
Listening…