apache-spark - io.fabric8.kubernetes.client.KubernetesClientException 消息:无法解析需求:标签值无效
问题描述
在使用 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={}).
解决方案
因为你的标签上有一个$
标志com.admin.SparkPi$
。你需要摆脱它。
可能您的应用程序正在根据某些名称、变量或任何其他参数提供标签。可能在其他情况下这不是问题,但在 Kubernetes 中却是。
推荐阅读
- python - 使用 xmpppy 添加到名册?
- python - CNN 预测来自测试集,但不是自己的图像
- python - 使用 Stompest Python 在 ActiveMQ 上创建订阅时出错
- vcpkg - 如何更新 vcpkg 本身?
- javascript - Javascript:为什么在点击时 img 会调整大小?
- python - PYTHON TKINTER > e = Entry() > e.bind('
', 功能) - php - Symfony 5.2:使用表单事件在动态修改表单中传递参数的问题
- rust - 'a:'a 在通用生命周期参数中的含义是什么?
- python-3.x - Seaborn 子图 x 轴未正确显示
- android - 如何获取 Android Material TextInputLayout startIcon View?