kiali must be in istio's namespace

170 views
Skip to first unread message

John Mazzitelli

unread,
Jun 12, 2018, 5:10:57 PM6/12/18
to kiali-dev
FWIW: Kiali canNOT be deployed in another namespace. It has to be with Istio in istio-system.

I just tried to deploy Kiali to myproject namespace and got an error trying to query Prom:

Cannot load the graph: Get http://prometheus:9090/api/v1/query?query=round%28sum%28rate%28istio_request_count%7Bsource_service%21~%22.%2A%5C%5C.default%5C%5C..%2A%22%2Cdestination_service%3D~%22.%2A%5C%5C.default%5C%5C..%2A%22%2Cresponse_code%3D~%22%5B2345%5D%5B0-9%5D%5B0-9%5D%22%7D+%5B60s%5D%29%29+by+%28source_service%29%2C0.001%29&time=2018-06-12T21%3A06%3A39Z: dial tcp: lookup prometheus on 172.30.0.1:53: server misbehaving

Which makes sense - we are trying to go to the "prometheus" service - we don't have a route to get to it from outside the namespace.

Perhaps there is some Kiali config in the configmap (or env var) we can override to fix this (assuming Prom is available from another namespace) - but I don't know what else would break.

In any case, the point is out-of-box the default behavior is that Kiali must be in the same namespace as Istio.

Caina Costa

unread,
Jun 12, 2018, 8:53:58 PM6/12/18
to John Mazzitelli, kiali-dev
What if we do use the fqdn for the service instead of only the service name (like `service.namespace.svc.cluster.local`)? It should be accessible inside the cluster even on a different namespace.


--
You received this message because you are subscribed to the Google Groups "kiali-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kiali-dev+unsubscribe@googlegroups.com.
To post to this group, send email to kial...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kiali-dev/1451848669.26110538.1528837856172.JavaMail.zimbra%40redhat.com.
For more options, visit https://groups.google.com/d/optout.

Kevin Conner

unread,
Jun 12, 2018, 11:40:18 PM6/12/18
to Caina Costa, John Mazzitelli, kiali-dev
On 12 June 2018 at 19:53, Caina Costa <cac...@redhat.com> wrote:
What if we do use the fqdn for the service instead of only the service name (like `service.namespace.svc.cluster.local`)? It should be accessible inside the cluster even on a different namespace.

You should be able to get away with service.namespace, I don't think you need the FQDN.

   Kev

Lucas Ponce

unread,
Jun 13, 2018, 3:11:21 AM6/13/18
to John Mazzitelli, kiali-dev
I think it will simplify things if we assume as pre-requisite to install Kiali in namespace as Istio.

Perhaps, networking issues is something potentially fixed and it could work, but I don't see the rationale to introduce more complexity.

I.e. perhaps also istio could work if prometheus is installed in a different namespace, it could be a discussion in the future, but in terms of timeline, today I don't see it a priority. I think with kiali we have same scenario.

Joel Takvorian

unread,
Jun 13, 2018, 3:42:26 AM6/13/18
to John Mazzitelli, kiali-dev

Perhaps there is some Kiali config in the configmap (or env var) we can override to fix this (assuming Prom is available from another namespace) - but I don't know what else would break.

Mazz, indeed, you can override the Prometheus URL in the config yaml: 
external_services:
  prometheus_service_url: VALUE

But as Kevin said if we can generalize using service.namespace it's even better.

Heiko W. Rupp

unread,
Jun 13, 2018, 3:52:13 AM6/13/18
to kiali-dev
On 13 Jun 2018, at 9:11, Lucas Ponce wrote:

> I.e. perhaps also istio could work if prometheus is installed in a

Actually - is there a way to query Istio (or its config) where it expects
Prometheus and Jaeger and use this?

Juraci Paixão Kröhling

unread,
Jun 13, 2018, 4:56:18 AM6/13/18
to kiali-dev
On Tue, 2018-06-12 at 17:10 -0400, John Mazzitelli wrote:
> Which makes sense - we are trying to go to the "prometheus" service -
> we don't have a route to get to it from outside the namespace.

Not sure if you mean this in Kiali's specific case, or in a more
general case. In general, it's certainly possible to access services
from another namespace:

https://kubernetes.io/docs/concepts/services-networking/dns-pod-service

Quote:
Assume a Service named foo in the Kubernetes namespace bar. A Pod
running in namespace bar can look up this service by simply doing a DNS
query for foo. A Pod running in namespace quux can look up this service
by doing a DNS query for foo.bar.

Note:
IIRC, OpenShift has inter-namespace connectivity disabled by default,
as it assumes each namespace is a tenant, so, one tenant cannot access
resources from another tenant.

- Juca.

Simon Pasquier

unread,
Jun 13, 2018, 5:56:14 AM6/13/18
to Juraci Paixão Kröhling, kiali-dev
Correct when using the ovs-multitenant plugin [1]. It is still possible to allow access from one project to all projects [2].
For "oc cluster up" deployments, there's no isolation though.

 

- Juca.


--
You received this message because you are subscribed to the Google Groups "kiali-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kiali-dev+unsubscribe@googlegroups.com.
To post to this group, send email to kial...@googlegroups.com.

Joel Takvorian

unread,
Jun 13, 2018, 7:45:00 AM6/13/18
to Simon Pasquier, Juraci Paixão Kröhling, kiali-dev
I created this ticket: https://issues.jboss.org/browse/KIALI-947

It would fix the url for prometheus. Then maybe we'll have other issues beyond that, while fetching kube/istio apis

Reply all
Reply to author
Forward
0 new messages