请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

helm install ./prometheus-operator/ --name immoc-prom

helm install ./prometheus-operator/ --name immoc-prom --namespace monitoring
Error: validation failed: [unable to recognize “”: no matches for kind “Alertmanager” in version “monitoring.coreos.com/v1”, unable to recognize “”: no matches for kind “Prometheus” in version “monitoring.coreos.com/v1”, unable to recognize “”: no matches for kind “PrometheusRule” in version “monitoring.coreos.com/v1”, unable to recognize “”: no matches for kind “PrometheusRule” in version “monitoring.coreos.com/v1”, unable to recognize “”: no matches for kind “PrometheusRule” in version “monitoring.coreos.com/v1”, unable to recognize “”: no matches for kind “PrometheusRule” in version “monitoring.coreos.com/v1”, unable to recognize “”: no matches for kind “PrometheusRule” in version “monitoring.coreos.com/v1”, unable to recognize “”: no matches for kind “PrometheusRule” in version “monitoring.coreos.com/v1”,


直接用了老师的./prometheus-operator/文件,还是报这个错,有什么办法可以解决么?

正在回答

2回答

你好,这个错误是找不到crd。kubectl get crd 看看,不行的话尝试手动创建一下(把配置中的crd拿出来单独apply)

0 回复 有任何疑惑可以回复我~
  • 提问者 Tony3721 #1
    非常感谢!
    回复 有任何疑惑可以回复我~ 2020-03-20 18:21:43
提问者 Tony3721 2020-03-20 18:12:34

https://github.com/helm/charts/blob/6abcbe46b84079b5557a672bb8720c0d6b72e943/stable/prometheus-operator/README.md

谢谢老师答复!我按github方法,手动建crd, 然后 

helm install ./prometheus-operator/ --name immoc-prom  --namespace monitoring --set prometheusOperator.createCustomResource=false

创建好了prometheus, 但时有一个pod一直起不来,describe pod显示错误信息如下:

 kubectl describe pod prometheus-immoc-prom-prometheus-oper-prometheus-0 -n monitoring    

 Warning  FailedMount  4h47m (x18 over 5h7m)    kubelet, 172.16.208.103  MountVolume.SetUp failed for volume "secret-etcd-certs" : secret "etcd-certs" not found

  Warning  FailedMount  4h45m (x10 over 5h5m)    kubelet, 172.16.208.103  Unable to mount volumes for pod "prometheus-immoc-prom-prometheus-oper-prometheus-0_monitoring(0924ebbc-6a88-11ea-afc9-000c29b83d76)": timeout expired waiting for volumes to attach or mount for pod "monitoring"/"prometheus-immoc-prom-prometheus-oper-prometheus-0". list of unmounted volumes=[secret-etcd-certs]. list of unattached volumes=[config config-out prometheus-immoc-prom-prometheus-oper-prometheus-rulefiles-0 secret-etcd-certs prometheus-immoc-prom-prometheus-oper-prometheus-db immoc-prom-prometheus-oper-prometheus-token-xjllj]


这个etcd-certs错误,我试了

kubectl -nmonitoring create secret generic etcd-certs --from-file=./etcd.pem --from-file=./etcd-key.pem  创建secret,但还不行

不知道老师有没有遇到过类似问题,有办法解决不?

0 回复 有任何疑惑可以回复我~
  • 确实有一个同学也提过同样的问题,最后没有回复如何解决的。参考一下这个:https://blog.csdn.net/u011933777/article/details/102722700
    注意是在kube-system命名空间。如果解决了这个问题最好能简单总结一下,然后我放到FAQ里供大家参考哈。感谢!
    回复 有任何疑惑可以回复我~ 2020-03-21 08:15:54
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信