创建部署问题时,请参考下面模板,你提供的信息越多,越容易及时获得解答。如果未按模板创建问题,管理员有权关闭问题。
确保帖子格式清晰易读,用 markdown code block 语法格式化代码块。
你只花一分钟创建的问题,不能指望别人花上半个小时给你解答。
操作系统信息
虚拟机,Ubuntu18.04,4C/8G
Kubernetes版本信息
Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.5", GitCommit:"6b1d87acf3c8253c123756b9e61dac642678305f", GitTreeState:"clean", BuildDate:"2021-03-18T01:10:43Z", GoVersion:"go1.15.8", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.3", GitCommit:"ca643a4d1f7bfe34773c74f79527be4afd95bf39", GitTreeState:"clean", BuildDate:"2021-07-15T20:59:07Z", GoVersion:"go1.16.6", Compiler:"gc", Platform:"linux/amd64"}
问题是什么
错误截图
错误日志
**************************************************
Waiting for all tasks to be completed ...
task openpitrix status is successful (1/4)
task multicluster status is successful (2/4)
task network status is successful (3/4)
task monitoring status is failed (4/4)
**************************************************
Collecting installation results ...
Task 'monitoring' failed:
******************************************************************************************************************************************************
{
"counter": 80,
"created": "2022-06-27T12:42:48.108137",
"end_line": 77,
"event": "runner_on_failed",
"event_data": {
"duration": 28.978945,
"end": "2022-06-27T12:42:48.108025",
"event_loop": null,
"host": "localhost",
"ignore_errors": null,
"play": "localhost",
"play_pattern": "localhost",
"play_uuid": "2a36bf7d-5ab7-2324-d351-000000000005",
"playbook": "/kubesphere/playbooks/monitoring.yaml",
"playbook_uuid": "7e5ea210-cb5e-40fa-96bd-60f849372e9c",
"remote_addr": "127.0.0.1",
"res": {
"changed": true,
"msg": "All items completed",
"results": [
{
"_ansible_item_label": "/kubesphere/kubesphere/prometheus/prometheus-operator/prometheus-operator-0prometheusCustomResourceDefinition.yaml",
"_ansible_no_log": false,
"ansible_loop_var": "item",
"attempts": 5,
"changed": true,
"cmd": "/usr/local/bin/kubectl apply -f /kubesphere/kubesphere/prometheus/prometheus-operator/prometheus-operator-0prometheusCustomResourceDefinition.yaml --force || /usr/local/bin/kubectl apply -f /kubesphere/kubesphere/prometheus/prometheus-operator/prometheus-operator-0prometheusCustomResourceDefinition.yaml --force-conflicts --server-side",
"delta": "0:00:00.927727",
"end": "2022-06-27 20:42:42.340800",
"failed": true,
"failed_when_result": true,
"invocation": {
"module_args": {
"_raw_params": "/usr/local/bin/kubectl apply -f /kubesphere/kubesphere/prometheus/prometheus-operator/prometheus-operator-0prometheusCustomResourceDefinition.yaml --force || /usr/local/bin/kubectl apply -f /kubesphere/kubesphere/prometheus/prometheus-operator/prometheus-operator-0prometheusCustomResourceDefinition.yaml --force-conflicts --server-side",
"_uses_shell": true,
"argv": null,
"chdir": null,
"creates": null,
"executable": null,
"removes": null,
"stdin": null,
"stdin_add_newline": true,
"strip_empty_ends": true,
"warn": true
}
},
"item": "/kubesphere/kubesphere/prometheus/prometheus-operator/prometheus-operator-0prometheusCustomResourceDefinition.yaml",
"msg": "non-zero return code",
"rc": 1,
"start": "2022-06-27 20:42:41.413073",
"stderr": "The CustomResourceDefinition \"prometheuses.monitoring.coreos.com\" is invalid: metadata.annotations: Too long: must have at most 262144 bytes\nerror: Server-side apply not available on the server: (415: Unsupported Media Type)",
"stderr_lines": [
"The CustomResourceDefinition \"prometheuses.monitoring.coreos.com\" is invalid: metadata.annotations: Too long: must have at most 262144 bytes",
"error: Server-side apply not available on the server: (415: Unsupported Media Type)"
],
"stdout": "",
"stdout_lines": []
},