These sample apps are used throughout the documentation to help test connectivity, such as in the traffic management, security, and resiliency policy guides.

Bookinfo

For testing purposes, you can deploy Bookinfo, the Istio sample app, and add it to your service mesh.

  1. Save the revision that you used for your istiod installation in an environment variable. Typically, this is main for a Helm installation, or gloo for a Gloo operator installation.

    • Gloo operator:
        export REVISION=gloo
        
    • Helm:
        export REVISION=main
        
  2. Create the bookinfo namespace and label it so that the services become part of the service mesh.

      kubectl create ns bookinfo
    kubectl label ns bookinfo istio.io/rev=${REVISION} --overwrite
      
  3. Deploy the Bookinfo app.

      # deploy bookinfo application components for all versions less than v3
    kubectl -n bookinfo apply -f https://raw.githubusercontent.com/istio/istio/1.24.2/samples/bookinfo/platform/kube/bookinfo.yaml -l 'app,version notin (v3)'
    # deploy an updated product page with extra container utilities such as 'curl' and 'netcat'
    kubectl -n bookinfo apply -f https://raw.githubusercontent.com/solo-io/gloo-mesh-use-cases/main/policy-demo/productpage-with-curl.yaml
    # deploy all bookinfo service accounts
    kubectl -n bookinfo apply -f https://raw.githubusercontent.com/istio/istio/1.24.2/samples/bookinfo/platform/kube/bookinfo.yaml -l 'account'
      
  4. Verify that the Bookinfo app deployed successfully.

      kubectl get pods,svc -n bookinfo
      

httpbin

The httpbin sample app is a simple tool to test HTTP requests and responses. Unlike curl, you can see not only the response headers, but also the request headers.

  1. Create an httpbin namespace and label the namespace for Istio injection so that the services in the namespace become part of the service mesh.

      kubectl create ns httpbin
    kubectl label ns httpbin istio.io/rev=main --overwrite=true
      
  2. Deploy the httpbin app.

      kubectl -n httpbin apply -f https://raw.githubusercontent.com/solo-io/gloo-mesh-use-cases/main/policy-demo/httpbin.yaml
      
  3. Verify that the httpbin app is running.

      kubectl -n httpbin get pods
      

hello world

The hello world sample app is a simple way to test responses for different app versions. The following examples install four versions of hello world in your cluster.

  1. Create the helloworld namespace and label it for Istio injection so that the services become part of the service mesh.

      kubectl create ns helloworld
    kubectl label ns helloworld istio.io/rev=main --overwrite=true
      
  2. Deploy hello world v1, v2, v3, and v4 to your cluster.

      kubectl -n helloworld apply -f https://raw.githubusercontent.com/solo-io/gloo-mesh-use-cases/main/policy-demo/helloworld.yaml 
      
  3. Verify that the hello world apps are running.

      kubectl -n helloworld get pods
      

Other service namespaces

Now that Istio is up and running, you can create service namespaces for your teams to run app workloads in. For any namespaces that you want to deploy apps to, be sure to follow these steps to include your services in the service mesh.

  1. Save the revision that you used for your istiod installation in an environment variable. Typically, this is main for a Helm installation, or gloo for a Gloo operator installation.

    • Gloo operator:
        export REVISION=gloo
        
    • Helm:
        export REVISION=main
        
  2. Label the service namespace for Istio sidecar injection with the revision label.

      kubectl label namespace <namespace> istio.io/rev=${REVISION} --overwrite
      
  3. If you already deployed app pods to the namespace, restart the workloads so that sidecars are injected into the pods. For example, you might roll out a restart to each deployment by using a command similar to the following.

      kubectl rollout restart deployment -n <namespace> <deployment>
      

Next

Verify routing to the sample apps and apply a fault injection policy to the reviews service to delay requests and simulate network issues or an overloaded service.