91视频专区

《甜蜜惩罚》高清完整版免费播放 - 印度破案剧 - 星辰...

首先就是提速,根据目前的路况,采用不同的加速方案。在城区提速,只要不是超车的情况,脚可以踩柔一点,就是渐加速。一般城市道路上,加速到60码就算是比较快了。

2025年01月13日,而这些小火锅能够开的起来,也是因为他们把运营的成本费压到了极致。

《甜蜜惩罚》高清完整版免费播放 - 印度破案剧 - 星辰...

不料石破天也是一呆这一招‘朝天势’他从未见过史婆婆也没教过破法不知如何拆解才是可是在‘气寒西北’的长剑之前又有谁能呆上一呆石破天只是这么稍一迟疑白万剑长剑犹似电闪中宫直进剑尖已指住了他心口喝道:怎么样

相反地,一些基金则选择“拥抱”础滨,尽享盛宴。老胡今年36岁了,他在这家公司有六七年的时间了,这是他最喜欢的一家公司,收入还可以,老婆在年初的时候确认怀孕了,因为年龄的缘故,也就辞职在家专心养胎了。本以为在这家公司可以一直稳定的做到退休

nenggoupeiyangchuruciyouxiudenver,shenweimuqindetakendinghuishifendezihao。2024-07-06 10:16·zhiboba

8.罗(尝耻辞)定(顿颈苍驳)豆(顿辞耻)豉(窜耻辞)鸡(闯颈)

测耻别蝉丑颈谤别苍箩颈丑补苍锄丑颈诲别诲颈蹿补苍驳,测耻别肠丑辞苍驳尘补苍虫颈测颈苍濒颈,丑别办耻补苍驳丑补辞肠丑别苍驳“飞补苍蝉丑补苍锄丑颈锄耻”诲别办耻苍濒耻苍蝉丑补苍。锄补颈虫颈苍箩颈补苍驳箩颈苍驳苍别颈,测辞耻濒颈补苍驳锄耻辞丑别苍测辞耻迟别诲颈补苍诲别虫颈补苍驳濒颈苍肠丑别苍驳蝉丑颈箩颈耻飞别颈测耻办耻苍濒耻苍蝉丑补苍箩颈补辞虫颈补,测颈驳别蝉丑颈测颈苍丑别迟颈补苍测耻别谤飞别苍尘颈苍驳诲别丑别迟颈补苍蝉丑颈,濒颈苍驳测颈驳别蝉丑颈办耻苍测耻蝉丑颈。诲补苍驳谤补苍,箩耻迟颈锄别苍尘别虫耻补苍丑耻补苍蝉丑颈测补辞办补苍诲补箩颈补诲别虫耻辩颈耻,诲补苍飞辞丑别苍辩耻别诲颈苍驳诲别蝉丑颈,虫颈补苍锄补颈驳耻辞肠丑补苍丑别丑别锄颈肠丑补苍驳箩颈补诲耻迟颈苍驳箩耻补苍,产补箩颈补驳别箩耻补苍虫颈补濒补颈,诲耻颈虫颈补辞蹿别颈锄丑别箩耻别诲耻颈蝉丑颈箩颈补苍丑补辞蝉丑颈。

Apache Pulsar学(Xue)习(Xi)笔(Bi)记(Ji)14: 使(Shi)用(Yong)Helm在(Zai)Kubernetes集(Ji)群(Qun)中(Zhong)部(Bu)署(Shu)Pulsar原(Yuan)创(Chuang)2021-12-31 18:22·架(Jia)构(Gou)小(Xiao)白(Bai)时(Shi)间(Jian)过(Guo)得(De)比(Bi)较(Jiao)久(Jiu)了(Liao),在(Zai)开(Kai)始(Shi)今(Jin)天(Tian)的(De)学(Xue)习(Xi)之(Zhi)前(Qian)先(Xian)回(Hui)顾(Gu)一(Yi)下(Xia)前(Qian)面(Mian)已(Yi)经(Jing)学(Xue)习(Xi)的(De)13节(Jie)的(De)内(Nei)容(Rong)。0.阶(Jie)段(Duan)复(Fu)习(Xi)Pulsar是(Shi)一(Yi)个(Ge)支(Zhi)持(Chi)多(Duo)租(Zu)户(Hu)的(De)、高(Gao)性(Xing)能(Neng)的(De)、分(Fen)布(Bu)式(Shi)的(De)Pub-Sub消(Xiao)息(Xi)系(Xi)统(Tong)。了(Liao)解(Jie)Pulsar的(De)架(Jia)构(Gou)。Pulsar提(Ti)供(Gong)了(Liao)一(Yi)个(Ge)比(Bi)Cluster更(Geng)高(Gao)级(Ji)别(Bie)的(De)抽(Chou)象(Xiang)Instance。一(Yi)个(Ge)Pulsar Instance由(You)多(Duo)个(Ge)Pulsar Cluster组(Zu)成(Cheng)一(Yi)个(Ge)Instance中(Zhong)的(De)Cluster之(Zhi)间(Jian)可(Ke)以(Yi)相(Xiang)互(Hu)跨(Kua)地(Di)域(Yu)复(Fu)制(Zhi)数(Shu)据(Ju)单(Dan)个(Ge)Pulsar集(Ji)群(Qun)由(You)以(Yi)下(Xia)部(Bu)分(Fen)组(Zu)成(Cheng):Pulsar Proxy: 是(Shi)无(Wu)状(Zhuang)态(Tai)的(De),Proxy作(Zuo)为(Wei)集(Ji)群(Qun)的(De)智(Zhi)能(Neng)路(Lu)由(You)层(Ceng),是(Shi)负(Fu)责(Ze)Pulsar客(Ke)户(Hu)端(Duan)与(Yu)Pulsar集(Ji)群(Qun)交(Jiao)互(Hu)的(De)统(Tong)一(Yi)网(Wang)关(Guan)Pulsar Brokers: 也(Ye)是(Shi)无(Wu)状(Zhuang)态(Tai)的(De),是(Shi)集(Ji)群(Qun)的(De)服(Fu)务(Wu)层(Ceng),Proxy会(Hui)将(Jiang)客(Ke)户(Hu)端(Duan)的(De)访(Fang)问(Wen)请(Qing)求(Qiu)转(Zhuan)发(Fa)到(Dao)正(Zheng)确(Que)的(De)Broker上(Shang)。Broker作(Zuo)为(Wei)服(Fu)务(Wu)层(Ceng)与(Yu)Pulsar的(De)存(Cun)储(Chu)层(Ceng)进(Jin)行(Xing)交(Jiao)互(Hu)Bookies: 一(Yi)个(Ge)集(Ji)群(Qun)有(You)多(Duo)个(Ge)Bookie节(Jie)点(Dian)(组(Zu)成(Cheng)Bookeeper集(Ji)群(Qun))负(Fu)责(Ze)消(Xiao)息(Xi)的(De)持(Chi)久(Jiu)化(Hua)存(Cun)储(Chu)Zookeeper: 用(Yong)于(Yu)集(Ji)群(Qun)级(Ji)别(Bie)的(De)配(Pei)置(Zhi)和(He)协(Xie)调(Diao),并(Bing)存(Cun)储(Chu)Pulsar集(Ji)群(Qun)的(De)所(Suo)有(You)元(Yuan)数(Shu)据(Ju)以(Yi)docker容(Rong)器(Qi)运(Yun)行(Xing)单(Dan)机(Ji)Pulsar学(Xue)习(Xi)使(Shi)用(Yong)命(Ming)令(Ling)行(Xing)工(Gong)具(Ju)pulsar-admin创(Chuang)建(Jian)tenant、namespace、topic了(Liao)解(Jie)Pulsar Admin REST APItenant、namespace、topic的(De)基(Ji)本(Ben)概(Gai)念(Nian)Pulsar基(Ji)于(Yu)租(Zu)户(Hu)、命(Ming)名(Ming)空(Kong)间(Jian)、主(Zhu)题(Ti)的(De)逻(Luo)辑(Ji)层(Ceng)次(Ci)结(Jie)构(Gou)支(Zhi)持(Chi)多(Duo)租(Zu)户(Hu)分(Fen)区(Qu)Topic的(De)概(Gai)念(Nian)Topic URL格(Ge)式(Shi)持(Chi)久(Jiu)化(Hua)Topic和(He)非(Fei)持(Chi)久(Jiu)化(Hua)Topic的(De)概(Gai)念(Nian)生(Sheng)产(Chan)者(Zhe)和(He)消(Xiao)费(Fei)者(Zhe)、订(Ding)阅(Yue)和(He)订(Ding)阅(Yue)模(Mo)式(Shi)Pulsar支(Zhi)持(Chi): exclusive(独(Du)占(Zhan)), failover(故(Gu)障(Zhang)转(Zhuan)移(Yi)/灾(Zai)备(Bei)), shared(共(Gong)享(Xiang)), key-shared(基(Ji)于(Yu)key的(De)共(Gong)享(Xiang)模(Mo)式(Shi)) 4中(Zhong)订(Ding)阅(Yue)模(Mo)式(Shi)使(Shi)用(Yong)命(Ming)令(Ling)行(Xing)工(Gong)具(Ju)pulsar-client进(Jin)行(Xing)生(Sheng)产(Chan)者(Zhe)和(He)消(Xiao)费(Fei)者(Zhe)测(Ce)试(Shi)使(Shi)用(Yong)Pulsar Java客(Ke)户(Hu)端(Duan)库(Ku)创(Chuang)建(Jian)生(Sheng)产(Chan)者(Zhe)、消(Xiao)费(Fei)者(Zhe)、Reader消(Xiao)费(Fei)者(Zhe)端(Duan)可(Ke)以(Yi)使(Shi)用(Yong)"同(Tong)步(Bu)接(Jie)收(Shou)消(Xiao)息(Xi)", "异(Yi)步(Bu)接(Jie)收(Shou)消(Xiao)息(Xi)", "MessageListener接(Jie)收(Shou)" 3种(Zhong)模(Mo)式(Shi),其(Qi)中(Zhong)MessageListener自(Zi)带(Dai)线(Xian)程(Cheng)池(Chi)创(Chuang)建(Jian)消(Xiao)费(Fei)者(Zhe)时(Shi)可(Ke)以(Yi)设(She)置(Zhi)消(Xiao)费(Fei)者(Zhe)的(De)批(Pi)量(Liang)接(Jie)收(Shou)策(Ce)略(Lue)多(Duo)主(Zhu)题(Ti)订(Ding)阅(Yue): 设(She)置(Zhi)单(Dan)个(Ge)消(Xiao)费(Fei)者(Zhe)订(Ding)阅(Yue)多(Duo)个(Ge)主(Zhu)题(Ti)消(Xiao)费(Fei)异(Yi)常(Chang)处(Chu)理(Li)可(Ke)以(Yi)使(Shi)用(Yong)"无(Wu)限(Xian)重(Zhong)试(Shi)", "捕(Bo)获(Huo)并(Bing)忽(Hu)略(Lue)异(Yi)常(Chang)", "死(Si)信(Xin)主(Zhu)题(Ti)(Dead Letter Topic)"三(San)种(Zhong)方(Fang)式(Shi)使(Shi)用(Yong)消(Xiao)息(Xi)Reader可(Ke)以(Yi)由(You)用(Yong)户(Hu)自(Zi)己(Ji)手(Shou)动(Dong)在(Zai)Topic中(Zhong)定(Ding)位(Wei),读(Du)取(Qu)想(Xiang)要(Yao)读(Du)取(Qu)的(De)消(Xiao)息(Xi)使(Shi)用(Yong)Pulsar Go客(Ke)户(Hu)端(Duan)库(Ku)消(Xiao)费(Fei)者(Zhe)端(Duan)支(Zhi)持(Chi)consumer.Receive()和(He)consumer.Chan()两(Liang)种(Zhong)方(Fang)式(Shi)消(Xiao)费(Fei)消(Xiao)息(Xi)。前(Qian)者(Zhe)对(Dui)channel关(Guan)闭(Bi)和(He)context cancel的(De)情(Qing)况(Kuang)做(Zuo)了(Liao)封(Feng)装(Zhuang),后(Hou)者(Zhe)要(Yao)我(Wo)们(Men)自(Zi)己(Ji)处(Chu)理(Li)和(He)channel的(De)交(Jiao)互(Hu),但(Dan)也(Ye)提(Ti)供(Gong)了(Liao)最(Zui)大(Da)的(De)灵(Ling)活(Huo)性(Xing)。多(Duo)主(Zhu)题(Ti)订(Ding)阅(Yue)死(Si)信(Xin)策(Ce)略(Lue)和(He)死(Si)信(Xin)主(Zhu)题(Ti)使(Shi)用(Yong)消(Xiao)息(Xi)Reader使(Shi)用(Yong)Pulsar Schema管(Guan)理(Li)消(Xiao)息(Xi)数(Shu)据(Ju)的(De)类(Lei)型(Xing)安(An)全(Quan)性(Xing)Web图(Tu)形(Xing)化(Hua)管(Guan)理(Li)工(Gong)具(Ju)Pulsar Manager延(Yan)迟(Chi)消(Xiao)息(Xi)投(Tou)递(Di)特(Te)性(Xing)指(Zhi)定(Ding)多(Duo)长(Chang)时(Shi)间(Jian)后(Hou)投(Tou)递(Di)deliverAfter指(Zhi)定(Ding)在(Zai)将(Jiang)来(Lai)某(Mou)个(Ge)时(Shi)间(Jian)点(Dian)投(Tou)递(Di)deliverAt分(Fen)区(Qu)Topic和(He)路(Lu)由(You)模(Mo)式(Shi)认(Ren)证(Zheng)和(He)授(Shou)权(Quan)开(Kai)启(Qi)JWT身(Shen)份(Fen)认(Ren)证(Zheng)授(Shou)权(Quan)和(He)权(Quan)限(Xian)管(Guan)理(Li)前(Qian)面(Mian)的(De)学(Xue)习(Xi)一(Yi)直(Zhi)是(Shi)基(Ji)于(Yu)以(Yi)docker容(Rong)器(Qi)启(Qi)动(Dong)的(De)单(Dan)机(Ji)Pulsar。今(Jin)天(Tian)将(Jiang)学(Xue)习(Xi)使(Shi)用(Yong)Helm在(Zai)Kubernetes集(Ji)群(Qun)中(Zhong)部(Bu)署(Shu)Pulsar集(Ji)群(Qun)。1.环(Huan)境(Jing)准(Zhun)备(Bei)这(Zhe)里(Li)使(Shi)用(Yong)的(De)Kubernetes集(Ji)群(Qun)的(De)版(Ban)本(Ben)是(Shi)1.22.4,Helm的(De)版(Ban)本(Ben)是(Shi)3.7.1。1.1 Pulsar集(Ji)群(Qun)组(Zu)件(Jian)和(He)K8S Node节(Jie)点(Dian)规(Gui)划(Hua)下(Xia)面(Mian)做(Zuo)一(Yi)下(Xia)Pulsar集(Ji)群(Qun)各(Ge)个(Ge)组(Zu)件(Jian)部(Bu)署(Shu)节(Jie)点(Dian)的(De)规(Gui)划(Hua)。使(Shi)用(Yong)Pulsar官(Guan)方(Fang)的(De)Helm Chart部(Bu)署(Shu)时(Shi),可(Ke)选(Xuan)择(Ze)部(Bu)署(Shu)各(Ge)个(Ge)组(Zu)件(Jian)。 在(Zai)后(Hou)边(Bian)的(De)配(Pei)置(Zhi)中(Zhong)将(Jiang)禁(Jin)用(Yong)监(Jian)控(Kong)相(Xiang)关(Guan)的(De)组(Zu)件(Jian)(promethues, grafana等(Deng)),我(Wo)们(Men)这(Zhe)里(Li)选(Xuan)择(Ze)以(Yi)后(Hou)尝(Chang)试(Shi)使(Shi)用(Yong)外(Wai)部(Bu)的(De)全(Quan)局(Ju)Prometheus实(Shi)现(Xian)对(Dui)Pulsar集(Ji)群(Qun)的(De)监(Jian)控(Kong)。本(Ben)节(Jie)选(Xuan)择(Ze)部(Bu)署(Shu)的(De)集(Ji)群(Qun)组(Zu)件(Jian)如(Ru)下(Xia):proxy: 无(Wu)状(Zhuang)态(Tai), 但(Dan)pulsar的(De)helm chart使(Shi)用(Yong)StatefulSet部(Bu)署(Shu)broker: 无(Wu)状(Zhuang)态(Tai), 但(Dan)pulsar的(De)helm chart使(Shi)用(Yong)StatefulSet部(Bu)署(Shu)bookie: 有(You)状(Zhuang)态(Tai), pulsar的(De)helm chart使(Shi)用(Yong)StatefulSet部(Bu)署(Shu)zookeeper: 有(You)状(Zhuang)态(Tai), pulsar的(De)helm chart使(Shi)用(Yong)StatefulSet部(Bu)署(Shu)recovery: 无(Wu)状(Zhuang)态(Tai), 但(Dan)pulsar的(De)helm chart使(Shi)用(Yong)StatefulSet部(Bu)署(Shu)toolset: 无(Wu)状(Zhuang)态(Tai), 但(Dan)pulsar的(De)helm chart使(Shi)用(Yong)StatefulSet部(Bu)署(Shu)pulsar-manager: 无(Wu)状(Zhuang)态(Tai), pulsar的(De)helm chart使(Shi)用(Yong)Deployment部(Bu)署(Shu)注(Zhu)意(Yi), pulsar-managers虽(Sui)然(Ran)是(Shi)无(Wu)状(Zhuang)态(Tai)的(De),但(Dan)因(Yin)为(Wei)它(Ta)需(Xu)要(Yao)使(Shi)用(Yong)PostgreSQL数(Shu)据(Ju)库(Ku),pulsar-managers的(De)docker镜(Jing)像(Xiang)中(Zhong)内(Nei)置(Zhi)一(Yi)个(Ge)PostgreSQL, 这(Zhe)个(Ge)我(Wo)们(Men)在(Zai)后(Hou)边(Bian)的(De)配(Pei)置(Zhi)中(Zhong)将(Jiang)改(Gai)为(Wei)使(Shi)用(Yong)集(Ji)群(Qun)外(Wai)部(Bu)的(De)PostgreSQL。下(Xia)面(Mian)说(Shuo)一(Yi)下(Xia)以(Yi)上(Shang)各(Ge)个(Ge)组(Zu)件(Jian)的(De)部(Bu)署(Shu)节(Jie)点(Dian)选(Xuan)择(Ze)。对(Dui)于(Yu)proxy, broker, recovery, toolset, pulsar-manager这(Zhe)5个(Ge)无(Wu)状(Zhuang)态(Tai)组(Zu)件(Jian),可(Ke)以(Yi)让(Rang)k8s将(Jiang)其(Qi)调(Diao)度(Du)到(Dao)任(Ren)意(Yi)节(Jie)点(Dian)上(Shang)。对(Dui)于(Yu)bookie, zookeeper这(Zhe)2个(Ge)有(You)状(Zhuang)态(Tai)组(Zu)件(Jian),需(Xu)要(Yao)我(Wo)们(Men)根(Gen)据(Ju)其(Qi)存(Cun)储(Chu)卷(Juan)的(De)类(Lei)型(Xing),将(Jiang)其(Qi)规(Gui)划(Hua)到(Dao)合(He)适(Shi)的(De)k8s节(Jie)点(Dian)。我(Wo)们(Men)在(Zai)线(Xian)上(Shang)环(Huan)境(Jing)对(Dui)于(Yu)有(You)状(Zhuang)态(Tai)服(Fu)务(Wu)的(De)部(Bu)署(Shu),在(Zai)存(Cun)储(Chu)卷(Juan)的(De)选(Xuan)择(Ze)上(Shang),为(Wei)了(Liao)更(Geng)好(Hao)的(De)性(Xing)能(Neng),一(Yi)般(Ban)都(Du)是(Shi)选(Xuan)择(Ze)Local Persistent Volumes 在(Zai)。因(Yin)此(Ci),如(Ru)果(Guo)你(Ni)在(Zai)规(Gui)划(Hua)一(Yi)个(Ge)线(Xian)上(Shang)版(Ban)本(Ben)的(De)Pulsar集(Ji)群(Qun)部(Bu)署(Shu)的(De)话(Hua),对(Dui)于(Yu)bookie和(He)zookeeper肯(Ken)定(Ding)需(Xu)要(Yao)单(Dan)独(Du)的(De)独(Du)立(Li)的(De)k8s节(Jie)点(Dian),并(Bing)使(Shi)用(Yong)这(Zhe)些(Xie)节(Jie)点(Dian)上(Shang)创(Chuang)建(Jian)的(De)Local PV。 例(Li)如(Ru),一(Yi)个(Ge)线(Xian)上(Shang)生(Sheng)产(Chan)可(Ke)用(Yong)的(De)Pulsar集(Ji)群(Qun)可(Ke)能(Neng)规(Gui)划(Hua)如(Ru)下(Xia):pulsar zookeeper集(Ji)群(Qun)至(Zhi)少(Shao)需(Xu)要(Yao)3个(Ge)独(Du)立(Li)的(De)k8s节(Jie)点(Dian), 在(Zai)这(Zhe)些(Xie)节(Jie)点(Dian)上(Shang)创(Chuang)建(Jian)zookeeper的(De)local pvpulsar bookeeper集(Ji)群(Qun)(bookie节(Jie)点(Dian)组(Zu)成(Cheng))根(Gen)据(Ju)规(Gui)划(Hua)的(De)容(Rong)量(Liang)需(Xu)要(Yao)N个(Ge)独(Du)立(Li)的(De)k8s节(Jie)点(Dian), 在(Zai)这(Zhe)些(Xie)节(Jie)点(Dian)上(Shang)创(Chuang)建(Jian)bookie的(De)local pv。如(Ru)果(Guo)后(Hou)续(Xu)需(Xu)要(Yao)扩(Kuo)容(Rong)增(Zeng)加(Jia)bookie节(Jie)点(Dian)时(Shi),只(Zhi)需(Xu)要(Yao)有(You)新(Xin)的(De)创(Chuang)建(Jian)好(Hao)local pv的(De)k8s节(Jie)点(Dian),并(Bing)对(Dui)bookie的(De)StatefulSet扩(Kuo)容(Rong)即(Ji)可(Ke)。pulsar proxy, broker等(Deng)无(Wu)状(Zhuang)态(Tai)服(Fu)务(Wu),只(Zhi)需(Xu)要(Yao)有(You)足(Zu)够(Gou)的(De)数(Shu)量(Liang)的(De)k8s节(Jie)点(Dian),并(Bing)在(Zai)需(Xu)要(Yao)时(Shi)按(An)需(Xu)扩(Kuo)容(Rong)即(Ji)可(Ke)因(Yin)本(Ben)文(Wen)这(Zhe)里(Li)用(Yong)于(Yu)实(Shi)验(Yan)的(De)k8s集(Ji)群(Qun)资(Zi)源(Yuan)有(You)限(Xian),所(Suo)以(Yi)尽(Jin)量(Liang)将(Jiang)上(Shang)面(Mian)各(Ge)组(Zu)件(Jian)在(Zai)3个(Ge)k8s节(Jie)点(Dian)上(Shang)混(Hun)部(Bu),将(Jiang)一(Yi)个(Ge)用(Yong)于(Yu)测(Ce)试(Shi)环(Huan)境(Jing)的(De)的(De)Pulsar集(Ji)群(Qun)规(Gui)划(Hua)如(Ru)下(Xia):k8s节(Jie)点(Dian)部(Bu)署(Shu)pulsar组(Zu)件(Jian)备(Bei)注(Zhu)node1zookeeper-0, bookie-0, broker-0, proxy-0线(Xian)上(Shang)环(Huan)境(Jing)bookie和(He)zookeeper一(Yi)定(Ding)要(Yao)在(Zai)单(Dan)独(Du)的(De)节(Jie)点(Dian)上(Shang)node2zookeeper-1, bookie-1, broker-1, proxy-1线(Xian)上(Shang)环(Huan)境(Jing)bookie和(He)zookeeper一(Yi)定(Ding)要(Yao)在(Zai)单(Dan)独(Du)的(De)节(Jie)点(Dian)上(Shang)node3zookeeper-2, bookie-2, broker-2, proxy-2线(Xian)上(Shang)环(Huan)境(Jing)bookie和(He)zookeeper一(Yi)定(Ding)要(Yao)在(Zai)单(Dan)独(Du)的(De)节(Jie)点(Dian)上(Shang)node1或(Huo)node2或(Huo)node3recovery-0, toolset-0, pulsar-manager基(Ji)于(Yu)上(Shang)面(Mian)测(Ce)试(Shi)环(Huan)境(Jing)的(De)规(Gui)划(Hua),我(Wo)们(Men)将(Jiang)node1~node3三(San)个(Ge)节(Jie)点(Dian)打(Da)上(Shang)Label和(He)Taint:kubectl label node node1 node-role.kubernetes.io/pulsar=pulsarkubectl label node node2 node-role.kubernetes.io/pulsar=pulsarkubectl label node node3 node-role.kubernetes.io/pulsar=pulsarkubectl taint nodes node1 dedicated=pulsar:NoSchedulekubectl taint nodes node2 dedicated=pulsar:NoSchedulekubectl taint nodes node3 dedicated=pulsar:NoScheduleLabel node-role.kubernetes.io/pulsar=pulsar用(Yong)于(Yu)标(Biao)记(Ji)节(Jie)点(Dian)是(Shi)专(Zhuan)门(Men)用(Yong)于(Yu)运(Yun)行(Xing)pulsar集(Ji)群(Qun)组(Zu)件(Jian)的(De)k8s节(Jie)点(Dian)。Taint dedicated=pulsar:NoSchedule被(Bei)打(Da)到(Dao)节(Jie)点(Dian)上(Shang)后(Hou),默(Mo)认(Ren)配(Pei)置(Zhi)下(Xia)k8s集(Ji)群(Qun)中(Zhong)的(De)其(Qi)他(Ta)不(Bu)属(Shu)于(Yu)pulsar集(Ji)群(Qun)组(Zu)件(Jian)的(De)pod将(Jiang)不(Bu)会(Hui)被(Bei)调(Diao)度(Du)到(Dao)这(Zhe)3个(Ge)节(Jie)点(Dian)上(Shang),而(Er)后(Hou)边(Bian)我(Wo)们(Men)将(Jiang)要(Yao)部(Bu)署(Shu)的(De)pulsar组(Zu)件(Jian)上(Shang)将(Jiang)会(Hui)使(Shi)用(Yong)Toleration配(Pei)置(Zhi)允(Yun)许(Xu)dedicated=pulsar:NoSchedule的(De)Taint。注(Zhu)意(Yi)这(Zhe)里(Li)只(Zhi)是(Shi)根(Gen)据(Ju)测(Ce)试(Shi)环(Huan)境(Jing)Pulsar集(Ji)群(Qun)的(De)规(Gui)划(Hua),做(Zuo)了(Liao)上(Shang)面(Mian)的(De)Label和(He)Taint的(De)设(She)置(Zhi),如(Ru)果(Guo)是(Shi)生(Sheng)产(Chan)环(Huan)境(Jing),这(Zhe)里(Li)的(De)Label和(He)Taint应(Ying)该(Gai)做(Zuo)更(Geng)合(He)理(Li)和(He)细(Xi)粒(Li)度(Du)的(De)规(Gui)划(Hua),确(Que)保(Bao)实(Shi)现(Xian)上(Shang)面(Mian)生(Sheng)产(Chan)可(Ke)用(Yong)Pulsar集(Ji)群(Qun)的(De)Node节(Jie)点(Dian)规(Gui)划(Hua)1.2 Pulsar集(Ji)群(Qun)组(Zu)件(Jian)容(Rong)器(Qi)镜(Jing)像(Xiang)准(Zhun)备(Bei)前(Qian)面(Mian)我(Wo)们(Men)选(Xuan)择(Ze)要(Yao)部(Bu)署(Shu)Pulsar集(Ji)群(Qun)的(De)proxy, broker, bookie, zookeeper, recovery, toolset, pulsar-manager 7大(Da)组(Zu)件(Jian)。其(Qi)中(Zhong)proxy, broker, bookie, zookeeper, recovery, toolset的(De)官(Guan)方(Fang)容(Rong)器(Qi)镜(Jing)像(Xiang)都(Du)是(Shi)apachepulsar/pulsar-all。 pulsar-manager的(De)官(Guan)方(Fang)镜(Jing)像(Xiang)是(Shi)apachepulsar/pulsar-manager。本(Ben)文(Wen)使(Shi)用(Yong)的(De)pulsar官(Guan)方(Fang)的(De)helm chart https://github.com/apache/pulsar-helm-chart/releases。pulsar-helm-chart的(De)版(Ban)本(Ben)为(Wei)2.7.7,该(Gai)版(Ban)本(Ben)中(Zhong)pulsar的(De)版(Ban)本(Ben)为(Wei)2.7.4, pulsar-manager版(Ban)本(Ben)为(Wei)v0.1.0:apachepulsar/pulsar-all:2.7.4apachepulsar/pulsar-manager:v0.1.0注(Zhu)意(Yi)因(Yin)为(Wei)pulsar-manager:v0.1.0有(You)这(Zhe)个(Ge)ISSUE https://github.com/apache/pulsar-helm-chart/issues/133中(Zhong)描(Miao)述(Shu)的(De)问(Wen)题(Ti),所(Suo)以(Yi)在(Zai)后(Hou)边(Bian)的(De)部(Bu)署(Shu)将(Jiang)镜(Jing)像(Xiang)pulsar-manager:v0.1.0更(Geng)换(Huan)成(Cheng)了(Liao)pulsar-manager:v0.2.0。为(Wei)了(Liao)提(Ti)高(Gao)效(Xiao)率(Lv),这(Zhe)里(Li)将(Jiang)apachepulsar/pulsar-all:2.7.4和(He)apachepulsar/pulsar-manager:v0.2.0这(Zhe)两(Liang)个(Ge)镜(Jing)像(Xiang)转(Zhuan)存(Cun)到(Dao)了(Liao)k8s集(Ji)群(Qun)所(Suo)使(Shi)用(Yong)的(De)私(Si)有(You)镜(Jing)像(Xiang)仓(Cang)库(Ku)中(Zhong),例(Li)如(Ru):harbor.example.com/library/apachepulsar/pulsar-all:2.7.4harbor.example.com/library/apachepulsar/pulsar-manager:v0.2.01.3 创(Chuang)建(Jian)JWT认(Ren)证(Zheng)所(Suo)需(Xu)的(De)K8S Secret这(Zhe)里(Li)部(Bu)署(Shu)的(De)Pulsar集(Ji)群(Qun)需(Xu)要(Yao)在(Zai)安(An)全(Quan)上(Shang)开(Kai)通(Tong)JWT认(Ren)证(Zheng)。根(Gen)据(Ju)前(Qian)面(Mian)学(Xue)习(Xi)的(De)内(Nei)容(Rong),JWT支(Zhi)持(Chi)通(Tong)过(Guo)两(Liang)种(Zhong)不(Bu)同(Tong)的(De)秘(Mi)钥(Yue)生(Sheng)成(Cheng)和(He)验(Yan)证(Zheng)Token:对(Dui)称(Cheng)秘(Mi)钥(Yue):使(Shi)用(Yong)单(Dan)个(Ge)Secret key来(Lai)生(Sheng)成(Cheng)和(He)验(Yan)证(Zheng)Token非(Fei)对(Dui)称(Cheng)秘(Mi)钥(Yue):包(Bao)含(Han)由(You)私(Si)钥(Yue)和(He)公(Gong)钥(Yue)组(Zu)成(Cheng)的(De)一(Yi)对(Dui)密(Mi)钥(Yue)使(Shi)用(Yong)Private key生(Sheng)成(Cheng)Token使(Shi)用(Yong)Public key验(Yan)证(Zheng)Token推(Tui)荐(Jian)使(Shi)用(Yong)非(Fei)对(Dui)称(Cheng)密(Mi)钥(Yue)的(De)方(Fang)式(Shi),需(Xu)要(Yao)先(Xian)生(Sheng)成(Cheng)密(Mi)钥(Yue)对(Dui),再(Zai)用(Yong)秘(Mi)钥(Yue)生(Sheng)成(Cheng)token。因(Yin)为(Wei)Pulsar被(Bei)部(Bu)署(Shu)在(Zai)K8S集(Ji)群(Qun)中(Zhong),在(Zai)K8S集(Ji)群(Qun)中(Zhong)存(Cun)储(Chu)这(Zhe)些(Xie)秘(Mi)钥(Yue)和(He)Token的(De)最(Zui)好(Hao)的(De)方(Fang)式(Shi)是(Shi)使(Shi)用(Yong)K8S的(De)Secret。pulsar-helm-chart专(Zhuan)门(Men)提(Ti)供(Gong)了(Liao)一(Yi)个(Ge)prepare_helm_release.sh脚(Jiao)本(Ben),可(Ke)以(Yi)用(Yong)来(Lai)生(Sheng)成(Cheng)这(Zhe)些(Xie)Secret。下(Xia)面(Mian)我(Wo)们(Men)将(Jiang)pulsar-helm-chart的(De)源(Yuan)码(Ma)clone到(Dao)K8S的(De)控(Kong)制(Zhi)节(Jie)点(Dian)上(Shang)(kubectl和(He)helm可(Ke)用(Yong)的(De)节(Jie)点(Dian)):git clone -b pulsar-2.7.7 --depth 1 https://github.com/apache/pulsar-helm-chart.gitcd pulsar-helm-chart/执(Zhi)行(Xing)下(Xia)面(Mian)的(De)命(Ming)令(Ling)生(Sheng)成(Cheng)秘(Mi)钥(Yue)对(Dui)和(He)Token的(De)Secret的(De)Manifest:./scripts/pulsar/prepare_helm_release.sh \ -n pulsar \ -k pulsar \ -l上(Shang)面(Mian)的(De)命(Ming)令(Ling)中(Zhong):-n指(Zhi)定(Ding)的(De)生(Sheng)成(Cheng)Secret Manifest中(Zhong)安(An)装(Zhuang)的(De)命(Ming)名(Ming)空(Kong)间(Jian),这(Zhe)里(Li)我(Wo)是(Shi)将(Jiang)其(Qi)部(Bu)署(Shu)到(Dao)K8S中(Zhong)的(De)pulsar namespace中(Zhong),所(Suo)以(Yi)指(Zhi)定(Ding)为(Wei)pulsar,当(Dang)然(Ran)也(Ye)可(Ke)以(Yi)指(Zhi)定(Ding)部(Bu)署(Shu)到(Dao)其(Qi)他(Ta)的(De)namespace中(Zhong)。-k指(Zhi)定(Ding)的(De)是(Shi)使(Shi)用(Yong)helm部(Bu)署(Shu)时(Shi)的(De)helm release名(Ming)称(Cheng),这(Zhe)里(Li)指(Zhi)定(Ding)为(Wei)pulsar。-l指(Zhi)定(Ding)只(Zhi)将(Jiang)生(Sheng)成(Cheng)的(De)内(Nei)容(Rong)输(Shu)出(Chu)达(Da)到(Dao)本(Ben)地(Di),而(Er)不(Bu)会(Hui)自(Zi)动(Dong)部(Bu)署(Shu)到(Dao)K8S中(Zhong)。比(Bi)较(Jiao)喜(Xi)欢(Huan)这(Zhe)种(Zhong)手(Shou)动(Dong)的(De)方(Fang)式(Shi),因(Yin)为(Wei)一(Yi)切(Qie)比(Bi)较(Jiao)可(Ke)控(Kong)。注(Zhu)意(Yi)这(Zhe)个(Ge)脚(Jiao)本(Ben)还(Huan)有(You)一(Yi)个(Ge)-s,--symmetric参(Can)数(Shu),如(Ru)果(Guo)给(Gei)这(Zhe)个(Ge)参(Can)数(Shu)的(De)话(Hua),JWT认(Ren)证(Zheng)将(Jiang)使(Shi)用(Yong)对(Dui)称(Cheng)秘(Mi)钥(Yue)的(De)方(Fang)式(Shi),这(Zhe)里(Li)没(Mei)有(You)给(Gei)这(Zhe)个(Ge)参(Can)数(Shu),就(Jiu)使(Shi)用(Yong)非(Fei)对(Dui)称(Cheng)秘(Mi)钥(Yue)的(De)方(Fang)式(Shi)。执(Zhi)行(Xing)上(Shang)面(Mian)的(De)脚(Jiao)本(Ben)会(Hui)输(Shu)出(Chu)以(Yi)下(Xia)内(Nei)容(Rong):generate the token keys for the pulsar cluster---The private key and public key are generated to ... successfully.apiVersion: v1data: PRIVATEKEY: <...> PUBLICKEY: <...>kind: Secretmetadata: creationTimestamp: null name: pulsar-token-asymmetric-key namespace: pulsargenerate the tokens for the super-users: proxy-admin,broker-admin,admingenerate the token for proxy-admin---pulsar-token-asymmetric-keyapiVersion: v1data: TOKEN: <...> TYPE: YXN5bW1ldHJpYw==kind: Secretmetadata: creationTimestamp: null name: pulsar-token-proxy-admin namespace: pulsargenerate the token for broker-admin---pulsar-token-asymmetric-keyapiVersion: v1data: TOKEN: <...> TYPE: YXN5bW1ldHJpYw==kind: Secretmetadata: creationTimestamp: null name: pulsar-token-broker-admin namespace: pulsargenerate the token for admin---pulsar-token-asymmetric-keyapiVersion: v1data: TOKEN: <...> TYPE: YXN5bW1ldHJpYw==kind: Secretmetadata: creationTimestamp: null name: pulsar-token-admin namespace: pulsar-------------------------------------The jwt token secret keys are generated under: - 'pulsar-token-asymmetric-key'The jwt tokens for superusers are generated and stored as below: - 'proxy-admin':secret('pulsar-token-proxy-admin') - 'broker-admin':secret('pulsar-token-broker-admin') - 'admin':secret('pulsar-token-admin')从(Cong)输(Shu)出(Chu)可(Ke)以(Yi)看(Kan)出(Chu),该(Gai)脚(Jiao)本(Ben)生(Sheng)成(Cheng)了(Liao)4个(Ge)K8S Secret的(De)Manifest:pulsar-token-asymmetric-key这(Zhe)个(Ge)Secret中(Zhong)是(Shi)用(Yong)于(Yu)生(Sheng)成(Cheng)Token和(He)验(Yan)证(Zheng)Token的(De)私(Si)钥(Yue)和(He)公(Gong)钥(Yue)pulsar-token-proxy-admin这(Zhe)个(Ge)Secret中(Zhong)是(Shi)用(Yong)于(Yu)proxy的(De)超(Chao)级(Ji)用(Yong)户(Hu)角(Jiao)色(Se)Tokenpulsar-token-broker-admin这(Zhe)个(Ge)Secret中(Zhong)是(Shi)用(Yong)于(Yu)broker的(De)超(Chao)级(Ji)用(Yong)户(Hu)角(Jiao)色(Se)Tokenpulsar-token-admin这(Zhe)个(Ge)Secret中(Zhong)是(Shi)用(Yong)于(Yu)管(Guan)理(Li)客(Ke)户(Hu)端(Duan)的(De)超(Chao)级(Ji)用(Yong)户(Hu)角(Jiao)色(Se)Token接(Jie)下(Xia)来(Lai)手(Shou)动(Dong)将(Jiang)这(Zhe)4个(Ge)Secret使(Shi)用(Yong)kubectl apply创(Chuang)建(Jian)到(Dao)K8S的(De)pulsar命(Ming)名(Ming)空(Kong)间(Jian)中(Zhong)。 创(Chuang)建(Jian)完(Wan)成(Cheng)后(Hou),可(Ke)以(Yi)使(Shi)用(Yong)kubectl找(Zhao)到(Dao)它(Ta)们(Men):kubectl get secret -n pulsar | grep pulsar-tokenpulsar-token-admin Opaque 2 5mpulsar-token-asymmetric-key Opaque 2 5mpulsar-token-broker-admin Opaque 2 5mpulsar-token-proxy-admin Opaque 2 5m1.4 创(Chuang)建(Jian)Zookeeper和(He)Bookie的(De)Local PV根(Gen)据(Ju)部(Bu)署(Shu)Pulsar的(De)K8S节(Jie)点(Dian)的(De)规(Gui)划(Hua),下(Xia)面(Mian)需(Xu)要(Yao)为(Wei)zookeeper, bookie所(Suo)在(Zai)的(De)节(Jie)点(Dian)在(Zai)K8S上(Shang)创(Chuang)建(Jian)Local Persistent Volume。注(Zhu)意(Yi)每(Mei)个(Ge)zookeeper节(Jie)点(Dian)需(Xu)要(Yao)一(Yi)个(Ge)data的(De)local volume,每(Mei)个(Ge)bookie节(Jie)点(Dian)需(Xu)要(Yao)journal和(He)ledgers共(Gong)两(Liang)个(Ge)local volume。在(Zai)创(Chuang)建(Jian)Local PV之(Zhi)前(Qian),需(Xu)要(Yao)确(Que)认(Ren)一(Yi)下(Xia)k8s中(Zhong)存(Cun)在(Zai)StorageClasslocal-storage,如(Ru)果(Guo)没(Mei)有(You)可(Ke)以(Yi)使(Shi)用(Yong)下(Xia)面(Mian)的(De)manifest创(Chuang)建(Jian)。apiVersion: storage.k8s.io/v1kind: StorageClassmetadata: name: local-storageprovisioner: kubernetes.io/no-provisionervolumeBindingMode: WaitForFirstConsumerreclaimPolicy: Retain注(Zhu)意(Yi)现(Xian)在(Zai)的(De)K8S中(Zhong)不(Bu)在(Zai)直(Zhi)接(Jie)提(Ti)供(Gong)local volume的(De)provisioner,这(Zhe)里(Li)也(Ye)没(Mei)有(You)使(Shi)用(Yong)provisioner,因(Yin)此(Ci)后(Hou)续(Xu)对(Dui)local volume的(De)创(Chuang)建(Jian)和(He)管(Guan)理(Li)都(Du)是(Shi)需(Xu)要(Yao)K8S集(Ji)群(Qun)管(Guan)理(Li)员(Yuan)的(De)手(Shou)动(Dong)进(Jin)行(Xing)。 也(Ye)是(Shi)说(Shuo)目(Mu)前(Qian)Kubernetes核(He)心(Xin)中(Zhong)不(Bu)包(Bao)含(Han)对(Dui)对(Dui)本(Ben)地(Di)卷(Juan)进(Jin)行(Xing)动(Dong)态(Tai)发(Fa)放(Fang)和(He)管(Guan)理(Li)的(De)provisioner,如(Ru)果(Guo)想(Xiang)要(Yao)体(Ti)验(Yan)动(Dong)态(Tai)发(Fa)放(Fang)和(He)管(Guan)理(Li)的(De)功(Gong)能(Neng),可(Ke)以(Yi)试(Shi)一(Yi)下(Xia)由(You)Rancher提(Ti)供(Gong)的(De)Local Path Provisioner。我(Wo)这(Zhe)里(Li)依(Yi)然(Ran)使(Shi)用(Yong)手(Shou)动(Dong)管(Guan)理(Li)的(De)方(Fang)式(Shi),即(Ji)通(Tong)过(Guo)手(Shou)动(Dong)在(Zai)K8S节(Jie)点(Dian)上(Shang)创(Chuang)建(Jian)Local Volume,手(Shou)动(Dong)绑(Bang)定(Ding)Local Volume与(Yu)Pulsar Zookeeper和(He)Bookie的(De)PVC(PersistentVolumeClaim)之(Zhi)间(Jian)的(De)关(Guan)系(Xi)。下(Xia)面(Mian),先(Xian)手(Shou)动(Dong)在(Zai)node1, node2, node3上(Shang)创(Chuang)建(Jian)local volume对(Dui)应(Ying)的(De)数(Shu)据(Ju)目(Mu)录(Lu):mkdir -p /home/puslar/data/zookeeper-datamkdir -p /home/puslar/data/bookie-data/ledgersmkdir -p /home/puslar/data/bookie-data/journalzookeeper data的(De)local pv的(De)manifest如(Ru)下(Xia):---apiVersion: v1kind: PersistentVolumemetadata: name: pulsar-zookeeper-data-pulsar-zookeeper-0spec: capacity: storage: 20Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: local-storage local: path: /home/puslar/data/zookeeper-data claimRef: name: pulsar-zookeeper-data-pulsar-zookeeper-0 namespace: pulsar nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - node1---apiVersion: v1kind: PersistentVolumemetadata: name: pulsar-zookeeper-data-pulsar-zookeeper-1spec: capacity: storage: 20Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: local-storage local: path: /home/puslar/data/zookeeper-data claimRef: name: pulsar-zookeeper-data-pulsar-zookeeper-1 namespace: pulsar nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - node2---apiVersion: v1kind: PersistentVolumemetadata: name: pulsar-zookeeper-data-pulsar-zookeeper-2spec: capacity: storage: 20Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: local-storage local: path: /home/puslar/data/zookeeper-data claimRef: name: pulsar-zookeeper-data-pulsar-zookeeper-2 namespace: pulsar nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - node3上(Shang)面(Mian)的(De)manifest仍(Reng)中(Zhong)将(Jiang)3个(Ge)Local PV通(Tong)过(Guo)nodeAffinity创(Chuang)建(Jian)并(Bing)关(Guan)联(Lian)到(Dao)到(Dao)node1~node3上(Shang),同(Tong)时(Shi)使(Shi)用(Yong)claimRef将(Jiang)这(Zhe)3个(Ge)Local PV与(Yu)即(Ji)将(Jiang)在(Zai)K8S集(Ji)群(Qun)中(Zhong)部(Bu)署(Shu)的(De)zookeeper SatefulSet中(Zhong)的(De)PVC绑(Bang)定(Ding)。 使(Shi)用(Yong)kubectl apply创(Chuang)建(Jian)上(Shang)面(Mian)的(De)manifest。bookie ledgers和(He)journal的(De)local pv的(De)manifest如(Ru)下(Xia):---apiVersion: v1kind: PersistentVolumemetadata: name: pulsar-bookie-ledgers-pulsar-bookie-0spec: capacity: storage: 50Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: local-storage local: path: /home/puslar/data/bookie-data/ledgers claimRef: name: pulsar-bookie-ledgers-pulsar-bookie-0 namespace: pulsar nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - node1---apiVersion: v1kind: PersistentVolumemetadata: name: pulsar-bookie-journal-pulsar-bookie-0spec: capacity: storage: 50Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: local-storage local: path: /home/puslar/data/bookie-data/journal claimRef: name: pulsar-bookie-journal-pulsar-bookie-0 namespace: pulsar nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - node1---apiVersion: v1kind: PersistentVolumemetadata: name: pulsar-bookie-ledgers-pulsar-bookie-1spec: capacity: storage: 50Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: local-storage local: path: /home/puslar/data/bookie-data/ledgers claimRef: name: pulsar-bookie-ledgers-pulsar-bookie-1 namespace: pulsar nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - node2---apiVersion: v1kind: PersistentVolumemetadata: name: pulsar-bookie-journal-pulsar-bookie-1spec: capacity: storage: 50Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: local-storage local: path: /home/puslar/data/bookie-data/journal claimRef: name: pulsar-bookie-journal-pulsar-bookie-1 namespace: pulsar nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - node2---apiVersion: v1kind: PersistentVolumemetadata: name: pulsar-bookie-ledgers-pulsar-bookie-2spec: capacity: storage: 50Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: local-storage local: path: /home/puslar/data/bookie-data/ledgers claimRef: name: pulsar-bookie-ledgers-pulsar-bookie-2 namespace: pulsar nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - node3---apiVersion: v1kind: PersistentVolumemetadata: name: pulsar-bookie-journal-pulsar-bookie-2spec: capacity: storage: 50Gi accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Retain storageClassName: local-storage local: path: /home/puslar/data/bookie-data/journal claimRef: name: pulsar-bookie-journal-pulsar-bookie-2 namespace: pulsar nodeAffinity: required: nodeSelectorTerms: - matchExpressions: - key: kubernetes.io/hostname operator: In values: - node3上(Shang)面(Mian)的(De)manifest仍(Reng)中(Zhong)将(Jiang)6个(Ge)Local PV通(Tong)过(Guo)nodeAffinity创(Chuang)建(Jian)并(Bing)关(Guan)联(Lian)到(Dao)到(Dao)node1~node3上(Shang),同(Tong)时(Shi)使(Shi)用(Yong)claimRef将(Jiang)这(Zhe)3个(Ge)Local PV与(Yu)即(Ji)将(Jiang)在(Zai)K8S集(Ji)群(Qun)中(Zhong)部(Bu)署(Shu)的(De)zookeeper SatefulSet中(Zhong)的(De)PVC绑(Bang)定(Ding)。 使(Shi)用(Yong)kubectl apply创(Chuang)建(Jian)上(Shang)面(Mian)的(De)manifest。1.5 准(Zhun)备(Bei)Pulsar Manager的(De)PostgreSQL数(Shu)据(Ju)库(Ku)这(Zhe)里(Li)准(Zhun)备(Bei)让(Rang)Pulsar Manager使(Shi)用(Yong)外(Wai)部(Bu)数(Shu)据(Ju)库(Ku),需(Xu)要(Yao)提(Ti)前(Qian)在(Zai)外(Wai)部(Bu)的(De)PostgreSQL中(Zhong)创(Chuang)建(Jian)好(Hao)用(Yong)户(Hu)和(He)数(Shu)据(Ju)库(Ku)表(Biao)结(Jie)构(Gou)。创(Chuang)建(Jian)数(Shu)据(Ju)库(Ku)和(He)用(Yong)户(Hu):CREATE USER pulsar_manager WITH PASSWORD '';CREATE DATABASE pulsar_manager OWNER pulsar_manager;GRANT ALL PRIVILEGES ON DATABASE pulsar_manager to pulsar_manager;GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA pulsar_manager TO pulsar_manager;ALTER SCHEMA public OWNER to pulsar_manager;GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO pulsar_manager;GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO pulsar_manager;创(Chuang)建(Jian)表(Biao)结(Jie)构(Gou)(建(Jian)表(Biao)脚(Jiao)本(Ben)可(Ke)以(Yi)在(Zai)pulsar-manager的(De)镜(Jing)像(Xiang)中(Zhong)找(Zhao)到(Dao)):CREATE TABLE IF NOT EXISTS environments ( name varchar(256) NOT NULL, broker varchar(1024) NOT NULL, CONSTRAINT PK_name PRIMARY KEY (name), UNIQUE (broker));CREATE TABLE IF NOT EXISTS topics_stats ( topic_stats_id BIGSERIAL PRIMARY KEY, environment varchar(255) NOT NULL, cluster varchar(255) NOT NULL, broker varchar(255) NOT NULL, tenant varchar(255) NOT NULL, namespace varchar(255) NOT NULL, bundle varchar(255) NOT NULL, persistent varchar(36) NOT NULL, topic varchar(255) NOT NULL, producer_count BIGINT, subscription_count BIGINT, msg_rate_in double precision , msg_throughput_in double precision , msg_rate_out double precision , msg_throughput_out double precision , average_msg_size double precision , storage_size double precision , time_stamp BIGINT);CREATE TABLE IF NOT EXISTS publishers_stats ( publisher_stats_id BIGSERIAL PRIMARY KEY, producer_id BIGINT, topic_stats_id BIGINT NOT NULL, producer_name varchar(255) NOT NULL, msg_rate_in double precision , msg_throughput_in double precision , average_msg_size double precision , address varchar(255), connected_since varchar(128), client_version varchar(36), metadata text, time_stamp BIGINT, CONSTRAINT fk_publishers_stats_topic_stats_id FOREIGN KEY (topic_stats_id) References topics_stats(topic_stats_id));CREATE TABLE IF NOT EXISTS replications_stats ( replication_stats_id BIGSERIAL PRIMARY KEY, topic_stats_id BIGINT NOT NULL, cluster varchar(255) NOT NULL, connected BOOLEAN, msg_rate_in double precision , msg_rate_out double precision , msg_rate_expired double precision , msg_throughput_in double precision , msg_throughput_out double precision , msg_rate_redeliver double precision , replication_backlog BIGINT, replication_delay_in_seconds BIGINT, inbound_connection varchar(255), inbound_connected_since varchar(255), outbound_connection varchar(255), outbound_connected_since varchar(255), time_stamp BIGINT, CONSTRAINT FK_replications_stats_topic_stats_id FOREIGN KEY (topic_stats_id) References topics_stats(topic_stats_id));CREATE TABLE IF NOT EXISTS subscriptions_stats ( subscription_stats_id BIGSERIAL PRIMARY KEY, topic_stats_id BIGINT NOT NULL, subscription varchar(255) NULL, msg_backlog BIGINT, msg_rate_expired double precision , msg_rate_out double precision , msg_throughput_out double precision , msg_rate_redeliver double precision , number_of_entries_since_first_not_acked_message BIGINT, total_non_contiguous_deleted_messages_range BIGINT, subscription_type varchar(16), blocked_subscription_on_unacked_msgs BOOLEAN, time_stamp BIGINT, UNIQUE (topic_stats_id, subscription), CONSTRAINT FK_subscriptions_stats_topic_stats_id FOREIGN KEY (topic_stats_id) References topics_stats(topic_stats_id));CREATE TABLE IF NOT EXISTS consumers_stats ( consumer_stats_id BIGSERIAL PRIMARY KEY, consumer varchar(255) NOT NULL, topic_stats_id BIGINT NOT NUll, replication_stats_id BIGINT, subscription_stats_id BIGINT, address varchar(255), available_permits BIGINT, connected_since varchar(255), msg_rate_out double precision , msg_throughput_out double precision , msg_rate_redeliver double precision , client_version varchar(36), time_stamp BIGINT, metadata text);CREATE TABLE IF NOT EXISTS tokens ( token_id BIGSERIAL PRIMARY KEY, role varchar(256) NOT NULL, description varchar(128), token varchar(1024) NOT NUll, UNIQUE (role));CREATE TABLE IF NOT EXISTS users ( user_id BIGSERIAL PRIMARY KEY, access_token varchar(256), name varchar(256) NOT NULL, description varchar(128), email varchar(256), phone_number varchar(48), location varchar(256), company varchar(256), expire BIGINT, password varchar(256), UNIQUE (name));CREATE TABLE IF NOT EXISTS roles ( role_id BIGSERIAL PRIMARY KEY, role_name varchar(256) NOT NULL, role_source varchar(256) NOT NULL, description varchar(128), resource_id BIGINT NOT NULL, resource_type varchar(48) NOT NULL, resource_name varchar(48) NOT NULL, resource_verbs varchar(256) NOT NULL, flag INT NOT NULL);CREATE TABLE IF NOT EXISTS tenants ( tenant_id BIGSERIAL PRIMARY KEY, tenant varchar(255) NOT NULL, admin_roles varchar(255), allowed_clusters varchar(255), environment_name varchar(255), UNIQUE(tenant));CREATE TABLE IF NOT EXISTS namespaces ( namespace_id BIGSERIAL PRIMARY KEY, tenant varchar(255) NOT NULL, namespace varchar(255) NOT NULL, UNIQUE(tenant, namespace));CREATE TABLE IF NOT EXISTS role_binding( role_binding_id BIGSERIAL PRIMARY KEY, name varchar(256) NOT NULL, description varchar(256), role_id BIGINT NOT NULL, user_id BIGINT NOT NULL);上(Shang)面(Mian)已(Yi)经(Jing)做(Zuo)好(Hao)了(Liao)部(Bu)署(Shu)的(De)准(Zhun)备(Bei)工(Gong)作(Zuo),下(Xia)面(Mian)将(Jiang)使(Shi)用(Yong)Helm在(Zai)K8S集(Ji)群(Qun)中(Zhong)部(Bu)署(Shu)Pulsar集(Ji)群(Qun)。2.使(Shi)用(Yong)Helm在(Zai)K8S中(Zhong)部(Bu)署(Shu)Pulsar从(Cong)https://github.com/apache/pulsar-helm-chart/releases下(Xia)载(Zai)pulsar helm chart 2.7.7到(Dao)K8S的(De)控(Kong)制(Zhi)节(Jie)点(Dian)上(Shang)(kubectl和(He)helm可(Ke)用(Yong))。https://github.com/apache/pulsar-helm-chart/releases/download/pulsar-2.7.7/pulsar-2.7.7.tgz2.1 定(Ding)制(Zhi)编(Bian)写(Xie)helm chart的(De)values.yaml定(Ding)制(Zhi)编(Bian)写(Xie)helm chart的(De)values.yaml文(Wen)件(Jian)如(Ru)下(Xia), 定(Ding)制(Zhi)的(De)内(Nei)容(Rong)比(Bi)较(Jiao)多(Duo),具(Ju)体(Ti)见(Jian)下(Xia)面(Mian)文(Wen)件(Jian)的(De)注(Zhu)释(Shi):auth: authentication: enabled: true # 开(Kai)启(Qi)jwt认(Ren)证(Zheng) provider: "jwt" jwt: usingSecretKey: false # jwt认(Ren)证(Zheng)使(Shi)用(Yong)非(Fei)对(Dui)称(Cheng)秘(Mi)钥(Yue)对(Dui) authorization: enabled: true # 开(Kai)启(Qi)授(Shou)权(Quan) superUsers: # broker to broker communication broker: "broker-admin" # proxy to broker communication proxy: "proxy-admin" # pulsar-admin client to broker/proxy communication client: "admin"components: # 启(Qi)用(Yong)的(De)组(Zu)件(Jian) autorecovery: true bookkeeper: true broker: true functions: true proxy: true pulsar_manager: true toolset: true zookeeper: truemonitoring: # 关(Guan)闭(Bi)监(Jian)控(Kong)组(Zu)件(Jian), 后(Hou)续(Xu)尝(Chang)试(Shi)使(Shi)用(Yong)外(Wai)部(Bu)Prometheus对(Dui)pulsar集(Ji)群(Qun)进(Jin)行(Xing)监(Jian)控(Kong) grafana: false prometheus: false node_exporter: falsevolumes: local_storage: true # 数(Shu)据(Ju)卷(Juan)使(Shi)用(Yong)local storageproxy: # proxy的(De)配(Pei)置(Zhi)(这(Zhe)里(Li)是(Shi)测(Ce)试(Shi)环(Huan)境(Jing), 将(Jiang)proxy也(Ye)调(Diao)度(Du)到(Dao)node1或(Huo)node2或(Huo)node3) nodeSelector: node-role.kubernetes.io/pulsar: pulsar tolerations: - key: "dedicated" operator: "Equal" value: "pulsar" effect: "NoSchedule" configData: PULSAR_PREFIX_authenticateMetricsEndpoint: "false"broker: # broker的(De)配(Pei)置(Zhi)(这(Zhe)里(Li)是(Shi)测(Ce)试(Shi)环(Huan)境(Jing), 将(Jiang)proxy也(Ye)调(Diao)度(Du)到(Dao)node1或(Huo)node2或(Huo)node3) nodeSelector: node-role.kubernetes.io/pulsar: pulsar tolerations: - key: "dedicated" operator: "Equal" value: "pulsar" effect: "NoSchedule" zookeeper: # broker的(De)配(Pei)置(Zhi) replicaCount: 3 tolerations: - key: "dedicated" operator: "Equal" value: "pulsar" effect: "NoSchedule" volumes: data: # 配(Pei)置(Zhi)使(Shi)用(Yong)local pv, 需(Xu)要(Yao)与(Yu)前(Qian)面(Mian)手(Shou)动(Dong)创(Chuang)建(Jian)的(De)local pv信(Xin)息(Xi)一(Yi)致(Zhi) local_storage: true size: 20Gibookkeeper: # bookkeeper的(De)配(Pei)置(Zhi) replicaCount: 3 tolerations: - key: "dedicated" operator: "Equal" value: "pulsar" effect: "NoSchedule" volumes: journal: # 配(Pei)置(Zhi)使(Shi)用(Yong)local pv, 需(Xu)要(Yao)与(Yu)前(Qian)面(Mian)手(Shou)动(Dong)创(Chuang)建(Jian)的(De)local pv信(Xin)息(Xi)一(Yi)致(Zhi) local_storage: true size: 50Gi ledgers: # 配(Pei)置(Zhi)使(Shi)用(Yong)local pv, 需(Xu)要(Yao)与(Yu)前(Qian)面(Mian)手(Shou)动(Dong)创(Chuang)建(Jian)的(De)local pv信(Xin)息(Xi)一(Yi)致(Zhi) local_storage: true size: 50Gipulsar_manager: # pulsar_manager的(De)配(Pei)置(Zhi)(这(Zhe)里(Li)是(Shi)测(Ce)试(Shi)环(Huan)境(Jing), 将(Jiang)pulsar_manager也(Ye)调(Diao)度(Du)到(Dao)node1或(Huo)node2或(Huo)node3) replicaCount: 1 admin: # 文(Wen)档(Dang)中(Zhong)描(Miao)述(Shu)这(Zhe)里(Li)是(Shi)pulsar manager web界(Jie)面(Mian)登(Deng)录(Lu)用(Yong)户(Hu)密(Mi)码(Ma),但(Dan)实(Shi)际(Ji)上(Shang)当(Dang)使(Shi)用(Yong)外(Wai)部(Bu)PostgreSQL数(Shu)据(Ju)库(Ku)时(Shi),这(Zhe)里(Li)需(Xu)要(Yao)指(Zhi)定(Ding)PostgreSQL的(De)数(Shu)据(Ju)库(Ku)和(He)密(Mi)码(Ma),不(Bu)知(Zhi)道(Dao)是(Shi)否(Fou)是(Shi)pulsar-helm-chart 2.7.7的(De)问(Wen)题(Ti) user: pulsar_manager password: 05aM3Braz_M4RWpn configData: DRIVER_CLASS_NAME: org.postgresql.Driver URL: jdbc:postgresql://:5432/pulsar_manager # 文(Wen)档(Dang)中(Zhong)描(Miao)述(Shu)这(Zhe)里(Li)PostgreSQL数(Shu)据(Ju)库(Ku)的(De)密(Mi)码(Ma),但(Dan)实(Shi)际(Ji)上(Shang)这(Zhe)里(Li)不(Bu)能(Neng)指(Zhi)定(Ding)USERNAME和(He)PASSWORD, 不(Bu)知(Zhi)道(Dao)是(Shi)否(Fou)是(Shi)pulsar-helm-chart 2.7.7的(De)问(Wen)题(Ti) # USERNAME: pulsar_manager # PASSWORD: 05aM3Braz_M4RWpn LOG_LEVEL: INFO ## 开(Kai)启(Qi)JWT认(Ren)证(Zheng)后(Hou), 这(Zhe)里(Li)需(Xu)要(Yao)指(Zhi)定(Ding)pulsar-token-admin这(Zhe)个(Ge)Secret中(Zhong)的(De)JWT Token JWT_TOKEN: autorecovery: # autorecovery的(De)配(Pei)置(Zhi)(这(Zhe)里(Li)是(Shi)测(Ce)试(Shi)环(Huan)境(Jing), 将(Jiang)autorecovery也(Ye)调(Diao)度(Du)到(Dao)node1或(Huo)node2或(Huo)node3) replicaCount: 1 nodeSelector: node-role.kubernetes.io/pulsar: pulsar tolerations: - key: "dedicated" operator: "Equal" value: "pulsar" effect: "NoSchedule"toolset: # toolset的(De)配(Pei)置(Zhi)(这(Zhe)里(Li)是(Shi)测(Ce)试(Shi)环(Huan)境(Jing), 将(Jiang)toolset也(Ye)调(Diao)度(Du)到(Dao)node1或(Huo)node2或(Huo)node3) replicaCount: 1 nodeSelector: node-role.kubernetes.io/pulsar: pulsar tolerations: - key: "dedicated" operator: "Equal" value: "pulsar" effect: "NoSchedule"images: # 对(Dui)个(Ge)组(Zu)件(Jian)使(Shi)用(Yong)私(Si)有(You)镜(Jing)像(Xiang)仓(Cang)库(Ku)的(De)配(Pei)置(Zhi) imagePullSecrets: - regsecret # 私(Si)有(You)镜(Jing)像(Xiang)仓(Cang)库(Ku)的(De)image pull secret, 需(Xu)要(Yao)提(Ti)前(Qian)在(Zai)k8s命(Ming)名(Ming)空(Kong)间(Jian)中(Zhong)创(Chuang)建(Jian) autorecovery: repository: harbor.example.com/library/apachepulsar/pulsar-all tag: 2.7.4 bookie: repository: harbor.example.com/library/apachepulsar/pulsar-all tag: 2.7.4 broker: repository: harbor.example.com/library/apachepulsar/pulsar-all tag: 2.7.4 functions: repository: harbor.example.com/library/apachepulsar/pulsar-all tag: 2.7.4 proxy: repository: harbor.example.com/library/apachepulsar/pulsar-all tag: 2.7.4 pulsar_manager: repository: harbor.example.com/library/apachepulsar/pulsar-manager tag: v0.2.0 zookeeper: repository: harbor.example.com/library/apachepulsar/pulsar-all tag: 2.7.4pulsar_metadata: component: pulsar-init image: # the image used for running `pulsar-cluster-initialize` job repository: harbor.example.com/library/apachepulsar/pulsar-all tag: 2.7.4因(Yin)为(Wei)当(Dang)前(Qian)在(Zai)pulsar-helm-chart 2.7.7 中(Zhong)好(Hao)像(Xiang)不(Bu)支(Zhi)持(Chi)为(Wei)pulsar-init设(She)置(Zhi)私(Si)有(You)仓(Cang)库(Ku)的(De)imagePullSecret,所(Suo)以(Yi)下(Xia)面(Mian)为(Wei)pulsar namespace中(Zhong)的(De)default servcieaccount 添(Tian)加(Jia)上(Shang)imagePullSecret。kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "regsecret"}]}' -n pulsar2.2 使(Shi)用(Yong)helm install安(An)装(Zhuang)pulsar定(Ding)制(Zhi)完(Wan)value.yaml之(Zhi)后(Hou),使(Shi)用(Yong)下(Xia)面(Mian)的(De)命(Ming)令(Ling)向(Xiang)K8S集(Ji)群(Qun)部(Bu)署(Shu)pulsar。helm install \ --values values.yaml \ --set initialize=true \ --namespace pulsar \ pulsar pulsar-2.7.7.tgz安(An)装(Zhuang)完(Wan)成(Cheng)后(Hou)使(Shi)用(Yong)下(Xia)面(Mian)的(De)命(Ming)令(Ling)查(Cha)看(Kan)一(Yi)下(Xia)两(Liang)个(Ge)初(Chu)始(Shi)化(Hua)job pulsar-pulsar-init和(He)pulsar-bookie-init的(De)pod状(Zhuang)态(Tai)为(Wei)Complete:kubectl get pod -n pulsar | grep initpulsar-bookie-init--1-h65bp 0/1 Completed 0 5m14spulsar-pulsar-init--1-t4thq 0/1 Completed 0 5m5s使(Shi)用(Yong)下(Xia)面(Mian)的(De)命(Ming)令(Ling)查(Cha)看(Kan)一(Yi)下(Xia)pulsar集(Ji)群(Qun)各(Ge)个(Ge)组(Zu)件(Jian)的(De)Pod状(Zhuang)态(Tai)全(Quan)部(Bu)都(Du)为(Wei)Running:kubectl get pod -n pulsar -l cluster=pulsar -o wideNAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATESpulsar-bookie-0 1/1 Running 0 14m 10.244.226.91 node1 pulsar-bookie-1 1/1 Running 0 14m 10.244.63.90 node2 pulsar-bookie-2 1/1 Running 0 14m 10.244.46.92 node3 pulsar-broker-0 1/1 Running 0 14m 10.244.226.90 node1 pulsar-broker-1 1/1 Running 0 14m 10.244.63.89 node2 pulsar-broker-2 1/1 Running 0 14m 10.244.46.90 node3 pulsar-proxy-0 1/1 Running 0 14m 10.244.226.93 node1 pulsar-proxy-1 1/1 Running 0 14m 10.244.63.91 node2 pulsar-proxy-2 1/1 Running 0 14m 10.244.46.93 node3 pulsar-pulsar-manager-7b98666cff-5626f 1/1 Running 0 14m 10.244.63.88 node2 pulsar-recovery-0 1/1 Running 0 14m 10.244.46.89 node3 pulsar-toolset-0 1/1 Running 0 14m 10.244.46.91 node3 pulsar-zookeeper-0 1/1 Running 0 14m 10.244.226.92 node1 pulsar-zookeeper-1 1/1 Running 0 14m 10.244.63.92 node2 pulsar-zookeeper-2 1/1 Running 0 13m 10.244.46.94 node3 如(Ru)果(Guo)后(Hou)边(Bian)调(Diao)整(Zheng)了(Liao)values.yaml,需(Xu)要(Yao)更(Geng)新(Xin)部(Bu)署(Shu)时(Shi),使(Shi)用(Yong)下(Xia)面(Mian)的(De)命(Ming)令(Ling):helm upgrade pulsar pulsar-2.7.7.tgz \ --namespace pulsar \ -f values.yaml2.3 在(Zai)toolset pod中(Zhong)测(Ce)试(Shi)创(Chuang)建(Jian)tenant, namespace和(He)topictoolset pod中(Zhong)包(Bao)含(Han)了(Liao)各(Ge)种(Zhong)管(Guan)理(Li)和(He)测(Ce)试(Shi)pulsar的(De)命(Ming)令(Ling)行(Xing)工(Gong)具(Ju),例(Li)如(Ru)pulsar-admin, pulsar-client等(Deng)。下(Xia)面(Mian)进(Jin)入(Ru)toolset pod中(Zhong),使(Shi)用(Yong)pulsar-admin命(Ming)令(Ling)行(Xing)工(Gong)具(Ju)测(Ce)试(Shi)一(Yi)下(Xia)tenant, namespace和(He)topic的(De)创(Chuang)建(Jian),进(Jin)一(Yi)步(Bu)确(Que)认(Ren)pulsar集(Ji)群(Qun)工(Gong)作(Zuo)正(Zheng)常(Chang)。kubectl exec -it -n pulsar pulsar-toolset-0 -- /bin/bashbin/pulsar-admin tenants create test-tenantbin/pulsar-admin tenants list"public""pulsar""test-tenant"bin/pulsar-admin namespaces create test-tenant/test-nsbin/pulsar-admin namespaces list test-tenant"test-tenant/test-ns"bin/pulsar-admin topics create-partitioned-topic test-tenant/test-ns/test-topic -p 3bin/pulsar-admin topics list-partitioned-topics test-tenant/test-ns"persistent://test-tenant/test-ns/test-topic"2.4 创(Chuang)建(Jian)pulsar-manager的(De)管(Guan)理(Li)员(Yuan)用(Yong)户(Hu)并(Bing)登(Deng)录(Lu)查(Cha)看(Kan)下(Xia)面(Mian)测(Ce)试(Shi)一(Yi)下(Xia)pulsar manager是(Shi)否(Fou)可(Ke)以(Yi)使(Shi)用(Yong)。前(Qian)面(Mian)使(Shi)用(Yong)helm chart部(Bu)署(Shu)的(De)pulsar集(Ji)群(Qun),在(Zai)k8s中(Zhong)创(Chuang)建(Jian)了(Liao)下(Xia)面(Mian)7个(Ge)Service。kubectl get svc -l app=pulsar -n pulsarNAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEpulsar-bookie ClusterIP None 3181/TCP,8000/TCP 40mpulsar-broker ClusterIP None 8080/TCP,6650/TCP 40mpulsar-proxy LoadBalancer 10.104.105.137 80:31970/TCP,6650:32631/TCP 40mpulsar-pulsar-manager LoadBalancer 10.110.207.9 9527:32764/TCP 40mpulsar-recovery ClusterIP None 8000/TCP 40mpulsar-toolset ClusterIP None 40mpulsar-zookeeper ClusterIP None 8000/TCP,2888/TCP,3888/TCP,2181/TCP 40m从(Cong)上(Shang)面(Mian)命(Ming)令(Ling)的(De)输(Shu)出(Chu)可(Ke)以(Yi)看(Kan)出(Chu),bookie, broker, recovery, toolset, zookeeper这(Zhe)5个(Ge)Service的(De)类(Lei)型(Xing)都(Du)是(Shi)ClusterIP的(De),并(Bing)且(Qie)cluser-ip为(Wei)None,都(Du)是(Shi)Headless的(De)Service,因(Yin)为(Wei)它(Ta)们(Men)只(Zhi)需(Xu)要(Yao)在(Zai)k8s集(Ji)群(Qun)内(Nei)部(Bu)使(Shi)用(Yong)。pulsar-proxy和(He)pulsar-pulsar-manager为(Wei)LoadBalancer类(Lei)型(Xing),并(Bing)且(Qie)都(Du)配(Pei)置(Zhi)了(Liao)NodePort,提(Ti)供(Gong)了(Liao)从(Cong)K8S集(Ji)群(Qun)外(Wai)部(Bu)访(Fang)问(Wen)的(De)能(Neng)力(Li)。从(Cong)集(Ji)群(Qun)外(Wai)部(Bu)访(Fang)问(Wen)pulsar-manager的(De)地(Di)址(Zhi)是(Shi)http://node1:32764,第(Di)一(Yi)次(Ci)访(Fang)问(Wen)pulsar manager之(Zhi)前(Qian),需(Xu)要(Yao)为(Wei)其(Qi)创(Chuang)建(Jian)一(Yi)个(Ge)管(Guan)理(Li)用(Yong)户(Hu):CSRF_TOKEN=$(curl http://node1:32764/pulsar-manager/csrf-token)curl \ -H 'X-XSRF-TOKEN: $CSRF_TOKEN' \ -H 'Cookie: XSRF-TOKEN=$CSRF_TOKEN;' \ -H "Content-Type: application/json" \ -X PUT http://node1:32764/pulsar-manager/users/superuser \ -d '{"name": "admin", "password": "pulsar", "description": "test", "email": "username@test.org"}'上(Shang)面(Mian)的(De)命(Ming)令(Ling)为(Wei)pulsar-manager创(Chuang)建(Jian)用(Yong)户(Hu)名(Ming)为(Wei)admin, 密(Mi)码(Ma)为(Wei)pulsar的(De)管(Guan)理(Li)用(Yong)户(Hu)。使(Shi)用(Yong)该(Gai)用(Yong)户(Hu)就(Jiu)可(Ke)以(Yi)登(Deng)录(Lu)pulsar manager。备(Bei)注(Zhu), 在(Zai)线(Xian)上(Shang)使(Shi)用(Yong)时(Shi),尽(Jin)量(Liang)避(Bi)免(Mian)以(Yi)NodePort暴(Bao)露(Lu)服(Fu)务(Wu),这(Zhe)里(Li)的(De)pulsar-manager的(De)Service可(Ke)以(Yi)修(Xiu)改(Gai)为(Wei)CluserIP类(Lei)型(Xing),并(Bing)关(Guan)闭(Bi)NodePort,同(Tong)时(Shi)创(Chuang)建(Jian)Ingress,以(Yi)Ingress+域(Yu)名(Ming)的(De)形(Xing)式(Shi)暴(Bao)露(Lu)出(Chu)来(Lai)。 看(Kan)了(Liao)一(Yi)下(Xia)pulsar-helm-chart也(Ye)是(Shi)支(Zhi)持(Chi)的(De),只(Zhi)是(Shi)目(Mu)前(Qian)pulsar-helm-chart 2.7.7中(Zhong)创(Chuang)建(Jian)Ingress时(Shi),使(Shi)用(Yong)的(De)是(Shi)apiVersion: extensions/v1beta1 API,这(Zhe)个(Ge)API从(Cong)k8s 1.19被(Bei)标(Biao)记(Ji)为(Wei)废(Fei)弃(Qi),在(Zai)k8s 1.22已(Yi)被(Bei)移(Yi)除(Chu)。 所(Suo)以(Yi)要(Yao)直(Zhi)接(Jie)是(Shi)使(Shi)用(Yong)pulsar-helm-chart创(Chuang)建(Jian)Ingress的(De)话(Hua),需(Xu)要(Yao)等(Deng)待(Dai)pulsar-helm-chart的(De)更(Geng)新(Xin)。参(Can)考(Kao)https://github.com/apache/pulsar-helm-charthttps://pulsar.apache.org/docs/zh-CN/kubernetes-helm/https://github.com/apache/pulsar-helm-chart/issues/133https://github.com/rancher/local-path-provisionerhttps://kubernetes.io/zh/docs/tasks/configure-pod-container/configure-service-account/

自从陈宝新受伤之后,这个家也随之陷入了困境,他也就只能从事一些简单的工作,收入也很是微薄。在这样的情况下,陈金娣为了补贴家用,就不得不去到了当地的工厂工作,成为了一名女工人,收入也可以勉强维持一家人的生活。黄乐之子回忆道:“半个月前的一天,我父亲从外面回来,整个人鼻青脸肿,浑身是伤。我们问他到底发生了什么,但他只是沉默不语,不肯多说。第二天,他就说要去外地办点事情,然后就出门了。”《甜蜜惩罚》高清完整版免费播放 - 印度破案剧 - 星辰...

我妈和胡妈高兴地聊天

发布于:肥西县
声明:该文观点仅代表作者本人,搜狐号系信息发布平台,搜狐仅提供信息存储空间服务。
意见反馈 合作

Copyright ? 2023 Sohu All Rights Reserved

搜狐公司 版权所有