1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Istio on Minikube (using istioctl)

Posted at

やること

  • Minikubeの上にistioをインストールする
  • bookinfoを動かす
  • Kialiをインストールする
  • Kialiでサービスメッシュを確認する

リファレンス

Istioのインストール

コマンド

curl -L https://istio.io/downloadIstio | sh -
cd istio-1.12.0/
export PATH=$PWD/bin:$PATH
istioctl install --set profile=demo -y
kubectl label namespace default istio-injection=enabled

BookInfo のサンプルアプリをデプロイ

コマンド

kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml
kubectl get pods -w

レスポンス

NAME                              READY   STATUS            RESTARTS   AGE
details-v1-79f774bdb9-t89d9       0/2     PodInitializing   0          17s
productpage-v1-6b746f74dc-dsbbt   0/2     PodInitializing   0          16s
ratings-v1-b6994bb9-dzrqb         0/2     PodInitializing   0          16s
reviews-v1-545db77b95-sxp7w       0/2     PodInitializing   0          16s
reviews-v2-7bf8c9648f-c6998       0/2     PodInitializing   0          16s
reviews-v3-84779c7bbc-jzbnq       0/2     PodInitializing   0          16s

正常起動の確認

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>"

レスポンス

<title>Simple Bookstore App</title>

ブラウザからアクセス

コマンド

kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml
istioctl analyze
minikube tunnel --cleanup
export INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].nodePort}')
export INGRESS_HOST=$(minikube ip)
export GATEWAY_URL=$INGRESS_HOST:$INGRESS_PORT
echo "http://$GATEWAY_URL/productpage"

ブラウザアクセス

image.png

Kiali Dashboard にアクセス

コマンド

kubectl apply -f samples/addons
kubectl rollout status deployment/kiali -n istio-system
istioctl dashboard kiali

ブラウザアクセス

image.png

できた。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?