Deploying the Bookinfo application in Kubernetes

BookInfo will be deployed in our Kubernetes environment using the deployment YAML file provided by Istio's public GitHub page: https://archive.istio.io/v1.3/docs/examples/bookinfo/. Observe the following steps to install the BookInfo application:

  1. Create a separate namespace that will be used to deploy the application:
$ kubectl create namespace istio-lab
namespace/istio-lab created

  1. Now, we will grant the Cluster Admin role to the default service account in the istio-lab namespace to keep things simple. This approach of granting cluster-admin to a namespace is just for convenience, and it should not be the norm:
$ kubectl create clusterrolebinding istio-lab-cluster-role-binding --clusterrole=cluster-admin --serviceaccount=istio-lab:default
clusterrolebinding.rbac.authorization.k8s.io/istio-lab-cluster-role-binding created
  1. Next, download the bookinfo demo application YAML:
$ mkdir -p ~/servicemesh
$ curl -L https://raw.githubusercontent.com/istio/istio/master/samples/bookinfo/platform/kube/bookinfo.yaml -o ~/servicemesh/bookinfo.yaml
  1. Now, deploy the bookinfo application:
$ kubectl -n istio-lab apply -f ~/servicemesh/bookinfo.yaml
...
deployment.apps/details-v1 created
service/ratings created
serviceaccount/bookinfo-ratings created
deployment.apps/ratings-v1 created
service/reviews created
serviceaccount/bookinfo-reviews created
deployment.apps/reviews-v1 created
deployment.apps/reviews-v2 created
deployment.apps/reviews-v3 created
...
deployment.apps/productpage-v1 created
  1. The Docker images for the bookinfo app will be downloaded from docker.io/istio/*.
  2. Finally, check the progress of this BookInfo microservice application deployment by checking kubectl -n istio-lab get all. Note that it will take a few seconds to a few minutes for the pods to be ready and for the Kubernetes services to be enabled through the endpoints.

Now that we've gone through the scenario of deploying the BookInfo application, let's validate a fully qualified domain name for the Kubernetes service that's been deployed within the VM. This process can remove the dependency of using an IP address to access the Kubernetes service.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.243.184