创建部署问题时,请参考下面模板,你提供的信息越多,越容易及时获得解答。
你只花一分钟创建的问题,不能指望别人花上半个小时给你解答。
发帖前请点击 发表主题 右边的 预览(👀) 按钮,确保帖子格式正确。
操作系统信息
实体机 CentOS7 6C/15G
Kubernetes版本信息
v1.19.3,3个节点,3个master,3个node
容器运行时
docker 20.10.12
KubeSphere版本信息
v3.3.1,在已有的k8s上最小化安装,参考https://kubesphere.io/zh/docs/v3.3/quick-start/minimal-kubesphere-on-k8s/
问题是什么
报错日志是什么,最好有截图。
已有k8s安装的prometheus

kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.3.1/kubesphere-installer.yaml
wget https://github.com/kubesphere/ks-installer/releases/download/v3.3.1/cluster-configuration.yaml
修改cluster-configuration.yaml中monitoring部分

检查安装日志:
kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l ‘app in (ks-install, ks-installer)’ -o jsonpath=‘{.items[0].metadata.name}’) -f
报错如下:
PLAY RECAP *********************************************************************
localhost : ok=29 changed=16 unreachable=0 failed=0 skipped=16 rescued=0 ignored=0
Start installing monitoring
Start installing multicluster
Start installing openpitrix
Start installing network
Start installing alerting
**************************************************
Waiting for all tasks to be completed ...
task openpitrix status is successful (1/5)
task network status is successful (2/5)
task alerting status is successful (3/5)
task multicluster status is successful (4/5)
task monitoring status is failed (5/5)
**************************************************
Collecting installation results ...
Task 'monitoring' failed:
******************************************************************************************************************************************************
{
"counter": 164,
"created": "2023-01-06T10:56:09.700265",
"end_line": 156,
"event": "runner_on_failed",
"event_data": {
"duration": 1.230652,
"end": "2023-01-06T10:56:09.699989",
"event_loop": null,
"host": "localhost",
"ignore_errors": null,
"play": "localhost",
"play_pattern": "localhost",
"play_uuid": "5adc12e8-e66d-6acc-8532-000000000005",
"playbook": "/kubesphere/playbooks/monitoring.yaml",
"playbook_uuid": "191e646f-067b-4459-8ba1-42aa775a5ef1",
"remote_addr": "127.0.0.1",
"res": {
"_ansible_no_log": false,
"changed": true,
"cmd": "/usr/local/bin/kubectl apply -f /kubesphere/kubesphere/prometheus/thanos-ruler\n",
"delta": "0:00:00.513536",
"end": "2023-01-06 18:56:09.586729",
"invocation": {
"module_args": {
"_raw_params": "/usr/local/bin/kubectl apply -f /kubesphere/kubesphere/prometheus/thanos-ruler\n",
"_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
}
},
"msg": "non-zero return code",
"rc": 1,
"start": "2023-01-06 18:56:09.073193",
"stderr": "error: the path \"/kubesphere/kubesphere/prometheus/thanos-ruler\" does not exist",
"stderr_lines": [
"error: the path \"/kubesphere/kubesphere/prometheus/thanos-ruler\" does not exist"
],
"stdout": "",
"stdout_lines": []
},
"resolved_action": "command",
"role": "ks-monitor",
"start": "2023-01-06T10:56:08.469337",
"task": "Monitoring | Installing thanosruler",
"task_action": "command",
"task_args": "",
"task_path": "/kubesphere/installer/roles/ks-monitor/tasks/thanos-ruler.yaml:2",
"task_uuid": "5adc12e8-e66d-6acc-8532-000000000072",
"uuid": "7a43b882-8b3c-46e1-bd02-81d555e2de1d"
},
"parent_uuid": "5adc12e8-e66d-6acc-8532-000000000072",
"pid": 12467,
"runner_ident": "monitoring",
"start_line": 155,
"stdout": "fatal: [localhost]: FAILED! => {\"changed\": true, \"cmd\": \"/usr/local/bin/kubectl apply -f /kubesphere/kubesphere/prometheus/thanos-ruler\\n\", \"delta\": \"0:00:00.513536\", \"end\": \"2023-01-06 18:56:09.586729\", \"msg\": \"non-zero return code\", \"rc\": 1, \"start\": \"2023-01-06 18:56:09.073193\", \"stderr\": \"error: the path \\\"/kubesphere/kubesphere/prometheus/thanos-ruler\\\" does not exist\", \"stderr_lines\": [\"error: the path \\\"/kubesphere/kubesphere/prometheus/thanos-ruler\\\" does not exist\"], \"stdout\": \"\", \"stdout_lines\": []}",
"uuid": "7a43b882-8b3c-46e1-bd02-81d555e2de1d"
}
查看pod情况


看起来应该是没有找到/kubesphere/kubesphere/prometheus/thanos-ruler,这个目录在哪里?应该怎么解决这个问题,请大佬们指点一下,多谢