"Istio Official document" Google Kubernetes engine Quick Start

Source: Internet
Author: User
Tags grafana gcloud

Use Google Cloud deployment Manager to install and run Istio's quick start instructions in Google kubernetes Engine(Gke).

This quick start is used to create a new Gke cluster, install Istio, and then deploy the BookInfo sample application. It is performed automatically using Deployment Manager and is described in detail in the istio on kubernetes setup Guide .

Note: The default installation creates a Gke Alpha cluster that allows automatic stent injection . Because it is an alpha cluster, it does not support automatic nodes or master upgrades and will be automatically deleted after 30 days.

Prerequisites

This example requires that the Google Cloud Platform project, which has billing capabilities, be enabled and effective. If you are not an existing GCP user, you can register a 300-dollar free trial credit.

Make sure that the Google Container Engine APIis enabled for your project (or it can be found through navigation in the navigation bar to "apis&services" –> "Dashboard"). If you do not see the Enable API, you can enable the API by clicking the Enable this API button.

You must install and configure the Gcloud command-line tool and include the Kubectl component (Gcloud components install kubectl). If you do not want to install the Gcloud client on your own machine, you can use Gcloud to perform the same task via Google Cloud script .

Warning: You must set your default calculation service account to include:

To set this item, navigate to the IAM section of the Cloud console and projectNumber-compute@developer.gserviceaccount.com the default GCE in the following form Gke Service Account: By default, it should have an editor role. Then locate the kubernetes engine Group in the role Drop-down list for the account, and then select the role kubernetes engine Administrator . The list of roles for your account will be changed to more than one .

Roles/container.admin (kubernetes engine Administrator)

Editor (by default)

Establish

Start Deployment Manager

Once you have enabled accounts and projects, click the following link to open Deployment Manager.

We recommend that you keep the default settings, because the remainder of this tutorial will describe how to access the installed features. By default, the tool creates a Gke alpha cluster with the specified settings, and then installs the Istio control surface, BookInfo the sample application, Grafana and Prometheus,servicegraph, and Zipkin. You'll find out more about how to access all of these below.

Istio Gke Deployment Management

Click to deploy:


Gke-istio Launcher

Wait until Istio is fully deployed. Please note that this may take five minutes.

Bootstrap Gcloud

After the deployment is complete, do the following on the workstation where Gcloud is installed:

Perform bootstrap kubectl on the cluster you just created, and verify that the cluster is running, Istio enabled

Gcloud container clusters list NAME ZONE master_version master_ip machine_t ype node_version num_nodes STATUS istio-cluster us-central1-a 1.7.8-gke.0 ALPHA (left) 130.211.216.64 n1-s Tandard-2 1.7.8-gke.0 3 RUNNING

In this case, the cluster name is Istio-cluster

Now get the certificate for this cluster

Gcloud container clusters get-credentials istio-cluster--zone=us-central1-a


Verifying installation

Verify that the Istio is installed in its own namespace

Kubectl Get Deployments,ing-n Istio-system

Now confirm that the BookInfo sample application is also installed:

Kubectl Get deployments,ing

Note the IP and port assigned to the BookInfo product page. (in the example above, it is: 35.202.120.89:80.)

You can also view the installation using the * kubernetes engine on the Cloud console –> workload section: gke- Workload

Accessing the BookInfo sample

Set an environment variable for the external IP address of the BookInfo:

Kubectl get ingress-o Wide export gateway_url=35.202.120.89

Verify that you have access to BookInfo http://${gateway_url}/productpage:

Now communicates with it:

For i in {1..100}; Do Curl-o/dev/null-s-W "%{http_code}\n" http://${gateway_url}/productpage; Done

Verifying installed Istio Plug-ins

Once you have confirmed that the Istio Control Panel and the sample application are running, try accessing the installed Istio plug-in.

If you use a cloud shell instead of an installed gcloud Client, you can use its Web preview feature for port forwarding and proxy. For example, to access Grafana from the cloud shell, change the kubectl port mapping from 3,000:3,000 to 8,080:3,000. You can preview the other four consoles at the same time through the Web preview agent in the range 8080 through 8084.

Grafana

Build a tunnel to Grafana:

Kubectl-n Istio-system Port-forward $ (kubectl-n istio-system get pod-l app=grafana-o ' {. jsonpath= e} ') 3000:3000 &

And then

Http://localhost:3000/dashboard/db/istio-dashboard

You should see some statistics about the request you sent before.

Grafana

For more information about using Grafana, see About the Grafana plug-in . Prometheus

Prometheus is installed with Grafana. You can use the console to view Istio and application metrics as follows:

Kubectl-n Istio-system Port-forward $ (kubectl-n istio-system get pod-l app=prometheus-o ' {. jsonpath=. Name} ') 9090:9090 &

To view the console:

Http://localhost:9090/graph

Prometheus

For more details, see about Prometheus Add-on components .

Servicegraph

To build a tunnel to the Servicegraph:

Kubectl-n Istio-system Port-forward $ (kubectl-n istio-system get pod-l app=servicegraph-o ' {. jsonpath= A.name} ') 8088:8088 &

You should see that the BookInfo service topology

Http://localhost:8088/dotviz

Servicegraph

For more details, see about servicegraph add-on components . Tracking

Build a tunnel to Zipkin:

Kubectl port-forward-n Istio-system $ (kubectl get pod-n istio-system-l ' App=zipkin-o ' {. jsonpath= } ') 9411:9411 &

You should see the tracking statistics that were sent before:

http://localhost:9411

Zipkin

For more details on tracing, see understanding what happened . What's next?

You can further explore BookInfo applications and istio features in any of the tutorials in the Guide section. However, to do this, you need to install ISTIOCTL with istio interaction. You can install it directly on our workstation or in a cloud shell. Uninstall

Navigate to the "Deployment" section of the Cloud console: https://console.cloud.google.com/deployments

Select the deployment, and then click Delete .

The Deployment Manager will delete all deployed Gke artifacts – but items such as ingress and loadbalancers will be retained. You can remove these artifacts by going to the cloud console again under the Network Service –> loadbalancers

(End of full text)



Click below
Read the original



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.