endpoint
標題 Endpoint是什么?
endpoint是K8s的集群中的一個資源對象,存儲在Etcd中,用來記錄一個service對應所有的pod的Ip訪問地址.service配置了selector,endpoint controller 會自動創(chuàng)建對應的endpoint,否則不會生成endpoint對象.
 比如,集群中創(chuàng)建了一個mysql的service,就會生成一個名為mysql的endpoint,endopoint就是service關聯(lián)的pod的ip地址和提供在這個服務的container端口。
 endpoint是實現(xiàn)實際服務的端點集合。
 當kubernete在創(chuàng)建service的過程中,會根據(jù)servcice的標簽選擇器(label selector)來查找pod,據(jù)此也創(chuàng)建出和service同名的endpoint,當pod的IP地址發(fā)生變化后,endpoint的內(nèi)容也隨之變化.service收到請求后就通過endpoint找到請求轉(zhuǎn)發(fā)的地址。
 簡單總結:endpoint是一個列表,存儲了對應service后端的pod名稱和IP的列表,并且提供了將請求轉(zhuǎn)發(fā)到pod上的實際能力。
總結
                            
                        - 上一篇: 计算机原理 初识python
 - 下一篇: UG/NX二次开发Siemens官方NX