NodePort ua haujlwm li cas hauv Kubernetes?
NodePort ua haujlwm li cas hauv Kubernetes?

Video: NodePort ua haujlwm li cas hauv Kubernetes?

Video: NodePort ua haujlwm li cas hauv Kubernetes?
Video: 11 - Service в Kubernetes - Часть 2. Types: ExternalName, NodePort и LoadBalancer. Headless Service 2024, Tej zaum
Anonim

A NodePort yog qhib chaw nres nkoj ntawm txhua qhov ntawm koj pawg. Kubernetes transparently txoj kev nkag mus rau ntawm lub NodePort rau koj qhov kev pabcuam, txawm tias koj daim ntawv thov yog khiav ntawm qhov sib txawv. Txawm li cas los xij, a NodePort yog muab los ntawm lub pas dej ntawm pawg-configured NodePort ntau yam (feem ntau 30000–32767).

Tsis tas li ntawd, Kubernetes ClusterIP ua haujlwm li cas?

A ClusterIP yog tus IP nkag mus tau rau sab hauv Kubernetes pawg thiab tag nrho cov kev pabcuam hauv nws. Rau NodePort, a ClusterIP yog tsim ua ntej thiab tom qab ntawd tag nrho cov tsheb thauj khoom sib npaug ntawm qhov chaw nres nkoj. Qhov kev thov raug xa mus rau ib qho ntawm Pods ntawm TCP chaw nres nkoj teev los ntawm lub hom phiajPort teb.

Tsis tas li ntawd, qhov txawv ntawm NodePort thiab ClusterIP yog dab tsi? Dab tsi yog qhov Qhov sib txawv ntawm ClusterIP , NodePort thiab LoadBalancer hom kev pabcuam hauv Kubernetes? NodePort : Tshaj tawm cov kev pabcuam ntawm txhua Node tus IP ntawm qhov chaw nres nkoj zoo li qub (tus NodePort ). A ClusterIP service, uas NodePort kev pab cuam yuav txoj kev, yog cia li tsim.

Ntawm no, NodePort yog dab tsi?

NodePort . A NodePort kev pabcuam yog txoj hauv kev tseem ceeb tshaj plaws kom tau txais kev tsheb sab nraud ncaj qha rau koj qhov kev pabcuam. NodePort , raws li lub npe txhais tau hais tias, qhib qhov chaw nres nkoj tshwj xeeb ntawm txhua qhov Nodes (VMs), thiab txhua qhov kev xa mus rau qhov chaw nres nkoj no raug xa mus rau qhov kev pabcuam.

Ingress txawv li NodePort lossis LoadBalancer li cas?

NodePort thiab LoadBalancer cia koj nthuav tawm ib qho kev pabcuam los ntawm kev qhia tus nqi ntawd hauv qhov kev pabcuam hom. Ingress , ntawm lwm yam tes, yog ib qho kev ywj pheej kiag li rau koj qhov kev pabcuam. Koj tshaj tawm, tsim thiab rhuav tshem nws cais rau koj cov kev pabcuam. Qhov no ua rau nws decoupled thiab cais los ntawm cov kev pabcuam koj xav tau rau nthuav tawm.

Pom zoo: