Ishan Datt
Ishan Datt

Reputation: 29

ISTIO service mesh for internal kube services

I am new to istio and was trying to set it up.

I have a question though: Is istio only meant for traffic coming in to the kube cluster via ingress or can it be used to communicate with services running inside the same kube cluster?

Sorry if it is a noob question, but i am unable to find it anywhere else. Any pointer would be greatly appreciated.

Here is what i have: 1. 2 different versions of a service deployed on the istio mesh:

kubectl get pods -n turbo -l component=rhea
NAME                                READY   STATUS    RESTARTS   AGE
rhea-api-istio-1-58b957dd4b-cdn54   2/2     Running   0          46h
rhea-api-istio-2-5787d4ffd4-bfwwk   2/2     Running   0          46h
  1. Another service deployed on the istio mesh:
kubectl get pods -n saudagar | grep readonly
saudagar-readonly-7d75c5c7d6-zvhz9   2/2     Running   0          5d
  1. I have a kube service defined like:
apiVersion: v1
kind: Service
metadata:
  name: rhea
  labels:
    component: rhea
  namespace: turbo
spec:
  selector:
    component: rhea
  ports:
  - port: 80
    targetPort: 3000
    protocol: TCP
  1. Destination rules:
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: rhea
spec:
  host: rhea
  subsets:
  - name: v1
    labels:
      app: rhea-api-istio-1
  - name: v2
    labels:
      app: rhea-api-istio-2
  1. A virtual service like:
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: rhea
  namespace: turbo
spec:
  hosts:
  - rhea
  http:
  - route:
    - destination:
        host: rhea
        subset: v1

What i am trying to test is circuit breaking, between rhea and saudagar, and traffic routing over the 2 versions of the service.

I want to test this from inside the same kube cluster. I am not able to achieve this. If i want to access rhea service from the saudagar service, what endpoint should i use so that i can see the traffic routing policy applied?

Upvotes: 0

Views: 510

Answers (1)

Vadim Eisenberg
Vadim Eisenberg

Reputation: 3427

Istio can be used for controlling ingress traffic (from outside into the cluster), for controlling in-cluster traffic (between services inside the cluster) and for controlling egress traffic (from the services inside the cluster to services outside the cluster).

Upvotes: 0

Related Questions