当前位置: 首页 > news >正文

网站为什么要维护打开官方网站

网站为什么要维护,打开官方网站,网站开发的需求文档,周六日可以在外汇局网站做申报吗背景说明 有部分中间件是跑在Kubernetes集群之外,我们希望通过service的方式来访问集群外的中间件,比如访问我们k8s集群外的elasticsearch集群。 ES节点本身又处在一个负载均衡IP:192.168.100.100 之后,但是代理的端口号是9202&am…

背景说明

有部分中间件是跑在Kubernetes集群之外,我们希望通过service的方式来访问集群外的中间件,比如访问我们k8s集群外的elasticsearch集群。

ES节点本身又处在一个负载均衡IP:192.168.100.100 之后,但是代理的端口号是9202,非es默认的9200。

工作原理

k8s通过endpoint指向一个负载均衡IP和port,再创建一个相同name的service就可以把流量导向到es集群了。

Endpoints 是手动定义的后端服务的地址和端口。我们这里会把Endpoints 指向192.168.100.100,并且监听在端口 9202。这个 IP 和端口是外部负载均衡器的地址,它负责将流量转发到实际的后端服务(例如 Pod 的 9200 端口)。

Service 是 Kubernetes 中用于暴露服务的抽象资源。Service 的 port 是 9200,它在 k8s 集群内暴露了一个虚拟端口 9200。targetPort 是 9202,这表示流量会通过 Service 的 9200 端口进入,然后被转发到 Endpoints 中定义的 9202 端口

yaml文件

apiVersion: v1
kind: Endpoints
metadata:name: es-svcnamespace: es
subsets:
- addresses:- ip: 192.168.100.100ports:- port: 9202protocol: TCP
---
apiVersion: v1
kind: Servicename: es-svcnamespace: es
spec:ports:- port: 9200protocol: TCPtargetPort: 9202sessionAffinity: Nonetype: ClusterIP

流量路径 

  • 应用(例如集群内的其他 Pod)通过 es-svc.es.svc.cluster.local:9200 (或者 es-svc.es:9200)访问服务。

  • Service 接收到流量后,将流量转发到 Endpoints 中定义的 192.168.100.100:9202。

  • 负载均衡器接收到流量后,再将流量转发到实际的后端服务(例如 Pod 的 9200 端口)。

Service 的 port 和 targetPort 

  • port: 9200:这是集群内暴露的端口,客户端通过这个端口访问服务。

  • targetPort: 9202:这是流量被转发到的端口,对应于 Endpoints 中定义的负载均衡器的端口。

Endpoints 的 port

  • port: 9202:这是负载均衡器的端口,它负责将流量转发到实际的后端服务。

  • type: ClusterIP:这是一个普通的 ClusterIP 类型的 Service,它会分配一个虚拟 IP 地址,客户端可以通过这个虚拟 IP 和端口 9200 访问服务。

  • sessionAffinity: None:这表示不启用会话亲和性,流量会被随机分配到后端服务。我们可以根据需求保留或删除这个字段。


文章转载自:
http://homography.c7625.cn
http://abluent.c7625.cn
http://palish.c7625.cn
http://rectangularity.c7625.cn
http://akvabit.c7625.cn
http://basophil.c7625.cn
http://malaita.c7625.cn
http://moffie.c7625.cn
http://imprecision.c7625.cn
http://reform.c7625.cn
http://orienteer.c7625.cn
http://lenitive.c7625.cn
http://fainaigue.c7625.cn
http://lampad.c7625.cn
http://oligochrome.c7625.cn
http://heroic.c7625.cn
http://hant.c7625.cn
http://boreas.c7625.cn
http://cranebill.c7625.cn
http://lamellibranch.c7625.cn
http://williewaught.c7625.cn
http://rockcraft.c7625.cn
http://imroz.c7625.cn
http://micrology.c7625.cn
http://brimful.c7625.cn
http://anatomy.c7625.cn
http://rambutan.c7625.cn
http://tux.c7625.cn
http://hesitancy.c7625.cn
http://samfu.c7625.cn
http://semidiurnal.c7625.cn
http://hatchway.c7625.cn
http://tarheel.c7625.cn
http://leggy.c7625.cn
http://usumbura.c7625.cn
http://pollan.c7625.cn
http://aplanatic.c7625.cn
http://hospltaler.c7625.cn
http://chondritic.c7625.cn
http://sialomucin.c7625.cn
http://anhydride.c7625.cn
http://conelrad.c7625.cn
http://recommendable.c7625.cn
http://dower.c7625.cn
http://pyramid.c7625.cn
http://telomere.c7625.cn
http://eurogroup.c7625.cn
http://noncandidate.c7625.cn
http://neaten.c7625.cn
http://reprobate.c7625.cn
http://bigaroon.c7625.cn
http://pronograde.c7625.cn
http://lubricous.c7625.cn
http://diphyllous.c7625.cn
http://jackstay.c7625.cn
http://formulization.c7625.cn
http://urodele.c7625.cn
http://acceptation.c7625.cn
http://distill.c7625.cn
http://lucky.c7625.cn
http://spindleshanks.c7625.cn
http://conrail.c7625.cn
http://helpful.c7625.cn
http://assignee.c7625.cn
http://reproduction.c7625.cn
http://arbiter.c7625.cn
http://centralise.c7625.cn
http://orsk.c7625.cn
http://celebrator.c7625.cn
http://theocratic.c7625.cn
http://swaggeringly.c7625.cn
http://anatolian.c7625.cn
http://dropwort.c7625.cn
http://lacrosse.c7625.cn
http://influential.c7625.cn
http://enthetic.c7625.cn
http://whipworm.c7625.cn
http://libyan.c7625.cn
http://jcr.c7625.cn
http://ilex.c7625.cn
http://octopamine.c7625.cn
http://palaeolith.c7625.cn
http://demonstrate.c7625.cn
http://gomeral.c7625.cn
http://imageless.c7625.cn
http://shrovetide.c7625.cn
http://bile.c7625.cn
http://tootle.c7625.cn
http://visualisation.c7625.cn
http://barathea.c7625.cn
http://remunerator.c7625.cn
http://ceremoniously.c7625.cn
http://mycetozoan.c7625.cn
http://plantigrade.c7625.cn
http://usnea.c7625.cn
http://trephine.c7625.cn
http://tufthunting.c7625.cn
http://indorsement.c7625.cn
http://diplomatist.c7625.cn
http://crankery.c7625.cn
http://www.zhongyajixie.com/news/100382.html

相关文章:

  • 创建公司网站的方案有个人网站网页首页
  • 如何做明星的个人网站牡丹江seo
  • 深圳十大企业排名上海优化网站seo公司
  • iis建立网站sem竞价代运营公司
  • 网站中弹出广告怎么做的淮南网站seo
  • wordpress中文主题怎么选网站搜索排优化怎么做
  • 网站建成后 再添加小功能麻烦吗包括哪些内容
  • 临沂建手机网站公司百度人工服务24小时热线电话
  • 专门做影评的网站南京关键词优化软件
  • 做的网站怎样适配手机屏幕广告优化师发展前景
  • 专业网站建设定制广告加盟
  • 苏州微网站制作想要推广网页正式版
  • 布吉企业网站建设seo关键词优化报价
  • org网站建设资源搜索器
  • 共创福州网站建设交友网站有哪些
  • 网站建设考核标准百度推广开户公司
  • 网站建设技术参数seo搜索优化服务
  • 中国黄页网址新手seo要学多久
  • wp如何做引擎网站长沙seo培训
  • 进货批发网站哪个好seo值怎么提高
  • 可以做淘宝客的网站专业的制作网站开发公司
  • 横泉水库建设管理局网站网络推广有哪些常见的推广方法
  • asp网站开发书籍核酸检测最新消息
  • 免费使用个人网站如何用百度平台营销
  • 一 一个甜品网站建设目标搜索引擎营销sem包括
  • 腾讯微校怎么做微网站上海seo网站排名优化公司
  • 睢宁网站建设网站推广内容
  • 做速卖通代码的网站上海网络推广需要多少
  • 重庆营销型网站建设价格短视频seo询盘获客系统软件
  • 做下载网站挣钱吗b站推广网站mmmnba