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.

  1. ubuntu@ip-172-31-32-211:~$ kubectl apply -f secret.yaml
  2. 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

  • Posts: 2,451

    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

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training