Step-by-Step Guide to Deploying Istio and Configuring the BookInfo Demo
This tutorial walks you through connecting a test machine, downloading and installing Istio 1.8.6, configuring environment variables, deploying the BookInfo sample application, verifying pods and services, setting up inbound traffic, exposing dashboards, and introduces Istio’s core traffic‑management capabilities.
1 Istio Deployment
1.1 Connect Test Machine
Enter your test machine server (any method you prefer).
1.2 Install Istio
1.2.1 Download Istio from the Official Site
<code># Download the latest version of Istio
curl -L https://istio.io/downloadIstio | sh -
# Or download a specific version
curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.8.6 TARGET_ARCH=x86_64 sh -</code>1.2.2 Verify Installation Directory
If you installed version 1.8.6, navigate to the directory and list its contents.
<code>[CCE~]$ cd /home/work/istio-1.8.6
[CCE~]$ ls -l
# (sample output showing istioctl binary, LICENSE, manifests, etc.)</code>1.2.3 Configure Environment Variables
Export the PATH variable so that the istioctl client is in the search path.
<code>$ export PATH=$PWD/bin:$PATH</code>1.2.4 Install Istio
Use istioctl to install Istio with the demo profile, which includes the core control plane and the main gateways.
<code>$ istioctl install --set profile=demo -y
✔ Istio core installed
✔ Istiod installed
✔ Egress gateways installed
✔ Ingress gateways installed
✔ Installation complete</code>1.2.5 Verify Installation Success
Check that the istio-system namespace and its pods have been created.
<code># kubectl get ns | grep istio
istio-system Active 82m</code> <code># kubectl get pods -n istio-system
NAME READY STATUS RESTARTS AGE
istio-egressgateway-xxxxxx-xxxxx 1/1 Running 0 2m33s
istio-ingressgateway-xxxxxx-xxxxx 1/1 Running 0 2m33s
istiod-xxxxxx-xxxxx 1/1 Running 0 3m7s</code>1.2.6 Deploy the Built‑in BookInfo Sample
Create a dedicated namespace for the demo and enable automatic sidecar injection.
<code>$ kubectl create namespace istio-booking-demo
$ kubectl label namespace istio-booking-demo istio-injection=enabled
# The namespace now has the label "istio-injection=enabled".</code>1.2.7 Set Alias for Simplified Commands
Define a short alias to avoid typing long kubectl commands.
<code>$ alias kb='kubectl -n istio-booking-demo -o wide'
$ alias kb # verify the alias</code>1.3 Deploy the Sample Application
1.3.1 Inspect the Sample Directory
The BookInfo sample contains several sub‑directories such as networking , platform , and src .
1.3.2 Deploy BookInfo
Apply the BookInfo manifests.
<code>$ kb apply -f platform/kube/bookinfo.yaml
service/details created
serviceaccount/bookinfo-details created
deployment.apps/details-v1 created
... (other services and deployments) ...
service/productpage created
serviceaccount/bookinfo-productpage created
deployment.apps/productpage-v1 created</code>1.3.3 Verify Deployment Results
Check that all services and pods are ready; each pod should show READY 2/2 and STATUS Running .
<code>$ kb get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
details ClusterIP 10.11.12.111 <none> 9080/TCP 28d app=details
productpage ClusterIP 10.11.12.112 <none> 9080/TCP 28d app=productpage
... (other services) ...</code> <code>$ kb get pods
NAME READY STATUS RESTARTS AGE IP NODE ...
details-v1-xxxxx 2/2 Running 0 28d 10.233.67.8 CCE.01
productpage-v1-xxxxx 2/2 Running 0 28d 10.233.67.10 CCE.01
... (other pods) ...</code>1.3.4 Validate the Installation
Query the productpage from a pod to ensure the page is reachable.
<code>$ kubectl -n istio-booking-demo exec "$(kubectl -n istio-booking-demo get pod -l app=ratings -o jsonpath='{.items[0].metadata.name}')" -c ratings -- curl -s productpage:9080/productpage | grep -o "<title>.*</title>"
<title>Simple Bookstore App</title></code>1.3.5 Configure Inbound Traffic
Apply the Istio gateway and virtual‑service configuration for BookInfo.
<code>$ kubectl apply -f networking/bookinfo-gateway.yaml
gateway.networking.istio.io/bookinfo-gateway created
virtualservice.networking.istio.io/bookinfo created
$ istioctl analyze
✔ No validation issues found when analyzing namespace: default.</code>1.3.6 Bind NodePort for External Access
Edit the istio-ingressgateway service to expose port 80 as NodePort 8601.
<code>$ kb get svc istio-ingressgateway -n istio-system
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
istio-ingressgateway NodePort 10.233.32.219 <none> 15021:24534/TCP,80:8601/TCP,443:31159/TCP ...
# Edit the service and set the desired nodePort values.</code>1.4 Install Dashboards
Deploy the built‑in observability addons (Kiali, Grafana, Jaeger, Prometheus).
<code>$ cd samples/addons
$ kubectl apply -f .
# Wait for the Kiali deployment to finish
$ istioctl dashboard kiali # http://localhost:20001/kiali
$ istioctl dashboard grafana # http://localhost:3000
$ istioctl dashboard jaeger # http://localhost:16686
$ istioctl dashboard prometheus # http://localhost:9090</code>Note: The official documentation also provides a complete set of installation steps.
2 Istio Capabilities Overview
2.1 Brief Introduction
Istio offers rich traffic‑management features such as request routing, fault injection, traffic shifting, TCP routing, request timeouts, circuit breaking, traffic mirroring, regional load balancing, and Ingress/Egress control.
2.2 Request Routing Configuration
2.2.1 Basic Routing
Apply virtual-service-all-v1.yaml to direct all traffic to version v1 of each service.
<code>$ kubectl -n istio-booking-demo apply -f networking/virtual-service-all-v1.yaml
virtualservice.networking.istio.io/productpage unchanged
... (other services unchanged) ...</code>The reviews service in v1 does not call the rating service, so no stars are shown.
2.2.2 Routing Based on User Identity
Route traffic from the user jason to reviews:v2 by matching the end-user header.
<code>$ kubectl -n istio-booking-demo apply -f networking/virtual-service-reviews-test-v2.yaml
virtualservice.networking.istio.io/reviews configured
... (yaml shows match on header end-user=jason) ...</code>Result: productpage → reviews:v2 → ratings for user jason , while other users see productpage → reviews:v1 .
2.2.3 Remove Virtual Services
If you no longer need routing rules, delete the virtual‑service configuration.
<code>$ kubectl -n istio-booking-demo delete -f networking/virtual-service-all-v1.yaml</code>3 Summary
This article demonstrated how to install Istio, deploy the BookInfo sample, verify the deployment, expose services via NodePort, and install observability dashboards. Future sections will explore advanced routing, fault injection, traffic shifting, TCP routing, timeouts, circuit breaking, traffic mirroring, regional load balancing, Ingress/Egress, and ServiceEntry configurations.
Architecture & Thinking
🍭 Frontline tech director and chief architect at top-tier companies 🥝 Years of deep experience in internet, e‑commerce, social, and finance sectors 🌾 Committed to publishing high‑quality articles covering core technologies of leading internet firms, application architecture, and AI breakthroughs.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.