Welcome to the Linux Foundation Forum!

Uppercase not allowed in metadata.names

Hi, I hit the following error everytime a resource has Uppercase in its name.
I understand it is meaningful.
Is this specific to a kubectl version?

If not, can we change the ones in the examples to conform to the requirement.

[email protected]:~$ kubectl apply -f secret.yaml
The Secret "LF-secret" is invalid: metadata.name: Invalid value: "LF-secret": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')

Comments

  • chrispokorni
    chrispokorni Posts: 1,131

    Hi @ganeshahv,

    You can always modify the examples to fit the ever-changing requirements of Kubernetes.
    The regex validation rule specifies that the value should start with a lower case, so you could use lf-secret instead.

    Regards,
    -Chris

Categories

Upcoming Training