{"id":34825,"date":"2019-10-31T22:00:35","date_gmt":"2019-10-31T19:00:35","guid":{"rendered":"https:\/\/prohoster.info\/blog\/kak-soedinit-klastery-kubernetes-v-raznyh-data-tsentrah\/"},"modified":"2019-10-31T22:00:35","modified_gmt":"2019-10-31T19:00:35","slug":"kak-soedinit-klastery-kubernetes-v-raznyh-data-tsentrah","status":"publish","type":"post","link":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/kak-soedinit-klastery-kubernetes-v-raznyh-data-tsentrah","title":{"rendered":"Si t\u00eb lidhni klaster\u00ebt e Kubernetes n\u00eb qendra t\u00eb ndryshme t\u00eb t\u00eb dh\u00ebnave","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><img decoding=\"async\" alt=\"Si t\u00eb lidhni klaster\u00ebt e Kubernetes n\u00eb qendra t\u00eb ndryshme t\u00eb t\u00eb dh\u00ebnave\" src=\"\/wp-content\/uploads\/2019\/06\/fa408b406e31840857bbbe13e1d7ee5a.JPG\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<strong>Mir\u00eb se vini n\u00eb serin\u00eb e udh\u00ebzuesve t\u00eb shpejt\u00eb p\u00ebr Kubernetes.<\/strong> Kjo \u00ebsht\u00eb nj\u00eb kolon\u00eb e rregullt me pyetje nga m\u00eb interesante q\u00eb marrim online dhe n\u00eb trajnimet tona. P\u00ebgjigjet nj\u00eb ekspert i Kubernetes.<\/p>\n<p><\/p>\n<blockquote><p>Eksperti i sot\u00ebm \u00ebsht\u00eb Daniele Polencic (<noindex><a rel=\"nofollow\" href=\"https:\/\/twitter.com\/danielepolencic\">Daniele Polencic<\/a><\/noindex>). Daniele punon si instruktor dhe zhvillues softueri n\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/learnk8s.io\/\">Learnk8s<\/a><\/noindex>.<\/p><\/blockquote>\n<p>N\u00ebse d\u00ebshironi t\u00eb merrni p\u00ebrgjigjen p\u00ebr pyetjen tuaj n\u00eb postimin e ardhsh\u00ebm, <noindex><a rel=\"nofollow\" href=\"http:\/\/hello@learnk8s.io\">na kontaktoni p\u00ebrmes emailit<\/a><\/noindex> ose n\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/twitter.com\/learnk8s\">Twitter: @learnk8s<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>A e keni humbur postimin e kaluar? <noindex><a rel=\"nofollow\" href=\"https:\/\/learnk8s.io\/visualise-dependencies-kubernetes\">K\u00ebrkoni ata k\u00ebtu<\/a><\/noindex>.<\/p>\n<p><\/p>\n<h3 id=\"kak-soedinit-klastery-kubernetes-v-raznyh-data-centrah\">Si t\u00eb lidhni klaster\u00ebt Kubernetes n\u00eb qendra t\u00eb ndryshme t\u00eb t\u00eb dh\u00ebnave?<\/h3>\n<p><\/p>\n<blockquote><p><strong>N\u00eb p\u00ebrmbledhje<\/strong>: <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/kubernetes-sigs\/federation-v2\">kubefed v2 shum\u00eb shpejt do t\u00eb lansohet<\/a><\/noindex>, dhe gjithashtu rekomandoj t\u00eb lexoni p\u00ebr <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/bookingcom\/shipper\">Shipper<\/a><\/noindex> dhe <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/admiraltyio\/multicluster-scheduler\">projekti multi-cluster-scheduler<\/a><\/noindex>.<br \/>\n<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><\/p>\n<p>Shpesh infrastruktura riprodhohet dhe shp\u00ebrndahet n\u00eb rajone t\u00eb ndryshme, ve\u00e7an\u00ebrisht n\u00eb ambiente t\u00eb kontrolluara.<\/p><\/blockquote>\n<p><strong>N\u00ebse nj\u00eb rajon nuk \u00ebsht\u00eb n\u00eb dispozicion, trafiku redirektohet n\u00eb nj\u00eb tjet\u00ebr p\u00ebr t\u00eb shmangur ndalesat.<\/strong><\/p>\n<p><\/p>\n<p>Me Kubernetes mund t\u00eb p\u00ebrdorni nj\u00eb strategji t\u00eb ngjashme dhe t\u00eb shp\u00ebrndani ngarkesat e pun\u00ebs n\u00eb rajone t\u00eb ndryshme.<\/p>\n<p><\/p>\n<p>Mund t\u00eb keni nj\u00eb ose m\u00eb shum\u00eb klaster\u00eb p\u00ebr ekip, rajon, ambient ose nj\u00eb kombinim t\u00eb k\u00ebtyre elementeve.<\/p>\n<p><\/p>\n<p>Klaster\u00ebt tuaj mund t\u00eb vendosen n\u00eb re t\u00eb ndryshme dhe n\u00eb mjedise lokale.<\/p>\n<p><\/p>\n<p><em>Por si t\u00eb planifikoni infrastruktur\u00ebn p\u00ebr nj\u00eb shp\u00ebrndarje t\u00eb till\u00eb gjeografike?<br \/>\nA duhet t\u00eb krijoni nj\u00eb klaster t\u00eb madh q\u00eb p\u00ebrfshin disa re n\u00ebn nj\u00eb rrjet t\u00eb vet\u00ebm?<br \/>\nOse t\u00eb vendosni shum\u00eb klaster\u00eb t\u00eb vegj\u00ebl dhe t\u00eb gjeni nj\u00eb m\u00ebnyr\u00eb p\u00ebr t'i kontrolluar dhe sinkronizuar ato?<\/em><\/p>\n<p><\/p>\n<h3 id=\"odin-rukovodyaschiy-klaster\">Nj\u00eb klaster udh\u00ebheq\u00ebs<\/h3>\n<p><\/p>\n<p><em>Krijimi i nj\u00eb klasteri n\u00ebn nj\u00eb rrjet t\u00eb vet\u00ebm nuk \u00ebsht\u00eb aq e leht\u00eb.<\/em><\/p>\n<p><\/p>\n<p>Imaginoni, keni nj\u00eb aksident, \u00ebsht\u00eb humbur lidhja midis segmenteve t\u00eb klasterit.<\/p>\n<p><\/p>\n<p>N\u00ebse keni nj\u00eb server kryesor, gjysma e burimeve nuk do t\u00eb mund t\u00eb marrin urdhra t\u00eb rinj, sepse nuk do t\u00eb mund t\u00eb lidhen me kryesorin.<\/p>\n<p><\/p>\n<p>Dhe n\u00eb k\u00ebt\u00eb rast, keni tabela t\u00eb vjetra ruterimi (<code>kube-proxy<\/code> nuk mund t\u00eb ngarkoj\u00eb t\u00eb rejat) dhe asnj\u00eb pod t\u00eb shtuar (kubelet nuk mund t\u00eb k\u00ebrkoj\u00eb azhurnime).<\/p>\n<p><\/p>\n<p>\u00c7far\u00eb \u00ebsht\u00eb edhe m\u00eb e keqe, n\u00ebse Kubernetes nuk sheh nj\u00eb nyje, e markon at\u00eb si t\u00eb humbur dhe shp\u00ebrndan pod\u2019\u00ebt q\u00eb mungojn\u00eb n\u00eb nyjet ekzistuese.<\/p>\n<p><\/p>\n<p><strong>Si rezultat, keni dyfish pod\u2019\u00eb.<\/strong><\/p>\n<p><\/p>\n<p>N\u00ebse krijoni nga nj\u00eb server kryesor p\u00ebr secilin rajon, do t\u00eb keni probleme me algoritmin p\u00ebr t\u00eb arritur konsensusin n\u00eb databaz\u00ebn etcd.<em>Sh\u00ebn. red. \u2014 N\u00eb t\u00eb v\u00ebrtet\u00eb, baza e t\u00eb dh\u00ebnave etcd nuk ka nevoj\u00eb patjet\u00ebr t\u00eb ndodhet n\u00eb serverat kryesor\u00eb. Ajo mund t\u00eb aktivizohet n\u00eb nj\u00eb grup t\u00eb ve\u00e7ant\u00eb server\u00ebsh n\u00eb nj\u00eb rajon. Megjithat\u00eb, kjo do t\u00eb sjell\u00eb nj\u00eb pik\u00eb d\u00ebshtimi p\u00ebr klusterin. Sidoqoft\u00eb, \u00ebsht\u00eb e shpejt\u00eb.<\/em>)<\/p>\n<p><\/p>\n<p>etcd p\u00ebrdor <noindex><a rel=\"nofollow\" href=\"http:\/\/thesecretlivesofdata.com\/raft\/\">algoritmin raft<\/a><\/noindex>, p\u00ebr t\u00eb arritur nj\u00eb konsensus mbi vler\u00ebn para se ta shkruaj\u00eb at\u00eb n\u00eb disk.<br \/>\nK\u00ebshtu q\u00eb shumica e instancave duhet t\u00eb arrijn\u00eb konsensusin para se gjendja t\u00eb mund t\u00eb shkruhet n\u00eb etcd.<\/p>\n<p><\/p>\n<p>N\u00ebse vonesa midis instancave t\u00eb etcd rritet ndjesh\u00ebm, si\u00e7 ndodh me tre instanca etcd n\u00eb regione t\u00eb ndryshme, k\u00ebrkohet shum\u00eb koh\u00eb p\u00ebr t\u00eb arritur konsensusin dhe p\u00ebr ta shkruar at\u00eb n\u00eb disk.<br \/>\nKjo ndikon edhe n\u00eb kontrollor\u00ebt e Kubernetes.<\/p>\n<p><\/p>\n<p>Menaxheri i kontrollor\u00ebve ka nevoj\u00eb p\u00ebr m\u00eb shum\u00eb koh\u00eb p\u00ebr t\u00eb m\u00ebsuar mbi ndryshimin dhe p\u00ebr t\u00eb shkruar p\u00ebrgjigjen n\u00eb baz\u00ebn e t\u00eb dh\u00ebnave.<\/p>\n<p><\/p>\n<p>Dhe pasi q\u00eb kontrollor\u00ebt nuk jan\u00eb vet\u00ebm nj\u00eb, por disa, <strong>ndodhin nj\u00eb reaksion n\u00eb zinxhir, dhe e gjith\u00eb klasteri fillon t\u00eb funksionoj\u00eb shum\u00eb ngadal\u00eb.<\/strong>.<\/p>\n<p><\/p>\n<p>etcd \u00ebsht\u00eb aq i ndjesh\u00ebm ndaj vonesave, saq\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/coreos.com\/etcd\/docs\/latest\/faq.html#deployment\">n\u00eb dokumentacionin zyrtar rekomandohet p\u00ebrdorimi i SSD-ve n\u00eb vend t\u00eb hard disqeve t\u00eb zakonsh\u00ebm.<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p><strong>Momentalisht, nuk ka shembuj t\u00eb mir\u00eb t\u00eb nj\u00eb rrjeti t\u00eb madh p\u00ebr nj\u00eb klaster.<\/strong><\/p>\n<p><\/p>\n<p>N\u00eb p\u00ebrgjith\u00ebsi, komuniteti i zhvilluesve dhe grupi SIG-cluster po p\u00ebrpiqen t\u00eb kuptojn\u00eb se si t\u00eb orkestrojn\u00eb klaster\u00ebt ashtu si Kubernetes orkestrojn\u00eb konteinerit.<\/p>\n<p><\/p>\n<h3 id=\"variant-1-federaciya-klasterov-s-kubefed\">Opsioni 1: federata e klaster\u00ebve me kubefed<\/h3>\n<p><\/p>\n<p>Pergjigjja zyrtare nga SIG-cluster \u00ebsht\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/kubernetes-sigs\/federation-v2\">kubefed2, versioni i ri i klientit dhe operatorit t\u00eb kube federation.<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>P\u00ebr her\u00eb t\u00eb par\u00eb, doli t\u00eb menaxhohej nj\u00eb koleksion klaster\u00ebsh si nj\u00eb objekt t\u00eb vet\u00ebm p\u00ebrmes mjetit kube federation.<\/p>\n<p><\/p>\n<p>Fillimi ishte i mir\u00eb, por p\u00ebrfundimisht kube federation nuk arriti t\u00eb b\u00ebhej popullor, sepse nuk mb\u00ebshteste t\u00eb gjitha burimet.<\/p>\n<p><\/p>\n<p>Ai mb\u00ebshteste shp\u00ebrndarjen e kombinuar dhe sh\u00ebrbimet, por, p\u00ebr shembull, nuk mb\u00ebshteste StatefulSets.<br \/>\nDhe gjithashtu konfigurimi i federat\u00ebs u transmetua n\u00eb form\u00eb anotacionesh dhe nuk ishte fleksib\u00ebl.<\/p>\n<p><\/p>\n<p><em>Imagjinoni se si mund t\u00eb p\u00ebrshkruhet ndarja e kopjeve p\u00ebr \u00e7do klaster n\u00eb federat\u00eb duke p\u00ebrdorur vet\u00ebm dhe vet\u00ebm anotacione.<\/em><\/p>\n<p><\/p>\n<p><strong>Rezultoi nj\u00eb kaos i plot\u00eb.<\/strong><\/p>\n<p><\/p>\n<p>SIG-cluster b\u00ebri nj\u00eb pun\u00eb t\u00eb madhe pas kubefed v1 dhe vendosi t\u00eb qaset problemit nga nj\u00eb k\u00ebndv\u00ebshtrim tjet\u00ebr.<\/p>\n<p><\/p>\n<p><strong>N\u00eb vend t\u00eb anotacioneve, ata vendos\u00ebn t\u00eb l\u00ebshonin nj\u00eb kontrollor q\u00eb instalon n\u00eb klaster\u00ebt. Ai mund t\u00eb konfigurohet me ndihm\u00ebn e p\u00ebrcaktimeve t\u00eb burimeve t\u00eb personalizuara (Custom Resource Definition, CRD).<\/strong><\/p>\n<p><\/p>\n<p>P\u00ebr \u00e7do burim q\u00eb do t\u00eb jet\u00eb pjes\u00eb e federat\u00ebs, keni nj\u00eb p\u00ebrcaktim personal t\u00eb CRD nga tre seksione:<\/p>\n<p><\/p>\n<ul>\n<li>p\u00ebrcaktimi standard i burimit, si p.sh. nj\u00eb deploy;<\/li>\n<li>me kaluesin e pseudo-klas\u00ebs <code>pozitimi<\/code>, ku p\u00ebrcaktoni se si do t\u00eb shp\u00ebrndahen burimet n\u00eb federat\u00eb;<\/li>\n<li>me kaluesin e pseudo-klas\u00ebs <code>p\u00ebrs\u00ebritje<\/code>, ku p\u00ebr nj\u00eb burim specifik mund t\u00eb p\u00ebrs\u00ebritni pesh\u00ebn dhe parametrat nga pozicioni.<\/li>\n<\/ul>\n<p><\/p>\n<p>Ja nj\u00eb shembull i nj\u00eb shp\u00ebrndarjeje t\u00eb p\u00ebrbashk\u00ebt me seksione pozicioni dhe p\u00ebrs\u00ebritje.<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">apiVersion: types.federation.k8s.io\/v1alpha1\nkind: FederatedDeployment\nmetadata:\n  name: test-deployment\n  namespace: test-namespace\nspec:\n  template:\n    metadata:\n      labels:\n        app: nginx\n    spec:\n      replicas: 3\n      selector:\n        matchLabels:\n          app: nginx\n      template:\n        metadata:\n          labels:\n            app: nginx\n        spec:\n          containers:\n            - image: nginx\n              name: nginx\n  placement:\n    clusterNames:\n      - cluster2\n      - cluster1\n  overrides:\n    - clusterName: cluster2\n      clusterOverrides:\n        - path: spec.replicas\n          value: 5<\/code><\/pre>\n<p><\/p>\n<p>Si\u00e7 shihni, shp\u00ebrndarja \u00ebsht\u00eb e shp\u00ebrndar\u00eb n\u00eb dy klastera: <code>cluster1<\/code> dhe <code>cluster2<\/code>.<\/p>\n<p><\/p>\n<p>Klusteri i par\u00eb ofron tre replika, nd\u00ebrsa klusteri i dyt\u00eb ka vler\u00ebn 5.<\/p>\n<p><\/p>\n<p>N\u00ebse keni nevoj\u00eb p\u00ebr m\u00eb shum\u00eb kontroll mbi numrin e replikave, kubefed2 ofron nj\u00eb objekt t\u00eb ri ReplicaSchedulingPreference, ku replikat mund t\u00eb shp\u00ebrndahen sipas pesh\u00ebs:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">apiVersion: scheduling.federation.k8s.io\/v1alpha1\nkind: ReplicaSchedulingPreference\nmetadata:\n  name: test-deployment\n  namespace: test-ns\nspec:\n  targetKind: FederatedDeployment\n  totalReplicas: 9\n  clusters:\n    A:\n      weight: 1\n    B:\n      weight: 2<\/code><\/pre>\n<p><\/p>\n<p>Struktura CRD dhe API ende nuk jan\u00eb plot\u00ebsisht gati, dhe n\u00eb depo zyrtare t\u00eb projektit po zhvillohet aktivisht.<\/p>\n<p><\/p>\n<p><strong>Mbani n\u00ebn v\u00ebzhgim kubefed2, por mbani mend se p\u00ebr mjedisin e pun\u00ebs, ai ende nuk \u00ebsht\u00eb i p\u00ebrshtatsh\u00ebm.<\/strong><\/p>\n<p><\/p>\n<p>M\u00ebsoni m\u00eb shum\u00eb p\u00ebr kubefed2 nga <noindex><a rel=\"nofollow\" href=\"https:\/\/kubernetes.io\/blog\/2018\/12\/12\/kubernetes-federation-evolution\/\">artikulli zyrtar mbi kubefed2<\/a><\/noindex> n\u00eb blogun p\u00ebr Kubernetes dhe n\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/kubernetes-sigs\/federation-v2\">depo zyrtare e projektit kubefed<\/a><\/noindex>.<\/p>\n<p><\/p>\n<h3 id=\"variant-2-obedinenie-klasterov-v-stile-bookingcom\">Opcion 2: bashkimi i klasterave n\u00eb stilin Booking.com<\/h3>\n<p><\/p>\n<p>Zhvilluesit e Booking.com nuk u mor\u00ebn me kubefed v2, por shpik\u00ebn Shipper - nj\u00eb operator p\u00ebr shp\u00ebrndarjen n\u00eb klastera t\u00eb shumt\u00eb, n\u00eb rajone t\u00eb shumta dhe n\u00eb mjete t\u00eb shumta.<\/p>\n<p><\/p>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/bookingcom\/shipper\">Shipper<\/a><\/noindex> q\u00eb \u00ebsht\u00eb disi e ngjashme me kubefed2.<\/p>\n<p><\/p>\n<p>T\u00eb dy mjetet lejojn\u00eb konfiguroin strategjin\u00eb e shp\u00ebrndarjes n\u00eb klastera t\u00eb shumt\u00eb (cil\u00ebt klastera p\u00ebrdoren dhe sa replika kan\u00eb).<\/p>\n<p><\/p>\n<p>Por <strong>q\u00ebllimi i Shipper \u00ebsht\u00eb t\u00eb zvog\u00ebloj\u00eb rrezikun e gabimeve n\u00eb shp\u00ebrndarje.<\/strong><\/p>\n<p><\/p>\n<p>N\u00eb Shipper mund t\u00eb p\u00ebrcaktoni nj\u00eb s\u00ebr\u00eb hapash, q\u00eb p\u00ebrshkruajn\u00eb ndarjen e replikave nd\u00ebrmjet shp\u00ebrndarjes s\u00eb m\u00ebparshme dhe asaj aktuale dhe volumin e trafikut q\u00eb hyn.<\/p>\n<p><\/p>\n<p>Kur d\u00ebrgoni nj\u00eb burim n\u00eb klaster, kontrolluesi i Shipper e shp\u00ebrndan k\u00ebt\u00eb ndryshim hap pas hapi n\u00eb t\u00eb gjith\u00eb klasterat e bashkuar.<\/p>\n<p><\/p>\n<p><em>Dhe, Shipper \u00ebsht\u00eb shum\u00eb i kufizuar.<\/em><\/p>\n<p><\/p>\n<p>P\u00ebr shembull, <strong>ai pranon Helm-chart si input<\/strong> dhe nuk mb\u00ebshtet burimet vanilla.<br \/>\nN\u00eb p\u00ebrgjith\u00ebsi, Shipper funksionon k\u00ebshtu.<\/p>\n<p><\/p>\n<p>N\u00eb vend t\u00eb d\u00ebrges\u00ebs standarde, duhet t\u00eb krijoni burimin e aplikacionit, duke p\u00ebrfshir\u00eb Helm-chartin:<\/p>\n<p><\/p>\n<pre><code class=\"plaintext\">apiVersion: shipper.booking.com\/v1alpha1\nkind: Application\nmetadata:\n  name: super-server\nspec:\n  revisionHistoryLimit: 3\n  template:\n    chart:\n      name: nginx\n      repoUrl: https:\/\/storage.googleapis.com\/shipper-demo\n      version: 0.0.1\n    clusterRequirements:\n      regions:\n        - name: local\n    strategy:\n      steps:\n        - capacity:\n            contender: 1\n            incumbent: 100\n          name: staging\n          traffic:\n            contender: 0\n            incumbent: 100\n        - capacity:\n            contender: 100\n            incumbent: 0\n          name: full on\n          traffic:\n            contender: 100\n            incumbent: 0\n    values:\n      replicaCount: 3<\/code><\/pre>\n<p><\/p>\n<p><strong>Shipper \u00ebsht\u00eb nj\u00eb opsion i mir\u00eb p\u00ebr menaxhimin e shum\u00eb klaster\u00ebve, por lidhja e tij e ngusht\u00eb me Helm vet\u00ebm sa pengon.<\/strong><\/p>\n<p><\/p>\n<p><em>Po t\u2019i kalojm\u00eb t\u00eb gjith\u00eb nga Helm n\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/kubernetes.io\/blog\/2018\/05\/29\/introducing-kustomize-template-free-configuration-customization-for-kubernetes\/\">(p\u00ebr t'iu th\u00ebn\u00eb, zhvillimi tani po b\u00ebhet n\u00eb nj\u00eb repository t\u00eb ve\u00e7ant\u00eb), pra p\u00ebr t\u00eb p\u00ebrpunuar YAML-t\u00eb shtes\u00eb nga direktori t\u00eb ve\u00e7anta kustomization (detajet p\u00ebr p\u00ebrdorimin e tyre shih n\u00eb<\/a><\/noindex> \u0438\u043b\u0438 <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/deepmind\/kapitan\">kapitan<\/a><\/noindex>?<\/em><\/p>\n<p><\/p>\n<p>M\u00ebsoni m\u00eb shum\u00eb rreth Shipper dhe filozofis\u00eb s\u00eb tij n\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/medium.com\/booking-com-infrastructure\/introducing-shipper-daf9244e3882\">ket\u00eb komunikat\u00eb shtypi zyrtare<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>N\u00ebse d\u00ebshironi t\u00eb hulumtoni kodin, <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/bookingcom\/shipper\">shkoni n\u00eb depoziten zyrtare t\u00eb projektit<\/a><\/noindex>.<\/p>\n<p><\/p>\n<h3 id=\"variant-3-magicheskoe-obedinenie-klasterov\">\u0412\u0430\u0440\u0438\u0430\u043d\u0442 3: &#171;\u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0435&#187; \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432<\/h3>\n<p><\/p>\n<p>Kubefed v2 dhe Shipper punojn\u00eb me federat\u00ebn e klaster\u00ebve, duke u ofruar klaster\u00ebve burime t\u00eb reja p\u00ebrmes definicionit t\u00eb burimeve t\u00eb p\u00ebrdoruesve.<\/p>\n<p><\/p>\n<p><em>Por ndoshta nuk d\u00ebshironi t\u00eb rishkruani t\u00eb gjitha d\u00ebrgesat, StatefulSets, DaemonSets dhe t\u00eb tjer\u00eb p\u00ebr t\u00eb bashkuar?<\/em><\/p>\n<p><\/p>\n<p><em>Si ta p\u00ebrfshini nj\u00eb klaster ekzistues n\u00eb federat\u00eb pa ndryshuar YAML?<\/em><\/p>\n<p><\/p>\n<p><noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/admiraltyio\/multicluster-scheduler\">multi-cluster-scheduler \u00ebsht\u00eb nj\u00eb projekt i Admirality<\/a><\/noindex>, i cili merret me ngarkesat e pun\u00ebs n\u00eb klaster\u00eb.<\/p>\n<p><\/p>\n<p>Por n\u00eb vend q\u00eb t\u00eb shpikni nj\u00eb m\u00ebnyr\u00eb t\u00eb re p\u00ebr t\u00eb nd\u00ebrvepruar me klasterin dhe p\u00ebr t\u00eb mb\u00ebshtjell\u00eb burimet n\u00eb definicionet e p\u00ebrdoruesve, multi-cluster-scheduler \u00ebsht\u00eb integruar n\u00eb ciklin standard t\u00eb jet\u00ebs t\u00eb Kubernetesit dhe kap t\u00eb gjitha thirrjet q\u00eb krijojn\u00eb pods.<\/p>\n<p><\/p>\n<p><strong>\u00c7do pod i krijuar menj\u00ebher\u00eb z\u00ebvend\u00ebsohet me nj\u00eb vend t\u00eb zbraz\u00ebt.<\/strong><\/p>\n<p><\/p>\n<blockquote><p>multi-cluster-scheduler p\u00ebrdor <noindex><a rel=\"nofollow\" href=\"https:\/\/kubernetes.io\/docs\/reference\/access-authn-authz\/extensible-admission-controllers\/\">web-hooks p\u00ebr t\u00eb modifikuar qasjen<\/a><\/noindex>, n\u00eb m\u00ebnyr\u00eb q\u00eb t\u00eb kap\u00eb thirrjen dhe t\u00eb krijoj\u00eb nj\u00eb pod t\u00eb zbraz\u00ebt pa aktivitet.<\/p><\/blockquote>\n<p>Pod-i origjinal kalon n\u00ebp\u00ebr nj\u00eb cik\u00ebl tjet\u00ebr planifikimi, ku pas anketimit t\u00eb gjith\u00eb federat\u00ebs merret nj\u00eb vendim mbi vendosjen.<\/p>\n<p><\/p>\n<p>N\u00eb fund, pod-i d\u00ebrgohet n\u00eb klasterin e synuar.<\/p>\n<p><\/p>\n<p>Si rezultat, ju keni nj\u00eb pod t\u00eb tep\u00ebrt, i cili nuk b\u00ebn asgj\u00eb, thjesht z\u00ebvend\u00ebson hap\u00ebsir\u00ebn.<\/p>\n<p><\/p>\n<p>Avantazhi \u00ebsht\u00eb se nuk keni pasur nevoj\u00eb t\u00eb shkruani burime t\u00eb reja p\u00ebr t\u00eb bashkuar d\u00ebrgesat.<\/p>\n<p><\/p>\n<p><strong>\u00c7do burim q\u00eb krijon pod, automatikisht \u00ebsht\u00eb i gatsh\u00ebm p\u00ebr bashkim.<\/strong><\/p>\n<p><\/p>\n<p>Kjo \u00ebsht\u00eb interesante, pasi ju papritur keni d\u00ebrgesa t\u00eb shp\u00ebrndara n\u00eb disa rajone, dhe nuk e keni v\u00ebn\u00eb re. Megjithat\u00eb, kjo \u00ebsht\u00eb mjaft e rrezikshme, pasi gjith\u00e7ka mb\u00ebshtetet n\u00eb magji.<\/p>\n<p><\/p>\n<p>Por n\u00ebse Shipper p\u00ebrpiqet kryesisht t\u00eb zbus\u00eb pasojat e d\u00ebrgesave, multi-cluster-scheduler kryen detyra m\u00eb gjith\u00ebp\u00ebrfshir\u00ebse dhe ndoshta \u00ebsht\u00eb m\u00eb i p\u00ebrshtatsh\u00ebm p\u00ebr detyra me paketa.<\/p>\n<p><\/p>\n<p>Ai nuk ka nj\u00eb mekaniz\u00ebm t\u00eb avancuar p\u00ebr d\u00ebrgesat gradualisht.<\/p>\n<p><\/p>\n<p>M\u00eb shum\u00eb rreth multi-cluster-scheduler mund t\u00eb m\u00ebsoni n\u00eb <noindex>faqen e depozit\u00ebs zyrtare<\/noindex>.<\/p>\n<p><\/p>\n<p>N\u00ebse d\u00ebshironi t\u00eb lexoni rreth multi-cluster-scheduler n\u00eb veprim, Admiralty ka <noindex><a rel=\"nofollow\" href=\"https:\/\/admiralty.io\/blog\/running-argo-workflows-across-multiple-kubernetes-clusters\/\">nj\u00eb rast interesant aplikimi me Argo<\/a><\/noindex> \u2014 proceset e pun\u00ebs, ngjarjet, CI dhe CD t\u00eb Kubernetes.<\/p>\n<p><\/p>\n<h3 id=\"drugie-instrumenty-i-resheniya\">Mjetet dhe zgjidhjet e tjera<\/h3>\n<p><\/p>\n<p>Lidhja dhe menaxhimi i disa klaster\u00ebve \u00ebsht\u00eb nj\u00eb detyr\u00eb e komplikuar, nuk ka nj\u00eb zgjidhje universale.<\/p>\n<p><\/p>\n<p>N\u00ebse d\u00ebshiron t\u00eb studioj\u00eb m\u00eb n\u00eb thell\u00ebsi k\u00ebt\u00eb tem\u00eb, ja disa burime p\u00ebr ju:<\/p>\n<p><\/p>\n<ul>\n<li><noindex><a rel=\"nofollow\" href=\"https:\/\/submariner.io\/\">Submariner nga Rancher<\/a><\/noindex> \u2014 nj\u00eb mjet q\u00eb lidh rrjetet overlay t\u00eb klaster\u00ebve t\u00eb ndrysh\u00ebm t\u00eb Kubernetes.<\/li>\n<li>Rrjeti me pakic\u00eb Target p\u00ebrdor <noindex><a rel=\"nofollow\" href=\"https:\/\/tech.target.com\/infrastructure\/2018\/06\/20\/enter-unimatrix.html\">Unimatrix n\u00eb kombinim me Spinnaker, p\u00ebr t\u00eb orkestruar deploy n\u00eb disa klaster\u00eb<\/a><\/noindex>.<\/li>\n<li>Provoni t\u00eb p\u00ebrdorni IPV6 dhe <noindex><a rel=\"nofollow\" href=\"https:\/\/itnext.io\/kubernetes-multi-cluster-networking-made-simple-c8f26827813\">nj\u00eb rrjet t\u00eb vet\u00ebm n\u00eb disa rajone<\/a><\/noindex>.<\/li>\n<li>Mund t\u00eb p\u00ebrdoret nj\u00eb service mesh, p\u00ebr shembull <noindex><a rel=\"nofollow\" href=\"https:\/\/istio.io\/docs\/setup\/kubernetes\/install\/multicluster\/\">Istio p\u00ebr t\u00eb lidhur disa klaster\u00eb<\/a><\/noindex>.<\/li>\n<li>Cilium, nj\u00eb plugin i nd\u00ebrfaqes s\u00eb rrjetit t\u00eb kontejner\u00ebve, ofron <noindex><a rel=\"nofollow\" href=\"https:\/\/cilium.io\/blog\/2019\/03\/12\/clustermesh\/\">funksionin cluster mesh<\/a><\/noindex>, i cili lejon kombinimin e disa klaster\u00ebve<\/li>\n<\/ul>\n<p><\/p>\n<h3 id=\"vot-i-vse-na-segodnya\">Kjo \u00ebsht\u00eb gjith\u00e7ka p\u00ebr sot<\/h3>\n<p><\/p>\n<p><em>Faleminderit q\u00eb e lexuat deri n\u00eb fund!<\/em><\/p>\n<p><\/p>\n<p>N\u00ebse e dini nj\u00eb m\u00ebnyr\u00eb m\u00eb efikase p\u00ebr t\u00eb lidhur disa klaster\u00eb, <noindex><a rel=\"nofollow\" href=\"http:\/\/hello@learnk8s.io\">na tregoni<\/a><\/noindex>.<\/p>\n<p><\/p>\n<p>Ne do t\u00eb shtojm\u00eb m\u00ebnyr\u00ebn tuaj n\u00eb lidhje.<\/p>\n<p><\/p>\n<p>Fal\u00eb t\u00eb ve\u00e7ant\u00eb Chris Nesbitt-Smith (<noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/chrisns\">Chris Nesbitt-Smith<\/a><\/noindex>) dhe Vincent De Smet (<noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/so0k\">Vincent De Smet<\/a><\/noindex>) (inxhiner sigurie n\u00eb <noindex><a rel=\"nofollow\" href=\"https:\/\/swatmobile.io\/\">swatmobile.io<\/a><\/noindex>) p\u00ebr leximin e artikullit dhe ndarjen e informacionit t\u00eb dobish\u00ebm rreth m\u00ebnyr\u00ebs sesi funksionon federata.<\/p>\n<p>Burimi: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/southbridge\/blog\/454056\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0435\u0440\u0438\u044e \u043a\u0440\u0430\u0442\u043a\u0438\u0445 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432 \u043f\u043e Kubernetes. \u042d\u0442\u043e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u0430\u044f \u043a\u043e\u043b\u043e\u043d\u043a\u0430 \u0441 \u0441\u0430\u043c\u044b\u043c\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u043d\u043b\u0430\u0439\u043d \u0438 \u043d\u0430 \u043d\u0430\u0448\u0438\u0445 \u0442\u0440\u0435\u043d\u0438\u043d\u0433\u0430\u0445. \u041e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u044d\u043a\u0441\u043f\u0435\u0440\u0442 \u043f\u043e Kubernetes. \u0421\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0442 \u2014 \u0414\u0430\u043d\u0438\u044d\u043b\u044c \u041f\u043e\u043b\u0435\u043d\u0447\u0438\u043a (Daniele Polencic). \u0414\u0430\u043d\u0438\u044d\u043b\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u043e\u043c \u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u043c \u041f\u041e \u0432 Learnk8s. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0441\u0432\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043f\u043e\u0441\u0442\u0435, \u0441\u0432\u044f\u0436\u0438\u0442\u0435\u0441\u044c \u0441 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":26226,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-34825","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0435\u0440\u0438\u044e.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/kak-soedinit-klastery-kubernetes-v-raznyh-data-tsentrah\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"sq_AL\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u041a\u0430\u043a \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u044b Kubernetes \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0434\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440\u0430\u0445 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0435\u0440\u0438\u044e.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/kak-soedinit-klastery-kubernetes-v-raznyh-data-tsentrah\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T19:00:35+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T19:00:35+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Si t\u00eb lidhni klaster\u00ebt Kubernetes n\u00eb qendra t\u00eb ndryshme t\u00eb t\u00eb dh\u00ebnave | ProHoster","description":"Mir\u00eb se vini n\u00eb serin\u00eb.","canonical_url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/kak-soedinit-klastery-kubernetes-v-raznyh-data-tsentrah","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"sq_AL","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u041a\u0430\u043a \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u044b Kubernetes \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0434\u0430\u0442\u0430-\u0446\u0435\u043d\u0442\u0440\u0430\u0445 | ProHoster","og:description":"\u0414\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0435\u0440\u0438\u044e.","og:url":"https:\/\/prohoster.info\/sq\/blog\/administrirovanie\/kak-soedinit-klastery-kubernetes-v-raznyh-data-tsentrah","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T19:00:35+00:00","article:modified_time":"2019-10-31T19:00:35+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"34825","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-21 20:45:19","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 02:14:06","updated":"2026-01-21 20:45:19","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/34825","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/comments?post=34825"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/34825\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media\/26226"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media?parent=34825"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/categories?post=34825"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/tags?post=34825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}