(O+P)ut

アウトプット



(O+P)ut

エンジニアのアウトプット

【Linux】istioctlでIstioの初期インストールを行う

スポンサーリンク

はじめに

IKSに用意したWorkerNodeにLinux環境から操作をしてIstioのセットアップを実施しました。
以下の冒頭部分となります。

環境情報
  • IKS v1.18.13
  • Debian GNU/Linux 9
  • istio-1.8.1

istioctlのインストール

下記にてインストールが完了してディレクトリが作成されます。

# curl -L https:/git.io/getLatestIstio | sh -
...
Downloading istio-1.8.1 from https://github.com/istio/istio/releases/download/1.8.1/istio-1.8.1-linux-amd64.tar.gz ...
Istio 1.8.1 Download Complete!...

ディレクトリの中にはistioctlが入ったbinディレクトリやサンプルが入ったsampleディレクトリ等があります。

# ls istio-1.8.1
bin  LICENSE  manifests  manifest.yaml  README.md  samples  tools

ちなみに同シェルには環境情報をチェックする機構が入っているので例えばWindows端末で叩くと以下でインストールに失敗しました。

$ curl -L https:/git.io/getLatestIstio | sh -
...
Unable to download Istio 1.8.1 at this moment!
Please verify the version you are trying to download.

istioctl installで環境をデプロイ

.bashrcに以下を追記してパスを通せば

export PATH=${PATH}:/root/istio-1.8.1/bin

コマンドが通ります。

# which istioctl
/root/istio-1.8.1/bin/istioctl

インストールするクラスターに間違いがないことを確認した後に

# kubectl config get-contexts

以下でインストールが可能です。

# istioctl install --set profile=demo -y
✔ Istio core installed
✔ Istiod installed
✔ Ingress gateways installed
✔ Egress gateways installed
✔ Installation complete     

名前空間を確認するとistio-systemが新規作成されており

# kubectl get ns
NAME              STATUS   AGE
default           Active   16h
ibm-cert-store    Active   16h
ibm-operators     Active   16h
ibm-system        Active   16h
istio-system      Active   96s
kube-node-lease   Active   16h
kube-public       Active   16h
kube-system       Active   16h

同ネームスペースにてServiceや

# kubectl get svc -n istio-system
NAME                   TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)                                                                      AGE
istio-egressgateway    ClusterIP      172.21.165.87    <none>        80/TCP,443/TCP,15443/TCP                                                     4m36s
istio-ingressgateway   LoadBalancer   172.21.142.22    <pending>     15021:31349/TCP,80:30914/TCP,443:30606/TCP,31400:30186/TCP,15443:32612/TCP   4m36s
istiod                 ClusterIP      172.21.106.236   <none>        15010/TCP,15012/TCP,443/TCP,15014/TCP                                        4m49s

Podが生成されています。

# kubectl get pod -n istio-system
NAME                                   READY   STATUS    RESTARTS   AGE
istio-egressgateway-69fc79d576-b6fqv   1/1     Running   0          5m8s
istio-ingressgateway-bc9b55659-sgpjk   1/1     Running   0          5m8s
istiod-67f5756967-8m5jt                1/1     Running   0          5m21s

終わりに

ガイドに沿って行えば簡単にインストールができます。
今回はLoadbalancerにて自動IP付与ができない環境なのでExternalIPはPendingのままですがMETALLBといったLB機能がある環境ではIPアドレスが割り振られます。

以上、ご参考になれば幸いです。