Closed shanshanying closed 2 days ago
dup with #6312
The root cause is : service name in K8s cannot starts with numers. https://github.com/kubernetes/kubernetes/issues/96147
And according the source code of K8s, we found service names must obey rule: DNS1035Lable.
// ValidateServiceName can be used to check whether the given service name is valid.
// Prefix indicates this name will be used as part of generation, in which case
// trailing dashes are allowed.
var ValidateServiceName = apimachineryvalidation.NameIsDNS1035Label
While Cluster names only obey rule: DNS1123Lbel.
The key difference between 1135 and 1123 is, the latter can start with an alphanumeric
character, while the former must start with start with an alphabetic
character
proposed solution: to normalize service name to meet the constraint.
This issue has been marked as stale because it has been open for 30 days with no activity
If we create a new cluster named
2-pea-84d556f4d4
, the generated svc name is something like2-pea-84d556f4d4-<componentName>
, fails to meet the validation pattern[a-z]([-a-z0-9]*[a-z0-9])?