Skip to content

部署web-ui使用自带生成prometheus,启动服务报错 #39

@sawchen

Description

@sawchen

报错的容器hami-webui-be-oss日志是无法连接svc http://%s-kube-prometh-prometheus.%s.svc.cluster.local:9090
检查生成的prometheus的svc信息
kubectl get svc -n hami
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
hami-webui ClusterIP 10.109.26.85 3000/TCP,8000/TCP 24m
hami-webui-kube-prometheus-prometheus ClusterIP 10.110.60.126 9090/TCP,8080/TCP 24m
hami-webui-kube-state-metrics ClusterIP 10.108.122.5 8080/TCP 24m
prometheus-operated ClusterIP None 9090/TCP 24m

可知,webui容器配置svc连接名跟生成prometheus是不一样
修改方式hami-webui/templates/configmap.yaml
原来是
prometheus:
address: {{ ternary .Values.externalPrometheus.address (printf "http://%s-kube-prometh-prometheus.%s.svc.cluster.local:9090" (include "hami-webui.fullname" .) (include "hami-webui.namespace" .)) .Values.externalPrometheus.enabled }}
prometheus:
address: {{ ternary .Values.externalPrometheus.address (printf "http://%s-kube-prometheus-prometheus.%s.svc.cluster.local:9090" (include "hami-webui.fullname" .) (include "hami-webui.namespace" .)) .Values.externalPrometheus.enabled }}

重新安装
helm install hami-webui hami-webui -f hami-webui/my-values.yaml --namespace hami

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions