Harvester1.0.1创建Ubuntu20.04出现spec.template.spec.hostname does not conform to the kubernetes DNS_LABEL rules

问题描述:


admission webhook “virtualmachine-validator.kubevirt.io” denied the request: spec.template.spec.hostname does not conform to the kubernetes DNS_LABEL rules :
a lowercase RFC 1123 label must consist of lower case alphanumeric characters or ‘-’,
and must start and end with an alphanumeric character (e.g. ‘my-name’, or ‘123-abc’, regex used for validation is ‘a-z0-9?’)

预期结果:
使用Harvester1.0.1创建Ubuntu20.04成功

环境信息:

  • Harvester ISO 版本: harvester-v1.0.1-amd64.iso
  • 底层基础设施:VMware Workstation

应该是你的 Name 中有不支持的特殊字符,比如 .

vm中的hostname 如果没有特别指定,那么用的就是vm的name, 而你这个name是不合法的。