Kubernetes Secrets の Secret名とデータキーの制限を調べた時のメモ書き。
内容
Secret名
一意性
name: a string that uniquely identifies this object within the current namespace
metadataにNamespace内で一意であると記載がある。
制限
The name of a Secret object must be a valid DNS subdomain name.
creating-a-secret-using-kubectlに記載がある。
- contain no more than 253 characters
- contain only lowercase alphanumeric characters, ‘-’ or ‘.’
- start with an alphanumeric character
- end with an alphanumeric character
DNS subdomain name とは dns-subdomain-namesにある通り、上記の制限がある。
データキー
The keys of data and stringData must consist of alphanumeric characters, ‘-', ‘_’ or ‘.'.
creating-a-secret-manuallyに記載がある。