Istio service mesh
What is a service mesh?
?Developers and operators face chanllenges with a distributed or microservices architecture in cloud-based applications,?containers?and?microservices ,that triggered the need for a service mesh.
One chanllenge is that each MS has business logic , communication configuration.Another challenge is inside the cluster the MS communicate with each other insecurely with no additional security. if security is needed it has to added to MS logic. More challenges like retry logic and metrics and monitoring , it has to be add their logic to MS itself.
What service mesh offers for service-to-service communication ?
How a service mesh works ?
A service mesh is a dedicated infrastructure layer that controls service-to-service communication over a network. This method enables separate parts of an application to communicate with each other.
A service mesh architecture uses a proxy instance called a?sidecar?attaches to each service. In a container, the sidecar attaches to each application container,?VM?or container orchestration unit, such as a Kubernetes pod.
What is Istio?
Istio is an open source service mesh that layers transparently onto existing distributed applications. Service mesh is a paradaism and istio is one of its implementations.
Istio Architecture :
Envoy
Istiod
Istiod provides:
Istio Ingress Gateway
The entry point to you cluster . it asn alternative to ngnix ingress controller and it runs as apod in the cluster and acts as a Load balancer.
it accepts traffic in cluster then redirect traffice to MS. It can be configured using CRDs as well.
领英推荐
Putting it all Together
Traffic flow
Hand on experience : Istio on local K8 cluster overview
Useful commands
minikube start --cpus 6 --memory 8192
https://istio.io/latest/docs/setup/getting-started/#download
cd <<istio_installation_folder>>
istioctl install
kubectl get ns
kubectl get pod -n istio-system
Kubectl get svc -n istio-system
kubectl label namespace default istio-injection=enabled
kubectl get ns default --show-labels
References:
[1] https://istio.io/latest/about/service-mesh/
[2] https://www.techtarget.com/searchitoperations/definition/service-mesh
[3] https://konghq.com/learning-center/service-mesh/what-is-a-service-mesh
[4] https://www.youtube.com/watch?v=voAyroDb6xk&t=1317s