Getting Started

Want to explore Istio’s ambient mode? Visit the Getting Started with Ambient Mode guide!

This guide lets you quickly evaluate Istio. If you are already familiar with Istio or interested in installing other configuration profiles or advanced deployment models, refer to our which Istio installation method should I use? FAQ page.

You will need a Kubernetes cluster to proceed. If you don’t have a cluster, you can use kind or any other supported Kubernetes platform.

Follow these steps to get started with Istio:

  1. Download and install Istio
  2. Install the Kubernetes Gateway API CRDs
  3. Deploy the sample application
  4. Open the application to outside traffic
  5. View the dashboard

Download Istio

  1. Go to the Istio release page to download the installation file for your OS, or download and extract the latest release automatically (Linux or macOS):

    1. $ curl -L https://istio.io/downloadIstio | sh -
  2. Move to the Istio package directory. For example, if the package is istio-1.23.3:

    1. $ cd istio-1.23.3

    The installation directory contains:

    • Sample applications in samples/
    • The istioctl client binary in the bin/ directory.
  3. Add the istioctl client to your path (Linux or macOS):

    1. $ export PATH=$PWD/bin:$PATH

Install Istio

For this guide, we use the demo configuration profile. It is selected to have a good set of defaults for testing, but there are other profiles for production, performance testing or OpenShift.

Unlike Istio Gateways, creating Kubernetes Gateways will, by default, also deploy gateway proxy servers. Because they won’t be used, we disable the deployment of the default Istio gateway services that are normally installed as part of the demo profile.

  1. Install Istio using the demo profile, without any gateways:

    Zip

    1. $ istioctl install -f @samples/bookinfo/demo-profile-no-gateways.yaml@ -y
    2. Istio core installed
    3. Istiod installed
    4. Installation complete
    5. Made this installation the default for injection and validation.
  2. Add a namespace label to instruct Istio to automatically inject Envoy sidecar proxies when you deploy your application later:

    1. $ kubectl label namespace default istio-injection=enabled
    2. namespace/default labeled

Install the Kubernetes Gateway API CRDs

The Kubernetes Gateway API CRDs do not come installed by default on most Kubernetes clusters, so make sure they are installed before using the Gateway API.

  1. Install the Gateway API CRDs, if they are not already present:

    1. $ kubectl get crd gateways.gateway.networking.k8s.io &> /dev/null || \
    2. { kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd?ref=v1.1.0" | kubectl apply -f -; }

Deploy the sample application

You have configured Istio to inject sidecar containers into any application you deploy in your default namespace.

  1. Deploy the Bookinfo sample application:

    1. $ kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.23/samples/bookinfo/platform/kube/bookinfo.yaml
    2. service/details created
    3. serviceaccount/bookinfo-details created
    4. deployment.apps/details-v1 created
    5. service/ratings created
    6. serviceaccount/bookinfo-ratings created
    7. deployment.apps/ratings-v1 created
    8. service/reviews created
    9. serviceaccount/bookinfo-reviews created
    10. deployment.apps/reviews-v1 created
    11. deployment.apps/reviews-v2 created
    12. deployment.apps/reviews-v3 created
    13. service/productpage created
    14. serviceaccount/bookinfo-productpage created
    15. deployment.apps/productpage-v1 created

    The application will start. As each pod becomes ready, the Istio sidecar will be deployed along with it.

    1. $ kubectl get services
    2. NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
    3. details ClusterIP 10.0.0.212 <none> 9080/TCP 29s
    4. kubernetes ClusterIP 10.0.0.1 <none> 443/TCP 25m
    5. productpage ClusterIP 10.0.0.57 <none> 9080/TCP 28s
    6. ratings ClusterIP 10.0.0.33 <none> 9080/TCP 29s
    7. reviews ClusterIP 10.0.0.28 <none> 9080/TCP 29s

    and

    1. $ kubectl get pods
    2. NAME READY STATUS RESTARTS AGE
    3. details-v1-558b8b4b76-2llld 2/2 Running 0 2m41s
    4. productpage-v1-6987489c74-lpkgl 2/2 Running 0 2m40s
    5. ratings-v1-7dc98c7588-vzftc 2/2 Running 0 2m41s
    6. reviews-v1-7f99cc4496-gdxfn 2/2 Running 0 2m41s
    7. reviews-v2-7d79d5bd5d-8zzqd 2/2 Running 0 2m41s
    8. reviews-v3-7dbcdcbc56-m8dph 2/2 Running 0 2m41s

    Note that the pods show READY 2/2, confirming they have their application container and the Istio sidecar container.

  2. Validate that the app is running inside the cluster by checking for the page title in the response:

    1. $ kubectl exec "$(kubectl get pod -l app=ratings -o jsonpath='{.items[0].metadata.name}')" -c ratings -- curl -sS productpage:9080/productpage | grep -o "<title>.*</title>"
    2. <title>Simple Bookstore App</title>

Open the application to outside traffic

The Bookinfo application is deployed, but not accessible from the outside. To make it accessible, you need to create an ingress gateway, which maps a path to a route at the edge of your mesh.

  1. Create a Kubernetes Gateway for the Bookinfo application:

    Zip

    1. $ kubectl apply -f @samples/bookinfo/gateway-api/bookinfo-gateway.yaml@
    2. gateway.gateway.networking.k8s.io/bookinfo-gateway created
    3. httproute.gateway.networking.k8s.io/bookinfo created

    By default, Istio creates a LoadBalancer service for a gateway. As we will access this gateway by a tunnel, we don’t need a load balancer. If you want to learn about how load balancers are configured for external IP addresses, read the ingress gateways documentation.

  2. Change the service type to ClusterIP by annotating the gateway:

    1. $ kubectl annotate gateway bookinfo-gateway networking.istio.io/service-type=ClusterIP --namespace=default
  3. To check the status of the gateway, run:

    1. $ kubectl get gateway
    2. NAME CLASS ADDRESS PROGRAMMED AGE
    3. bookinfo-gateway istio bookinfo-gateway-istio.default.svc.cluster.local True 42s

Access the application

You will connect to the Bookinfo productpage service through the gateway you just provisioned. To access the gateway, you need to use the kubectl port-forward command:

  1. $ kubectl port-forward svc/bookinfo-gateway-istio 8080:80

Open your browser and navigate to http://localhost:8080/productpage to view the Bookinfo application.

Bookinfo Application
Bookinfo Application

If you refresh the page, you should see the book reviews and ratings changing as the requests are distributed across the different versions of the reviews service.

View the dashboard

Istio integrates with several different telemetry applications. These can help you gain an understanding of the structure of your service mesh, display the topology of the mesh, and analyze the health of your mesh.

Use the following instructions to deploy the Kiali dashboard, along with Prometheus, Grafana, and Jaeger.

  1. Install Kiali and the other addons and wait for them to be deployed.

    1. $ kubectl apply -f samples/addons
    2. $ kubectl rollout status deployment/kiali -n istio-system
    3. Waiting for deployment "kiali" rollout to finish: 0 of 1 updated replicas are available...
    4. deployment "kiali" successfully rolled out
  2. Access the Kiali dashboard.

    1. $ istioctl dashboard kiali
  3. In the left navigation menu, select Graph and in the Namespace drop down, select default.

    To see trace data, you must send requests to your service. The number of requests depends on Istio’s sampling rate and can be configured using the Telemetry API. With the default sampling rate of 1%, you need to send at least 100 requests before the first trace is visible. To send 100 requests to the productpage service, use the following command:

    1. $ for i in $(seq 1 100); do curl -s -o /dev/null "http://$GATEWAY_URL/productpage"; done

    The Kiali dashboard shows an overview of your mesh with the relationships between the services in the Bookinfo sample application. It also provides filters to visualize the traffic flow.

    Kiali Dashboard
    Kiali Dashboard

Next steps

Congratulations on completing the evaluation installation!

These tasks are a great place for beginners to further evaluate Istio’s features using this demo installation:

Before you customize Istio for production use, see these resources:

Join the Istio community

We welcome you to ask questions and give us feedback by joining the Istio community.

Uninstall

To delete the Bookinfo sample application and its configuration, see Bookinfo cleanup.

The Istio uninstall deletes the RBAC permissions and all resources hierarchically under the istio-system namespace. It is safe to ignore errors for non-existent resources because they may have been deleted hierarchically.

Zip

  1. $ kubectl delete -f @samples/addons@
  2. $ istioctl uninstall -y --purge

The istio-system namespace is not removed by default. If no longer needed, use the following command to remove it:

  1. $ kubectl delete namespace istio-system

The label to instruct Istio to automatically inject Envoy sidecar proxies is not removed by default. If no longer needed, use the following command to remove it:

  1. $ kubectl label namespace default istio-injection-

If you installed the Kubernetes Gateway API CRDs and would now like to remove them, run one of the following commands:

  • If you ran any tasks that required the experimental version of the CRDs:

    1. $ kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd/experimental?ref=v1.1.0" | kubectl delete -f -
  • Otherwise:

    1. $ kubectl kustomize "github.com/kubernetes-sigs/gateway-api/config/crd?ref=v1.1.0" | kubectl delete -f -