Skip to content

question about virtual services #7

@Karnich

Description

@Karnich

Hi Stefan

I hope you could answer my question. It is not directly an issue with your repository, but im following a lot of your guides and need some help >.<

If i have a service in the default namespace that wants to reach a service in another namespace.. i use <name>.<namespace>.svc.cluster.local
but if i wanna split that traffic between two services using weight: i have the following VS in the default namespace:

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: backend
  namespace: default
spec:
  hosts:
  - backend
  http:
  - route:
    - destination:
        host: backend.mynamespace.svc.cluster.local
      weight: 50
  - route:
    - destination:
        host: backend-management.mynamespace.svc.cluster.local
      weight: 50

If my service in default tries to use http://backend:portto access it, it fails
I need the full http://backend.namespace.svc.cluster.local:portfor it to work, but then my traffic is not split?

What am i doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions