DEV Community

Cover image for Istio CRD triplet
dejanualex
dejanualex

Posted on

1

Istio CRD triplet

One of the most popular choices among organizations for open-source service mesh is Istio. As a prerequisite is rather important to understand the value of a service mesh.

To make sure traffic management is in place you're going to manage (minimum) these 3 CRDs:

  • Gateway = resource describes how to route traffic from the outside world to your mesh-enabled services, typically used to expose your services to external traffic, such as incoming HTTP requests from outside the mesh.
# list gateways from all namespaces
kubectl get gateways.networking.istio.io -A
Enter fullscreen mode Exit fullscreen mode
  • VirtualService = resource that defines a set of routing rules for traffic sent to a Kubernetes service.
# list virtualservices from all namespaces
kubectl get virtualservices.networking.istio.io -A
Enter fullscreen mode Exit fullscreen mode
  • DestinationRule = resource that defines the policies that apply to traffic after it has been routed through VirtualService
# list destinationrules from all namespaces
kubectl get destinationrules.networking.istio.io -A
Enter fullscreen mode Exit fullscreen mode

When a request comes into the gateway, Istio will use the rules defined in the virtualservice resource to determine which service to route the traffic to. Afterwards the destinationrule applies the policies to traffic intended for the service after routing has occurred.

There're are many other Istio resources, to list them just kubectl api-resources | grep -i istio and if you need to inspect what Istio resource are in the cluster, you can use kubectl get istio-io -A.

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay