系列文章:ide
總目錄索引:九析帶你輕鬆完爆 istio 服務網格系列教程學習
目錄spa
1 前言插件
2 istio 之 profile3d
3 istioctl profileorm
3.1 demoblog
3.2 minimal教程
3.3 default索引
3.4 emptyip
3.5 remote
3.6 separate
4 總結
1 前言
若是你對博客有任何疑問,請告訴我。
2 istio 之 profile
在介紹 istio profile 以前,咱們先介紹一下電信的套餐:
咱們去電信開通手機業務時,通常都會選擇手機套餐,不一樣的手機套餐會提供不一樣的增值服務。如上圖所示,每一個套餐就是一個 profile。istioctl 在安裝 istio 時提供的 profile 概念與此相似,不一樣 profile 定義了不一樣的 istio 控制面行爲。
3 istioctl profile
使用以下命令查看 istioctl profile:
istioctl profile list
執行結果以下圖所示:
3.1 demo
demo profile 僅供學習使用,並不合適做爲生產環境。該 profile 會安裝 ingressgateway、egressgateway、istio-pilot 等 istio 組件,同時會安裝 grafana、istio-tracing、kiali、prometheus 等外部插件。使用以下命令查看 demo profile 的 istio 安裝配置清單:
istioctl profile dump demo
從 dump 出的 profile 來看,最重要的是兩塊配置:插件和組件。插件是指外部第三方依賴,好比 grafana、kiali、prometheus、tracing;組件是指 istio 自身的組件,好比 citadel、egressgateway、ingressgateway、pilot、policy、sidecarInjector、telemetry 等。以下截圖所示:
部分組件信息以下截圖所示:
總結 demo profile 的組件、插件的開關狀況信息以下截圖所示,其中 X 表明開啓組件或插件:
3.2 minimal
minimal profile 僅僅開啓了 pilot 組件,其餘的組件或者插件都是關閉的狀態,能夠經過以下命令查看明細:
istioctl profile dump minimal > minimal.yaml
以下圖所示,minimal 插件都是關閉的:
僅有 pilot 組件是開啓狀態:
符合官方描述,以下圖所示:
3.3 default
default 是官方推薦的 istio 安裝 profile。它在組件和插件的選擇上作到了最合適,好比組件中它只開啓了 ingressgateway、pilot,插件中只開啓了 prometheus。以下圖所示:
3.4 empty
empty profile 不會開啓任何組件或者插件。該 profile 的做用是提供一個乾淨的模板供有經驗的 istio 使用者自定義配置。
3.5 remote
remote profile 在實際使用中狀況並很少見。該 profile 提供共享控制面去操做多集羣服務網格。remote profile 官方提供的組件、插件描述以下圖所示,可是根據本人實際觀察,發現並不許確,特別標註在下圖中:
dump 出的 ingress-gateway 組件應該處於開啓狀態:
dump 出來的 pilot 組件應該處於開啓狀態:
3.6 separate
官方宣稱 separate profile 在將來的版本中將要被廢棄掉了,因此就直接略過不提了吧。你們都生活得夠艱難了,就不要給本身找麻煩了。
4 總結
本小節介紹了 istioctl 安裝 istio 時提供的各個 profile,已經能夠覆蓋 90% 上的工做場景了。可是有些技術小騷仍然不會知足,那麼後續哥將會繼續提供自定義配置安裝的方法,請繼續跟隨九析的腳步,咱們一同輕鬆完爆 istio。