k3sでistioを動作させる

##概要
軽量Kubernetesであるk3sにサービスメッシュIstioを適用する。
~~結論としては、失敗している。~~
→multipasのメモリ、CPU割り当てを増やす事でインストールの確認までできている。

##環境
* OS : osx multipass上で動作するUbuntu
* k3s : 最新を取得（v1.22.5+k3s1）
* Istio : 最新を取得（istio-1.12.1）

##手順
1. osxのターミナル上で、multipassによりubuntuを起動させ、シェルを起動する
    - multipass launch -n k3s-master --cpus 2 --mem 4g
    ※デフォルトだと1cpu、1memで作成されリソース不足になるので注意
    - multipass shell k3s-master
1. k3sをインストールする
    - curl -sfL https://get.k3s.io | sh -s - server --disable traefik
<pre>[INFO]  Using v1.22.5+k3s1 as release
[INFO]  systemd: Starting k3s
</pre>
    - sudo chmod 775 /etc/rancher/k3s/k3s.yaml
    - mkdir ~/.kube
    - cp /etc/rancher/k3s/k3s.yaml ~/.kube/config<br>
    ※Istioがk3sにアクセスできるように、configファイルを移動する。

1. istioをインストールする
    - curl -L https://istio.io/downloadIstio | sh -
<pre> 
Downloading istio-1.12.1 from https://github.com/istio/istio/releases/download/1.12.1/istio-1.12.1-linux-amd64.tar.gz ...
Istio 1.12.1 Download Complete!
Istio has been successfully downloaded into the istio-1.12.1 folder on your system.</pre>
    - export PATH="$PATH:/home/ubuntu/istio-1.12.1/bin"
    - istioctl version
<pre>client version: 1.12.1
control plane version: 1.12.1
data plane version: 1.12.1 (2 proxies)</pre>
    - istioctl x precheck 
<pre>✔ No issues found when checking the cluster. Istio is safe to install or upgrade!
  To get started, check out https://istio.io/latest/docs/setup/getting-started/</pre>
    - istioctl install --set profile=demo
<pre>✔ Istio core installed                                                          
✔ Istiod installed                                                              
✔ Egress gateways installed                                                     
✔ Ingress gateways installed                                                    
✔ Installation complete<br>
Making this installation the default for injection and validation.
Thank you for installing Istio 1.12.  Please take a few minutes to tell us about your install/upgrade experience!  https://forms.gle/FegQbc9UvePd4Z9z7
</pre>
    - kubectl -n istio-system get all
<pre>NAME                                        READY   STATUS    RESTARTS   AGE
pod/istiod-76d66d9876-fkmjh                 1/1     Running   0          2m50s
pod/svclb-istio-ingressgateway-jp59n        5/5     Running   0          2m14s
pod/istio-ingressgateway-78f69bd5db-zwkvb   1/1     Running   0          2m15s
pod/istio-egressgateway-687f4db598-jjfj7    1/1     Running   0          2m15s
</pre>

1. サンプルアプリケーションをデプロイ
    - kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml
<pre>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</pre>
    - kubectl get services
<pre>NAME          TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
kubernetes    ClusterIP   10.43.0.1       <none>        443/TCP    5m36s
details       ClusterIP   10.43.250.211   <none>        9080/TCP   24s
ratings       ClusterIP   10.43.128.103   <none>        9080/TCP   24s
reviews       ClusterIP   10.43.252.163   <none>        9080/TCP   23s
productpage   ClusterIP   10.43.12.119    <none>        9080/TCP   23s
</pre>
    - kubectl get pods
<pre>NAME                              READY   STATUS            RESTARTS   AGE
ratings-v1-b6994bb9-tfcth         0/2     PodInitializing   0          42s
details-v1-79f774bdb9-btrng       0/2     PodInitializing   0          43s
reviews-v1-545db77b95-f69kc       0/2     PodInitializing   0          42s
reviews-v2-7bf8c9648f-z4sgl       0/2     PodInitializing   0          42s
reviews-v3-84779c7bbc-cjtcj       0/2     PodInitializing   0          42s
productpage-v1-6b746f74dc-p76xs   0/2     PodInitializing   0          41s</pre>

##参考
https://istio.io/latest/docs/setup/getting-started/