无法弄清楚为什么使用spark-submit通过kubernetes部署spark作业时会出现无效的标签值错误。它下面的日志错误表明它看到我的班级名称后面附加了一个美元符号,但我班级名称中没有任何非字母数字的内容。
io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: GET at: http://<...>/labelSelector=spark-app-selector%3Dcom.ibm.ai.admin.SparkPiAdmin$,spark-role%3Dexecutor. Message: unable to parse requirement: invalid label value: "com.admin.SparkPiAdmin$": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?'). Received status: Status(apiVersion=v1, code=400, details=null, kind=Status, message=unable to parse requirement: invalid label value: "com.admin.SparkPi$": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?'), metadata=ListMeta(_continue=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=BadRequest, status=Failure, additionalProperties={}).
答案 0 :(得分:0)
因为标签$
中有一个com.admin.SparkPi$
符号。您需要摆脱它。
您的应用可能基于某些名称,变量或任何其他参数来提供标签。可能在其他情况下这不是问题,但在kubernetes中是一个问题。