Kubernetes 1.17: kakaretso ea lintlafatso tsa mantlha

Maobane, la 9 Tšitoe, etsahetse tokollo e latelang ea Kubernetes - 1.17. Ho ea ka moetlo o tsoetseng pele bakeng sa blog ea rona, re bua ka liphetoho tsa bohlokoa ka ho fetisisa phetolelong e ncha.

Kubernetes 1.17: kakaretso ea lintlafatso tsa mantlha

Boitsebiso bo sebelisitsoeng ho lokisa boitsebiso bona bo nkiloe phatlalatsong ea molao, Kubernetes e ntlafatsa litafole tsa ho latedisa, PHETOHO-1.17 le litaba tse amanang le tsona, likopo tsa ho hula, le Litlhahiso tsa Ntlafatso ea Kubernetes (KEP). Joale, ke eng e ncha? ..

Tsebiso ea thuto ea thuto-thuto

Sechaba sa Kubernetes esale se emetse karolo ena nako e telele - Tsamaiso ea litšebeletso tse hlokomelang thuto ea holimo. Haeba Kep e qala ka Mphalane 2018, le ofisiri Ntlafatso - Lilemo tse 2 tse fetileng, litaba tse tloaelehileng (joaloka e) - le lilemo tse 'maloa ho feta ...

Mohopolo o akaretsang ke ho fana ka bokhoni ba ho kenya tšebetsong tsela ea "lehae" bakeng sa lits'ebeletso tse lulang Kubernetes. "Sebaka" tabeng ena se bolela "boemo bo tšoanang ba topological" (boemo ba topology), e ka bang:

  • node e tšoanang bakeng sa litšebeletso,
  • rack e tšoanang ea seva,
  • sebaka se le seng
  • mofani oa leru ea tšoanang,
  • ...

Mehlala ea ho sebelisa tšobotsi ena:

  • ho boloka sephethephethe lits'ebetsong tsa maru tse nang le libaka tse ngata tse fumanehang (multi-AZ) - bona. papiso e ncha ho sebelisa mohlala oa sephethephethe se tsoang sebakeng se le seng, empa li-AZ tse fapaneng ho AWS;
  • latency e tlase ea ts'ebetso / ts'ebetso e betere;
  • tšebeletso e sharded e nang le boitsebiso ba sebaka ka node ka shard ka 'ngoe;
  • ho beoa ha li-analogues tse hlakileng (kapa li-analogues) sebakeng se le seng le lits'ebetso tseo lintlha tsa tsona li bokelloang;
  • ...

Tsela e joalo, e "tsebang" ka topology, e boetse e bitsoa network affinity - ka papiso le kamano ea node, pod affinity/ Bokgale ba ho ba le kamano kapa e hlahileng eseng khale haholo Topology-Aware Bolumo Kemiso ea (le Ho fana ka Molumo). Boemo ba hona joale ba ts'ebetsong ServiceTopology ho Kubernetes - alpha version.

Bakeng sa lintlha tse mabapi le hore na karolo e sebetsa joang le hore na u ka e sebelisa joang, bala sehlooho sena ho tsoa ho e mong oa bangoli.

IPv4/IPv6 tšehetso ea li-stack tse peli

Khatelo-pele e kholo tsitsitseng karolong e 'ngoe ea marang-rang: ts'ehetso ea nako e le' ngoe bakeng sa mekotla e 'meli ea IP, e ileng ea qala ho kenngoa K8s 1.16. Haholo-holo, tokollo e ncha e tlisitse liphetoho tse latelang:

  • ho be-proxy kenngwa tshebetsong monyetla oa ho sebetsa ka nako e le 'ngoe ka mekhoa e 'meli (IPv4 le IPv6);
  • в Pod.Status.PodIPs e hlahile tšehetso bakeng sa API e tlase (ka nako e ts'oanang le in /etc/hosts joale ba hloka hore moamoheli a kenye aterese ea IPv6);
  • tšehetso ea li-stack tse peli TS'EPANG (Kubernetes IN Docker) le kubeadm;
  • liteko tse ntlafalitsoeng tsa e2e.

Kubernetes 1.17: kakaretso ea lintlafatso tsa mantlha
Papiso ho sebelisa li-dual stack IPV4/IPv6 ho KIND

Tsoelopele ho CSI

E phatlalalitsoe e tsitsitse tšehetso ea topology bakeng sa polokelo e thehiloeng ho CSI, e kentsoeng pele ho K8s 1.12.

Initiative bakeng sa ho falla ha li-plugins tsa molumo ho CSI - Ho falla ha CSI - e fihlelletse mofuta oa beta. Karolo ena e bohlokoa haholo molemong oa ho fetolela li-plugins tse teng tsa polokelo (ka sefate) ho sebopeho sa sejoale-joale (CSI, e tsoile sefateng) ha e bonahale ho basebelisi ba ho qetela ba Kubernetes. Baokameli ba lihlopha ba tla hloka feela ho nolofalletsa CSI Migration, ka mor'a moo lisebelisoa tse teng tsa naha le mesebetsi e mengata e tla tsoela pele ho "sebetsa feela" ... empa ho sebelisa bakhanni ba morao-rao ba CSI ho e-na le ba khale ba kenyelelitsoe motheong oa Kubernetes.

Hajoale, phallo ea bakhanni ba AWS EBS e se e loketse mofuta oa beta (kubernetes.io/aws-ebs) le GCE PD (kubernetes.io/gce-pd). Malebela a libaka tse ling tsa polokelo ke tse latelang:

Kubernetes 1.17: kakaretso ea lintlafatso tsa mantlha

Re buile ka hore na tšehetso ea "setso" ea polokelo ho K8s e fihlile joang ho CSI ho sehlooho sena. 'Me phetoho ea ho falla ha CSI ho ea boemong ba beta e nehetsoe ho phatlalatso e arohaneng ho blog ea morero.

Ntle le moo, ts'ebetso e 'ngoe ea bohlokoa maemong a CSI, e qalang (ts'ebetso ea alpha) ho K1.17s 8, e fihletse boemo ba beta (ke hore e nolofalitsoe ke kamehla) tokollong ea Kubernetes 1.12 - ho etsa ditshoantsho le ho hlaphoheloa ho bona. Har'a liphetoho tse entsoeng ho Kubernetes Volume Snapshot tseleng ea tokollo ea beta:

  • ho arola koloi e ka ntle ea CSI-snapshotter ka lilaoli tse peli,
  • sephiri se ekelitsoeng bakeng sa ho hlakolwa (sephiri sa ho hlakola) joalo ka tlhaloso ea litaba tsa senepe sa molumo,
  • sephetho se secha (maqeto) ho thibela snapshot API ntho hore e se ke ea hlakoloa haeba ho na le likhokahano tse setseng.

Nakong ea ho lokolloa ha 1.17, tšobotsi ena e tšehetsoa ke bakhanni ba bararo ba CSI: GCE Persistent Disk CSI Driver, Portworx CSI Driver le NetApp Trident CSI Driver. Lintlha tse ling mabapi le ts'ebetsong le ts'ebeliso ea eona li ka fumanoa ho phatlalatso ena ho blog.

Cloud Provider Labels

Labels hore ka tsela e iketsang e abetsoeng ho li-node le li-volumes tse entsoeng ho itšetlehile ka mofani oa maru o sebelisitsoeng, esale e fumaneha ho Kubernetes e le mofuta oa beta ka nako e telele haholo - ho tloha ho lokolloa ha K8s 1.2 (Mmesa 2016!). Ka lebaka la tšebeliso ea bona e atileng ka nako e telele, bahlahisi etsa qeto, hore ke nako ea ho phatlalatsa hore tšobotsi e tsitsitse (GA).

Ka hona, kaofela li ile tsa rehoa ho latela (ka topology):

  • beta.kubernetes.io/instance-typenode.kubernetes.io/instance-type
  • failure-domain.beta.kubernetes.io/zonetopology.kubernetes.io/zone
  • failure-domain.beta.kubernetes.io/regiontopology.kubernetes.io/region

... empa li ntse li fumaneha tlas'a mabitso a tsona a khale (bakeng sa ho lumellana ka morao). Leha ho le joalo, balaoli bohle ba khothaletsoa ho fetohela ho li-label tsa hajoale. Related Documentation K8s e ntlafalitsoe.

Tlhahiso e hlophisitsoeng ea kubeadm

E hlahisoa ka mofuta oa alpha lekhetlo la pele tlhahiso e hlophisitsoeng bakeng sa tšebeliso ea kubeadm. Lifomete tse tšehetsoeng: JSON, YAML, Go template.

Tšusumetso ea ho kenya tšebetsong tšobotsi ena (ho latela Kep) ke:

Le ha Kubernetes e ka tsamaisoa ka letsoho, maemo a de facto (haeba e se de jure) bakeng sa ts'ebetso ena ke ho sebelisa kubeadm. Lisebelisoa tse tsebahalang tsa taolo ea sistimi joalo ka Terraform li itšetleha ka kubeadm bakeng sa phepelo ea Kubernetes. Lintlafatso tse reriloeng ho Cluster API li kenyelletsa sephutheloana se kopantsoeng sa Kubernetes bootstrapping ka kubeadm le cloud-init.

Ntle le tlhahiso e hlophisitsoeng, esita le liphetoho tse se nang molato ha u habanya feela li ka senya Terraform, Cluster API le software e 'ngoe e sebelisang liphetho tsa kubeadm.

Merero ea rona ea hanghang e kenyelletsa tšehetso (ka mokhoa oa tlhahiso e hlophisitsoeng) bakeng sa litaelo tse latelang tsa kubeadm:

  • alpha certs
  • config images list
  • init
  • token create
  • token list
  • upgrade plan
  • version

Setšoantšo sa karabo ea JSON ho taelo kubeadm init -o json:

{
  "node0": "192.168.20.51:443",
  "caCrt": "sha256:1f40ff4bd1b854fb4a5cf5d2f38267a5ce5f89e34d34b0f62bf335d74eef91a3",
  "token": {
    "id":          "5ndzuu.ngie1sxkgielfpb1",
    "ttl":         "23h",
    "expires":     "2019-05-08T18:58:07Z",
    "usages":      [
      "authentication",
      "signing"
    ],
    "description": "The default bootstrap token generated by 'kubeadm init'.",
    "extraGroups": [
      "system:bootstrappers:kubeadm:default-node-token"
    ]
  },
  "raw": "Rm9yIHRoZSBhY3R1YWwgb3V0cHV0IG9mIHRoZSAia3ViZWFkbSBpbml0IiBjb21tYW5kLCBwbGVhc2Ugc2VlIGh0dHBzOi8vZ2lzdC5naXRodWIuY29tL2FrdXR6LzdhNjg2ZGU1N2JmNDMzZjkyZjcxYjZmYjc3ZDRkOWJhI2ZpbGUta3ViZWFkbS1pbml0LW91dHB1dC1sb2c="
}

Ho tsitsisa ha lintho tse ling tse ncha

Ka kakaretso, ho lokolloa ha Kubernetes 1.17 ho etsahetse tlas'a lepetjo "Ho tsitsa" Sena se ile sa nolofalloa ke taba ea hore likarolo tse ngata ho eona (palo eohle ea tsona ke 14) e fumane boemo ba GA. Har'a bona:

Liphetoho tse ling

Lethathamo le felletseng la lintlafatso ho Kubernetes 1.17, ehlile, ha le felle feela ho tse thathamisitsoeng ka holimo. Tse ling ke tsena (le bakeng sa lenane le felletseng, bona PHETOLELO):

  • Karolo e hlahisitsoeng tokollong ea ho qetela e fihletse mofuta oa beta RunAsUserName bakeng sa lifensetere;
  • phetoho e tšoanang oela EndpointSlice API (hape e tsoa ho K8s 1.16), leha ho le joalo hajoale tharollo ena ea ho ntlafatsa ts'ebetso / scalability ea Endpoint API ha e khonehe ka ho sa feleng;
  • li-pods hona joale li bohlokoa bakeng sa ts'ebetso ea lihlopha e ka etsoa eseng feela libakeng tsa mabitso kube-system (bakeng sa lintlha, sheba litokomane tsa Fokotsa tšebeliso ea Sehlopha sa Bohlokoa);
  • khetho e ncha ea kubelet - --reserved-cpus - e o lumella ho hlalosa ka ho hlaka lenane la li-CPU tse boloketsoeng sistimi;
  • etsoe kubectl logs hlahisoa folakha e ncha --prefix, ho eketsa lebitso la pod le mohloli oa mohloli moleng o mong le o mong oa log;
  • в label.Selector eketsa RequiresExactMatch;
  • lijana tsohle ka kube-dns li ntse li matha ka litokelo tse fokolang;
  • hyperkube e arotsoe sebakeng se arohaneng sa GitHub 'me ha e sa tla hlola e kenyelletsoa litokollong tsa Kubernetes;
  • haholo tshebetso e ntlafetseng kube-proxy bakeng sa likou tseo e seng tsa UDP.

Liphetoho tse itšetlehileng ka tsona:

  • Mofuta oa CoreDNS o kenyellelitsoeng ho kubeadm ke 1.6.5;
  • crictl phetolelo e ntlafalitsoeng ho v1.16.1;
  • CSI 1.2.0;
  • joalo-joalo 3.4.3;
  • Mofuta oa morao-rao o lekiloeng oa Docker o ntlafalitsoe ho 19.03;
  • Mofuta o fokolang oa Go o hlokahalang ho haha ​​Kubernetes 1.17 ke 1.13.4.

PES

Bala hape ho blog ea rona:

Source: www.habr.com

Eketsa ka tlhaloso