{"id":74392,"date":"2025-12-10T16:43:19","date_gmt":"2025-12-10T11:13:19","guid":{"rendered":"https:\/\/www.tothenew.com\/blog\/?p=74392"},"modified":"2026-01-27T13:10:17","modified_gmt":"2026-01-27T07:40:17","slug":"kubernetes-deployment-using-istio-service-mesh","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/kubernetes-deployment-using-istio-service-mesh\/","title":{"rendered":"Kubernetes Deployment using Istio Service Mesh"},"content":{"rendered":"<p><strong>Introduction<\/strong><\/p>\n<p>Modern applications need zero-downtime deployments and safe rollouts. Blue-Green Deployment is a classic strategy where two environments (Blue = current version, Green = new version) exist side by side, and traffic is gradually shifted. When paired with Istio Service Mesh, you get powerful traffic management features like routing traffic by percentage making Blue-Green safer and more flexible.<\/p>\n<p>In this post, we\u2019ll walk through how to set up a Blue-Green deployment on Kubernetes using Istio VirtualService to route traffic between versions.<\/p>\n<h2>Problem Statement<\/h2>\n<p>In modern microservices-based applications, deploying a new version of a service without impacting users is a major challenge. Traditional Kubernetes deployments often rely on rolling updates, which still carry risks such as partial outages, unexpected bugs in production, and limited control over traffic distribution. Additionally, without advanced traffic management, it becomes difficult to safely test new versions with a subset of users, instantly roll back faulty releases, or enforce secure service-to-service communication. As application scale and complexity grow, organizations need a more reliable, secure, and controlled deployment strategy that ensures zero downtime, fine-grained traffic routing, and instant rollback capability.<\/p>\n<h2><strong>Why Blue-Green with Istio?<\/strong><\/h2>\n<p>Traditional Blue-Green requires a hard cutover (switch all traffic at once). This can be risky if the new version has hidden issues. Istio enables progressive traffic shifting:<br \/>\nStart with 10% of users on Green.<br \/>\nMonitor metrics (latency, error rate).<br \/>\nGradually increase until Green takes 100%.<br \/>\nRoll back instantly if problems appear.<br \/>\nThis approach reduces deployment risk and improves reliability.<\/p>\n<h1 style=\"text-align: center;\"><\/h1>\n<div id=\"attachment_77005\" style=\"width: 924px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-77005\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-77005\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2025\/12\/image1-1024x272.png\" alt=\"Minikube\" width=\"914\" height=\"243\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2025\/12\/image1-1024x272.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image1-300x80.png 300w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image1-768x204.png 768w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image1-624x166.png 624w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image1.png 1214w\" sizes=\"(max-width: 914px) 100vw, 914px\" \/><p id=\"caption-attachment-77005\" class=\"wp-caption-text\">Minikube<\/p><\/div>\n<h1><\/h1>\n<h2 style=\"text-align: left;\">What is Istio<\/h2>\n<p>Istio\u00a0is\u00a0an open-source implementation of the service mesh\u00a0originally developed by IBM, Google, and Lyft. It can layer transparently onto a distributed application and provide all the benefits of a service mesh like traffic management, security, and observability.<br \/>\nIt\u2019s designed to work with a variety of deployments, like on-premise, cloud-hosted, in Kubernetes containers, and in servicers running on virtual machines. Although\u00a0Istio is platform-neutral, it\u2019s quite often used together with microservices deployed on the Kubernetes platform.<br \/>\nFundamentally, Istio works by deploying an extended version of Envoy as proxies to every microservice as a sidecar.<\/p>\n<h1><\/h1>\n<h2 style=\"text-align: left;\">Understanding Istio Components<\/h2>\n<h3>1. Data Plane<\/h3>\n<p>The data plane of Istio is primarily built on an enhanced version of the Envoy proxy. Envoy is an open-source edge and service proxy that abstracts networking responsibilities away from application code. With Envoy in place, applications communicate only with localhost, remaining completely unaware of the underlying network topology.<br \/>\nAt its core, Envoy operates as a high-performance network proxy at Layer 3 and Layer 4 of the OSI model, using a chain of pluggable network filters to manage connections. In addition, Envoy provides Layer 7 (application-layer) filtering for HTTP-based traffic and offers first-class support for modern protocols such as HTTP\/2 and gRPC.<\/p>\n<p>Most of Istio\u2019s service mesh capabilities are directly powered by Envoy\u2019s built-in features:<\/p>\n<ul>\n<li>Traffic Control: Envoy enables fine-grained traffic management through advanced routing rules for HTTP, gRPC, WebSocket, and TCP traffic.<\/li>\n<li>Network Resiliency: It provides native support for automatic retries, circuit breaking, timeouts, and fault injection.<\/li>\n<li>Security: Envoy enforces security policies, implements access control, and supports rate limiting for secure service-to-service communication.<\/li>\n<\/ul>\n<p>Another key strength of Envoy is its extensibility. It offers a flexible extension model based on WebAssembly (Wasm), which enables custom policy enforcement and advanced telemetry generation. Additionally, Istio further extends Envoy using Istio-specific extensions built on the Proxy-Wasm sandbox API, making it highly adaptable for advanced use cases.<\/p>\n<h3>2. Control Plane<\/h3>\n<p>As discussed earlier, the control plane in Istio is responsible for managing and configuring the Envoy proxies that form the data plane. This responsibility is handled by istiod, which translates high-level traffic management and routing rules into Envoy-specific configurations and dynamically distributes them to the sidecar proxies at runtime.<\/p>\n<p>In earlier versions of Istio, the control plane architecture consisted of multiple independent components working together. These included Pilot for service discovery and traffic management, Galley for configuration validation, Citadel for certificate generation, and Mixer for policy enforcement and telemetry. Over time, to reduce operational complexity and improve maintainability, these separate components were consolidated into a single unified component known as istiod.<\/p>\n<p>Despite this unification, istiod continues to use the same core code and APIs that powered the original components. For example, the functionality previously handled by Pilot still abstracts platform-specific service discovery mechanisms and converts them into a standardized format that Envoy sidecars can consume. This enables Istio to support multiple environments, such as Kubernetes and virtual machines.<\/p>\n<p>In addition to traffic management, istiod also provides strong security capabilities. It enables secure service-to-service and end-user authentication through built-in identity and credential management. Istiod can enforce security policies based on service identity and also functions as a Certificate Authority (CA). By issuing and managing certificates, it enables mutual TLS (mTLS) communication across the data plane, ensuring encrypted and authenticated traffic between services.<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_77006\" style=\"width: 953px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-77006\" decoding=\"async\" loading=\"lazy\" class=\" wp-image-77006\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2025\/12\/image2-1024x733.png\" alt=\"Architecture - Istio Components\" width=\"943\" height=\"675\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2025\/12\/image2-1024x733.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image2-300x215.png 300w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image2-768x549.png 768w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image2-624x446.png 624w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image2.png 1072w\" sizes=\"(max-width: 943px) 100vw, 943px\" \/><p id=\"caption-attachment-77006\" class=\"wp-caption-text\">Architecture &#8211; Istio Components<\/p><\/div>\n<h2 style=\"text-align: left;\">Setup and Step By Step Process<\/h2>\n<ol>\n<li><strong>Installing Minikube and istioctl<\/strong>\n<p>$ sudo snap install minikube &#8211;classic<br \/>\n$ curl -L https:\/\/istio.io\/downloadIstio | sh &#8211;<br \/>\n$ cd istio-*<br \/>\n$ sudo mv bin\/istioctl \/usr\/local\/bin\/<\/p>\n<p>Then Next step &gt;<\/li>\n<\/ol>\n<div id=\"attachment_77007\" style=\"width: 962px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-77007\" decoding=\"async\" loading=\"lazy\" class=\" wp-image-77007\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2025\/12\/image3-1024x521.png\" alt=\"istioctl\" width=\"952\" height=\"484\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2025\/12\/image3-1024x521.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image3-300x153.png 300w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image3-768x391.png 768w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image3-624x317.png 624w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image3.png 1264w\" sizes=\"(max-width: 952px) 100vw, 952px\" \/><p id=\"caption-attachment-77007\" class=\"wp-caption-text\">istioctl<\/p><\/div>\n<p style=\"padding-left: 40px;\">Label your Namespace &gt;<\/p>\n<div id=\"attachment_77008\" style=\"width: 947px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-77008\" decoding=\"async\" loading=\"lazy\" class=\" wp-image-77008\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2025\/12\/image4-1024x79.png\" alt=\"Namespace\" width=\"937\" height=\"72\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2025\/12\/image4-1024x79.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image4-300x23.png 300w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image4-768x60.png 768w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image4-624x48.png 624w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image4.png 1211w\" sizes=\"(max-width: 937px) 100vw, 937px\" \/><p id=\"caption-attachment-77008\" class=\"wp-caption-text\">Namespace<\/p><\/div>\n<p>2.<strong> File Structure and Docker Build<\/strong><\/p>\n<p style=\"padding-left: 40px;\">$ docker build -t blue-app app\/blue<br \/>\n$ docker build -t green-app app\/green<br \/>\n$ kubectl apply -f k8s\/<br \/>\n$ kubectl apply -f istios\/<\/p>\n<p>&nbsp;<\/p>\n<div class=\"mceTemp\">\n<p><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-77011 size-full aligncenter\" title=\"File Structure\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2025\/12\/image6.png\" alt=\"File Structure\" width=\"410\" height=\"590\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2025\/12\/image6.png 410w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image6-208x300.png 208w\" sizes=\"(max-width: 410px) 100vw, 410px\" \/><\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_77011\" style=\"width: 839px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-77011\" decoding=\"async\" loading=\"lazy\" class=\" wp-image-77010\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2025\/12\/image5-1024x230.png\" alt=\"kubectl apply\" width=\"829\" height=\"186\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2025\/12\/image5-1024x230.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image5-300x67.png 300w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image5-768x172.png 768w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image5-624x140.png 624w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image5.png 1052w\" sizes=\"(max-width: 829px) 100vw, 829px\" \/><p id=\"caption-attachment-77011\" class=\"wp-caption-text\">File Structure and Kubectl apply<\/p><\/div>\n<p>3. <strong>Access The Application<\/strong><\/p>\n<p style=\"padding-left: 40px;\">$ minikube tunnel<br \/>\n$ kubectl get svc -n istio-system<\/p>\n<div id=\"attachment_77011\" style=\"width: 776px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-77011\" decoding=\"async\" loading=\"lazy\" class=\" wp-image-77012\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2025\/12\/image7-1024x324.png\" alt=\"minikube tunnel\" width=\"766\" height=\"243\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2025\/12\/image7-1024x324.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image7-300x95.png 300w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image7-768x243.png 768w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image7-624x197.png 624w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image7.png 1072w\" sizes=\"(max-width: 766px) 100vw, 766px\" \/><p id=\"caption-attachment-77011\" class=\"wp-caption-text\">minikube tunnel<\/p><\/div>\n<blockquote><p>&nbsp;<\/p>\n<div id=\"attachment_77011\" style=\"width: 963px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-77011\" decoding=\"async\" loading=\"lazy\" class=\" wp-image-77015\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2025\/12\/image9-1024x470.png\" alt=\"kubectl services\" width=\"953\" height=\"437\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2025\/12\/image9-1024x470.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image9-300x138.png 300w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image9-768x352.png 768w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image9-1536x705.png 1536w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image9-624x286.png 624w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image9.png 1637w\" sizes=\"(max-width: 953px) 100vw, 953px\" \/><p id=\"caption-attachment-77011\" class=\"wp-caption-text\">kubectl services<\/p><\/div>\n<p>Get the external IP from the Load Balancer service.<br \/>\n10.99.215.231\u00a0 \u00a0(this is just a sample and does not contain any securty feature &#8211; we can use aws secuirty to mask endpoint or IPs of loadbalancer and other services)<\/p>\n<p><strong>4. Blue-Green Version Rollout<\/strong><\/p>\n<p style=\"padding-left: 40px;\">We are making initially 70% traffic route for Blue version and 30% Green Version.<br \/>\nChange the http section in virtual-service.yaml<\/p>\n<div id=\"attachment_77011\" style=\"width: 1052px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-77011\" decoding=\"async\" loading=\"lazy\" class=\" wp-image-77017\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2025\/12\/image11-1024x468.png\" alt=\"virtual-service file\" width=\"1042\" height=\"476\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2025\/12\/image11-1024x468.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image11-300x137.png 300w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image11-768x351.png 768w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image11-624x285.png 624w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image11.png 1157w\" sizes=\"(max-width: 1042px) 100vw, 1042px\" \/><p id=\"caption-attachment-77011\" class=\"wp-caption-text\">virtual-service file<\/p><\/div>\n<p>&nbsp;<\/p>\n<div id=\"attachment_77011\" style=\"width: 1007px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-77011\" decoding=\"async\" loading=\"lazy\" class=\" wp-image-77016\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2025\/12\/image12-1024x266.png\" alt=\"virtual-service\" width=\"997\" height=\"259\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2025\/12\/image12-1024x266.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image12-300x78.png 300w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image12-768x199.png 768w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image12-624x162.png 624w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image12.png 1122w\" sizes=\"(max-width: 997px) 100vw, 997px\" \/><p id=\"caption-attachment-77011\" class=\"wp-caption-text\">virtual-service apply<\/p><\/div>\n<p>Now we can verify that 3 traffic routes out of 10 are going to Green service.<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_77011\" style=\"width: 921px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-77011\" decoding=\"async\" loading=\"lazy\" class=\" wp-image-77018\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2025\/12\/image13-1024x518.png\" alt=\"Traffic Routing\" width=\"911\" height=\"461\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2025\/12\/image13-1024x518.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image13-300x152.png 300w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image13-768x388.png 768w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image13-624x316.png 624w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image13.png 1390w\" sizes=\"(max-width: 911px) 100vw, 911px\" \/><p id=\"caption-attachment-77011\" class=\"wp-caption-text\">Traffic Routing<\/p><\/div>\n<p>Traffic routing will be closer to 30 % for Green and 70% for Blue Service. (But it is not exact number.)<\/p>\n<p>&nbsp;<\/p>\n<div id=\"attachment_77011\" style=\"width: 1301px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-77011\" decoding=\"async\" loading=\"lazy\" class=\" wp-image-77019\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2025\/12\/image14-1024x128.png\" alt=\"Traffic Validation\" width=\"1291\" height=\"162\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2025\/12\/image14-1024x128.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image14-300x38.png 300w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image14-768x96.png 768w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image14-624x78.png 624w, \/blog\/wp-ttn-blog\/uploads\/2025\/12\/image14.png 1440w\" sizes=\"(max-width: 1291px) 100vw, 1291px\" \/><p id=\"caption-attachment-77011\" class=\"wp-caption-text\">Traffic Validation<\/p><\/div><\/blockquote>\n<\/div>\n<h2 style=\"text-align: left;\">Conclusion<\/h2>\n<p>To address these challenges discussed in problem statement, this blog demonstrated <strong>how Blue-Green deployment combined with Istio Service Mesh provides a powerful, production-grade solution for zero-downtime application releases<\/strong>. By leveraging Istio VirtualService and DestinationRule, <strong>we achieved precise traffic routing with a 70\/30 split between Blue and Green versions, enabling safe progressive delivery and quick rollback in case of failure<\/strong>. Istio further enhances the deployment with built-in security (mTLS), traffic observability, and resiliency features, making deployments not only safer but also more intelligent. <strong>This approach mirrors how large-scale platforms like Netflix roll out changes with minimal risk, proving that service mesh\u2013based deployment strategies are essential for building reliable, scalable, and cloud-native applications.<\/strong><\/p>\n<p>Please let me know in the comments if you were already aware about it? Do you want the advance details in next Blog?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Modern applications need zero-downtime deployments and safe rollouts. Blue-Green Deployment is a classic strategy where two environments (Blue = current version, Green = new version) exist side by side, and traffic is gradually shifted. When paired with Istio Service Mesh, you get powerful traffic management features like routing traffic by percentage making Blue-Green safer [&hellip;]<\/p>\n","protected":false},"author":2139,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":55},"categories":[5877],"tags":[7873],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/74392"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/2139"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=74392"}],"version-history":[{"count":14,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/74392\/revisions"}],"predecessor-version":[{"id":77551,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/74392\/revisions\/77551"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=74392"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=74392"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=74392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}