Rancher2.3 Previewとして、Istio kiali Jaeger そして2.2から同梱されたPrometheus+Grafanaとは別に機能として追加されました。
Bookinfoアプリケーションをベースに試してみようと思います。
環境について
環境としては、RancherからGKEにクラスタを構築してBookinfoアプリをデプロイしてみました。
Rancher Server
| 項目 | 入力概要 | 
|---|---|
| 名前 | rancher-server | 
| ゾーン | asia-northeast1-b | 
| マシンタイプ | vCPUx1 | 
| ブートディスク | Ubuntu 18.04 LTS ディスクサイズ30GB  | 
| ファイアウォール | HTTP トラフィックを許可する、HTTPS トラフィックを許可するの両方をチェックします。 | 
GKEクラスタ
リソースは多めに必要となります。vCPU数8のクラスタとなります。
| 項目 | 入力概要 | 
|---|---|
| 名前 | rancher-k8s-cluster | 
| ゾーン | asia-northeast1-a | 
| Machine Type | n1-standard-2(2 vCPUs,7.5GB RAM) | 
| Node Count | 4 | 
| Node Count | Ubuntu | 
Istio Kiali Jaeger Prometheus+Grafana 環境デプロイ
ナビゲーションから「Global」-「rancher-k8s-cluster」を選択します。

ナビゲーションから「Tools」-「Istio」を選択します。

デフォルトのまま「Enable」ボタンをクリックします。
ナビゲーションから「Default」を選択します。
ナビゲーションから「Istio」を選択します。
画面が遷移すると、右上に「Kiali Jaeger Grafana Prometheus」のアイコンが表示されます。各アイコンをクリックするとダッシュボード画面が表示されます。
ナビゲーションから「rancher-k8s-cluster」を選択します。
「Launch kubectl」ボタンをクリックします。
コンソールが起動します。
Bookinfoアプリケーションデプロイ
BookinfoはIstioのサンプルアプリケーションのため、まずIstioをダウンロードします。
# Run kubectl commands inside here
# e.g. kubectl get all
> curl -L https://git.io/getLatestIstio | sh -
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  2140  100  2140    0     0   2372      0 --:--:-- --:--:-- --:--:--  104k
Downloading istio-1.2.0 from https://github.com/istio/istio/releases/download/1.2.0/istio-1.2.0-linux.tar.gz ...  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   614    0   614    0     0   1590      0 --:--:-- --:--:-- --:--:--  1590
100 20.2M  100 20.2M    0     0  6184k      0  0:00:03  0:00:03 --:--:-- 10.4M
Istio 1.2.0 Download Complete!
Istio has been successfully downloaded into the istio-1.2.0 folder on your system.
Next Steps:
See https://istio.io/docs/setup/kubernetes/install/ to add Istio to your Kubernetes cluster.
To configure the istioctl client tool for your workstation,
add the /nonexistent/istio-1.2.0/bin directory to your environment path variable with:
         export PATH="$PATH:/nonexistent/istio-1.2.0/bin"
Begin the Istio pre-installation verification check by running:
         istioctl verify-install 
Need more information? Visit https://istio.io/docs/setup/kubernetes/install/
ラベルを設定して、Bookinfoアプリケーションデをデプロイします。
> cd istio-1.2.0/
> kubectl label namespace default istio-injection=enabled
namespace/default labeled
> kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml
service/details created
serviceaccount/bookinfo-details created
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
service/productpage created
serviceaccount/bookinfo-productpage created
deployment.apps/productpage-v1 created
serviceとpod状況を確認します。
> kubectl get services
NAME          TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
details       ClusterIP   10.43.247.245   <none>        9080/TCP   23s
kubernetes    ClusterIP   10.43.240.1     <none>        443/TCP    6m32s
productpage   ClusterIP   10.43.249.140   <none>        9080/TCP   22s
ratings       ClusterIP   10.43.255.36    <none>        9080/TCP   23s
reviews       ClusterIP   10.43.247.171   <none>        9080/TCP   23s
> kubectl get po
NAME                              READY   STATUS    RESTARTS   AGE
details-v1-7964b4bb49-hl4zt       2/2     Running   0          64s
productpage-v1-6c668694dc-f69hc   2/2     Running   0          63s
ratings-v1-7bb4dbd557-s8dwz       2/2     Running   0          63s
reviews-v1-597f899bf6-cvzs5       2/2     Running   0          64s
reviews-v2-664994896d-4vrvp       2/2     Running   0          64s
reviews-v3-fc984656d-cvdhb        2/2     Running   0          63s
curlコマンドでアクセスします。
> kubectl exec -it $(kubectl get pod -l app=ratings -o jsonpath='{.items[0].metadata.name}') -c ratings -- curl productpage:9080/productpage | grep -o "<title>.*</title>"
<title>Simple Bookstore App</title>
>
Kialiが同梱されているので、RancherUIから確認できます。

Kialiのアイコンをクリックして、Kialiダッシュボードからも確認できます。

「Traffic Metrics」を選択すると、ServiceによるレイテンシーやVolumeの状況をグラフで見ることができます。グラフにカーソルを合わせると詳細情報が表示されます。

Jaegerのアイコンをクリックして、Jaegerダッシュボードからも確認できます。

以上となります。
ナビゲーションから数クリックでIstio kiali Jaeger Promethesu+Grafana環境が構築できるのはいいですね。RancherにもService Mesh、Observerbility環境が2.3から整い始める感じがしました。
Rancher2.2から同梱されたPrometheus+Grafanaはクラスタ、プロジェクトレベルですが、Istio環境用にも追加されたのでリソースは食うのでGA時には改善を期待したいところです。




