Which kubernetes identifiers have to be at most 63 characters?

1/26/2020

Some kubernetes resources have a length limit of 63 characters (presumably because they need to be valid DNS names). Which are they?

-- AndreKR
kubernetes

1 Answer

1/26/2020

Those are at least:

  • Pod names
  • Service names
  • The name part of a label key
    labels:
      example.com/environment: production                       <-- the string "environment"
  • The label value
    labels:
      example.com/environment: production                       <-- the string "production"
  • The name part of an annotation key
    annotations:
      example.com/image-registry: "https://hub.docker.com/"     <-- the string "image-registry"
  • CronJob names (including 11 automatically appended characters)
-- AndreKR
Source: StackOverflow