【Istio實際操作篇】Istio入門,10分鐘快速安裝

@TOC

前言

上一篇講了什么是Istio的理論篇其做,這次我們就來實際操作。

想看上一篇理論篇的看這里(看完絕對有所收獲):
[Istio是什么?] 還不知道你就out了,一文40分鐘快速理解_小葉的技術(shù)Logs的博客-CSDN博客

本文說明 請大家務(wù)必查看

本文有兩個版本,詳細版惭适、簡潔版

前者適合新手楼镐,后者適合老手(方便大家查找癞志,從而過濾掉某些步驟,節(jié)約時間成本) 所以大家按需查看喲框产。

詳細版 簡潔版

簡潔版:包含所有步驟凄杯,以及命令的執(zhí)行過程(適合新手)

簡潔版:只包含命令(適合有一定熟練度的人)

環(huán)境準(zhǔn)備


系統(tǒng) Vcpu Memory 集群
centos7 2 8 kubernetes

詳細版

入門:搭建步驟

Istio軟件包下載

安裝最新軟件包

$ curl -L https://istio.io/downloadIstio | sh -  # 安裝最新軟件包

這一條命令如果下載不下來,可以直接訪問下載地址:Istio下載

挑選對應(yīng)的istio版本秉宿、下載對應(yīng)的壓縮文件戒突,如圖所示:
注意:Istio1.13.3版本,要求kubernetes最低集群版是1.19

image.png

解壓軟件包:

[root@master istio]# ll
total 22704
-rw-r--r-- 1 root root 23245765 Apr 23 10:39 istio-1.12.3-linux-amd64.tar.gz
[root@master istio]# tar -vzxf istio-1.12.3-linux-amd64.tar.gz
istio-1.12.3/
istio-1.12.3/manifest.yaml
istio-1.12.3/bin/
istio-1.12.3/bin/istioctl
istio-1.12.3/manifests/
istio-1.12.3/manifests/examples/
istio-1.12.3/manifests/examples/customresource/
istio-1.12.3/manifests/examples/customresource/istio_v1alpha1_istiooperator_cr.yaml
istio-1.12.3/manifests/examples/user-gateway/

安裝目錄包含:

  • samples/ 目錄下的示例應(yīng)用程序
  • bin/ 目錄下的 istioctl 客戶端二進制文件 .

配置環(huán)境變量:

[root@master istio]# cat /etc/profile
export ISTIO_HOME=/root/istio/istio-1.12.3  
export PATH=$PATH:$ISTIO_HOME/bin
[root@master istio]# istioctl version
client version: 1.12.3
control plane version: 1.12.3
data plane version: 1.12.3 (10 proxies)

下載Istio

[root@master ~]# istioctl install --set profile=demo -y
Detected that your cluster does not support third party JWT authentication. Falling back to less secure first party JWT. See https://istio.io/v1.12/docs/ops/best-practices/security/#configure-third-party-service-account-tokens for details.
! values.global.jwtPolicy is deprecated; use Values.global.jwtPolicy=third-party-jwt. See http://istio.io/latest/docs/ops/best-practices/security/#configure-third-party-service-account-tokens for more information instead
WARNING: Istio control planes installed: 1.13.3.
WARNING: An older installed version of Istio has been detected. Running this command will overwrite it.
? Istio core installed
? Istiod installed
? Egress gateways installed
? Ingress gateways installed
? Installation complete                                                                                                         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

自動注入 Envoy 邊車代理

[root@master ~]#  kubectl label namespace default istio-injection=enabled
namespace/default labeled

卸載

完整卸載 Istio

[root@master istio]# istioctl x uninstall --purge
All Istio resources will be pruned from the cluster
Proceed? (y/N) y
  Removed IstioOperator:istio-system:installed-state.
  Removed PodDisruptionBudget:istio-system:istio-egressgateway.
  Removed PodDisruptionBudget:istio-system:istio-ingressgateway.
  Removed PodDisruptionBudget:istio-system:istiod.
  Removed Deployment:istio-system:istio-egressgateway.
  Removed Deployment:istio-system:istio-ingressgateway.
  Removed Deployment:istio-system:istiod.
  Removed Service:istio-system:istio-egressgateway.
  Removed Service:istio-system:istio-ingressgateway.
  Removed Service:istio-system:istiod.
  Removed ConfigMap:istio-system:istio.
  Removed ConfigMap:istio-system:istio-sidecar-injector.
  Removed Pod:istio-system:istio-egressgateway-6b69dfb9f8-x7zwb.
  Removed Pod:istio-system:istio-ingressgateway-7484f57fd6-hrjjt.
  Removed Pod:istio-system:istiod-7989b7749b-rmslt.

簡潔版

安裝

[root@master istio]# curl -L https://istio.io/downloadIstio | sh -
[root@master istio]# tar -vzxf istio-1.12.3-linux-amd64.tar.gz
[root@master istio]# cat /etc/profile
export ISTIO_HOME=/root/istio/istio-1.12.3  
export PATH=$PATH:$ISTIO_HOME/bin
[root@master ~]# istioctl install --set profile=demo -y
[root@master istio]# kubectl label namespace default istio-injection=enabled

卸載

[root@master istio]# istioctl x uninstall --purge

學(xué)習(xí)不走彎路描睦,gz號「yeTechLog」

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末膊存,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子忱叭,更是在濱河造成了極大的恐慌隔崎,老刑警劉巖,帶你破解...
    沈念sama閱讀 218,525評論 6 507
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件韵丑,死亡現(xiàn)場離奇詭異仍稀,居然都是意外死亡,警方通過查閱死者的電腦和手機埂息,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,203評論 3 395
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人千康,你說我怎么就攤上這事享幽。” “怎么了拾弃?”我有些...
    開封第一講書人閱讀 164,862評論 0 354
  • 文/不壞的土叔 我叫張陵值桩,是天一觀的道長。 經(jīng)常有香客問我豪椿,道長奔坟,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 58,728評論 1 294
  • 正文 為了忘掉前任搭盾,我火速辦了婚禮咳秉,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘鸯隅。我一直安慰自己澜建,他們只是感情好,可當(dāng)我...
    茶點故事閱讀 67,743評論 6 392
  • 文/花漫 我一把揭開白布蝌以。 她就那樣靜靜地躺著炕舵,像睡著了一般。 火紅的嫁衣襯著肌膚如雪跟畅。 梳的紋絲不亂的頭發(fā)上咽筋,一...
    開封第一講書人閱讀 51,590評論 1 305
  • 那天署恍,我揣著相機與錄音亚侠,去河邊找鬼翘单。 笑死剧包,一個胖子當(dāng)著我的面吹牛破镰,可吹牛的內(nèi)容都是我干的贤牛。 我是一名探鬼主播邪蛔,決...
    沈念sama閱讀 40,330評論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼蜂大,長吁一口氣:“原來是場噩夢啊……” “哼皆疹!你這毒婦竟也來了疏橄?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 39,244評論 0 276
  • 序言:老撾萬榮一對情侶失蹤略就,失蹤者是張志新(化名)和其女友劉穎捎迫,沒想到半個月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體表牢,經(jīng)...
    沈念sama閱讀 45,693評論 1 314
  • 正文 獨居荒郊野嶺守林人離奇死亡窄绒,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,885評論 3 336
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了崔兴。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片彰导。...
    茶點故事閱讀 40,001評論 1 348
  • 序言:一個原本活蹦亂跳的男人離奇死亡蛔翅,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出位谋,到底是詐尸還是另有隱情山析,我是刑警寧澤,帶...
    沈念sama閱讀 35,723評論 5 346
  • 正文 年R本政府宣布掏父,位于F島的核電站笋轨,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏赊淑。R本人自食惡果不足惜爵政,卻給世界環(huán)境...
    茶點故事閱讀 41,343評論 3 330
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望陶缺。 院中可真熱鬧钾挟,春花似錦、人聲如沸组哩。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,919評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽伶贰。三九已至蛛砰,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間黍衙,已是汗流浹背泥畅。 一陣腳步聲響...
    開封第一講書人閱讀 33,042評論 1 270
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留琅翻,地道東北人位仁。 一個月前我還...
    沈念sama閱讀 48,191評論 3 370
  • 正文 我出身青樓,卻偏偏與公主長得像方椎,于是被迫代替她去往敵國和親聂抢。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點故事閱讀 44,955評論 2 355

推薦閱讀更多精彩內(nèi)容