kiali: Kiali cannot get prometheus data when prometheus enable https
From kiali document:
prometheus_service_url The URL used to access and query the Prometheus Server. It must be accessible from Kiali pod. (default is http://prometheus.istio-system:9090)
When I configured prometheus_service_url=https://prometheus.istio-system:9090, the kiali cannot collect prometheus data and there has exception thrown from kiali pod
E0117 09:47:28.726655 1 graph.go:853] Get https://prometheus.istio-system:9090/api/v1/query?query=round%28sum%28rate%28istio_requests_total%7Breporter%3D%22destination%22%2Csource_workload%3D%22unknown%22%2Cdestination_service_namespace%3D%22cert-manager%22%2Cresponse_code%3D~%22%5B2345%5D%5B0-9%5D%5B0-9%5D%22%7D+%5B60s%5D%29%29+by+%28source_workload_namespace%2Csource_workload%2Csource_app%2Csource_version%2Cdestination_service_namespace%2Cdestination_service_name%2Cdestination_workload%2Cdestination_app%2Cdestination_version%2Cresponse_code%29%2C0.001%29&time=2019-01-17T09%3A47%3A28Z: x509: certificate signed by unknown authority: goroutine 21 [running]:
runtime/debug.Stack(0xc42063a280, 0x26e, 0xc42069c3a0)
/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
github.com/kiali/kiali/handlers.handlePanic(0x192a100, 0xc4206e8b60)
/root/go/src/github.com/kiali/kiali/handlers/graph.go:853 +0xa6
panic(0x1005f20, 0xc42069c3a0)
/usr/local/go/src/runtime/panic.go:491 +0x283
github.com/kiali/kiali/handlers.checkError(0x1913d80, 0xc42026c900)
/root/go/src/github.com/kiali/kiali/handlers/graph.go:836 +0xaa
github.com/kiali/kiali/handlers.promQuery(0xc42056a900, 0x17a, 0x0, 0xed3d24630, 0x19a1460, 0x1920d80, 0xc420223e10, 0x0, 0x0, 0x0)
/root/go/src/github.com/kiali/kiali/handlers/graph.go:822 +0x468
github.com/kiali/kiali/handlers.buildNamespaceTrafficMap(0xc420678e10, 0xc, 0xc420234d80, 0xc4203b2a80, 0x6, 0x8, 0xdf8475800, 0x0, 0xc420121000, 0xb, ...)
/root/go/src/github.com/kiali/kiali/handlers/graph.go:166 +0x2be
github.com/kiali/kiali/handlers.graphNamespaces(0xc420234d80, 0xc4203b2a80, 0x6, 0x8, 0xdf8475800, 0x0, 0xc420121000, 0xb, 0x10, 0x0, ...)
/root/go/src/github.com/kiali/kiali/handlers/graph.go:86 +0x38d
github.com/kiali/kiali/handlers.graphNamespace(0x192a100, 0xc4206e8b60, 0xc420120700, 0xc4208db530)
/root/go/src/github.com/kiali/kiali/handlers/graph.go:70 +0xb1
Can we support this feature?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (5 by maintainers)
@clyang82 I’m closing this issue because #1112 has been merge and Kiali can now accept self-signed certificates. Fix will be available when version 0.21 is released.