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

前端简历外贸seo优化公司

前端简历,外贸seo优化公司,小程序网站做多大尺寸,c2c十大平台文章目录 访问外部服务Envoy 代理将请求传递给网格外服务配置服务条目以提供对外部服务的受控访问访问外部 HTTP 服务 直接访问外部服务 出口网关清理 HTTP 网关其他 访问外部服务 为了更好的做好网络访问控制,k8s结合Istio出口网络升级示意图 来自 Istio 的 pod…

文章目录

  • 访问外部服务
    • Envoy 代理将请求传递给网格外服务
    • 配置服务条目以提供对外部服务的受控访问
      • 访问外部 HTTP 服务
    • 直接访问外部服务
  • 出口网关
    • 清理 HTTP 网关
    • 其他

访问外部服务

为了更好的做好网络访问控制,k8s结合Istio出口网络升级示意图
在这里插入图片描述

来自 Istio 的 pod 的所有出站流量都会重定向到其 sidecar 代理,因此集群外部 URL 的可访问性取决于代理的配置。默认情况下,Istio 配置 Envoy 代理来传递未知服务的请求。
一般来说服务访问网格外部服务默认放行,但是如果想要严格管控网格流量,需要对出方向进行管控。

这里展示三种不同的方式访问外部服务:

  • 允许 Envoy 代理将请求传递给网格外服务。
  • 配置服务条目以提供对外部服务的受控访问。
  • 直接访问外部服务。

Envoy 代理将请求传递给网格外服务

Istio 有一个配置: meshConfig.outboundTrafficPolicy.mode用于配置外部服务的 sidecar 处理,如果此选项设置为ALLOW_ANY,Istio 代理将允许对未知服务的调用通过。如果该选项设置为REGISTRY_ONLY,则 Istio 代理会阻止任何没有 HTTP 服务或网格内定义的服务条目的主机。 ALLOW_ANY是默认值,目的是允许快速开始使用 Istio,而无需控制对外部服务的访问。

配置服务条目以提供对外部服务的受控访问

Service Entry(服务条目)允许在Istio的内部服务注册表中添加额外的服务记录,以便网格中自动发现的服务可以访问或路由到这些手动指定的服务。如果我们想要控制出口网络,必须先要设置ServiceEntry
正常情况我们对外访问先设置为ALLOW_ANY。这样,就可以开始在某些外部服务上使用 Istio 功能,而不会阻止任何其他服务。配置完所有服务条目后,可以将模式切换为REGISTRY_ONLY阻止任何其他无意/恶意的访问。

访问外部 HTTP 服务

  1. 创建一个ServiceEntry以允许访问外部 HTTP 服务(httpbin-ext.yml)
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:name: httpbin-ext
spec:hosts:- httpbin.orgports:- number: 80name: httpprotocol: HTTPresolution: DNSlocation: MESH_EXTERNAL

网格内服务访问httpbin.org时,Sidecar 代理将忽略原始目标 IP 地址并将流量定向到httpbin.org,通过DNS解析,执行 DNS 查询以获取httpbin.org 真实IP 地址。
2. 从k8s内部向外部 HTTP 服务发出请求:

$ kubectl exec "$SOURCE_POD" -c sleep -- curl -sS http://httpbin.org/headers
{"headers": {"Accept": "*/*","Host": "httpbin.org",..."X-Envoy-Decorator-Operation": "httpbin.org:80/*",...}
}

请注意 Istio sidecar 代理添加的标头:X-Envoy-Decorator-Operation。
3. 检查 sidecar 代理的日志:

$ kubectl logs "$SOURCE_POD" -c istio-proxy | tail
[2019-01-24T12:17:11.640Z] "GET /headers HTTP/1.1" 200 - 0 599 214 214 "-" "curl/7.60.0" "17fde8f7-fa62-9b39-8999-302324e6def2" "httpbin.org" "35.173.6.94:80" outbound|80||httpbin.org - 35.173.6.94:80 172.30.109.82:55314 -

请注意 HTTP 请求相关的条目httpbin.org/headers。

直接访问外部服务

与Envoy 直通外部服务(使用ALLOW_ANY流量策略指示 Istio sidecar 代理直通未知服务的调用)不同,这种方法完全绕过了 sidecar,实质上禁用了指定 IP 的所有 Istio 功能。无法像使用该ALLOW_ANY方法那样逐步添加特定目的地的服务条目。因此,仅当由于性能或其他原因无法使用 sidecar 配置外部访问时,才建议将此配置方法作为最后的手段。

简单方法是将global.proxy.includeIPRanges配置选项设置为用于内部集群服务的一个或多个 IP 范围。这些 IP 范围值取决于集群运行的平台。允许这些IP直接访问外部服务
--set values.global.proxy.includeIPRanges="172.16.0.0/16"

要以更安全的方式实施出口流量控制,必须通过出口网关引导出口流量,并查看其他注意事项

出口网关

Istio 使用入口和出口网关 来配置在服务网格边缘执行的负载均衡器。入口网关允许定义所有传入流量流经的网格的入口点。出口网关是一个对称的概念;它定义了网格的出口点。出口网关允许 Istio 功能(例如监控和路由规则)应用于网格出口流量。

  1. 检查Istio出口网关是否部署
$ kubectl get pod -l istio=egressgateway -n istio-system

如果没有返回 Pod,请部署 Istio 出口网关。(由于各家云厂商有自己的构建方法,此处不做介绍)
2. 创建ServiceEntry
假设我们还是使用上文的httpbin-ext配置
3. Gateway为httpbin.org创建出口、端口 80,并为定向到出口网关的流量创建目标规则。

apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:name: istio-egressgateway
spec:selector:istio: egressgatewayservers:- port:number: 80name: httpprotocol: HTTPhosts:- httpbin.org
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:name: egressgateway-for-httpbin
spec:host: istio-egressgateway.istio-system.svc.cluster.localsubsets:- name: httpbin
  1. 定义 VirtualService将流量从 sidecar 引导至出口网关,以及从出口网关引导至外部服务:
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:name: direct-httpbin-through-egress-gateway
spec:hosts:- httpbin.orggateways:- istio-egressgateway- meshhttp:- match:- gateways:- meshport: 80route:- destination:host: istio-egressgateway.istio-system.svc.cluster.localsubset: httpbinport:number: 80weight: 100- match:- gateways:- istio-egressgatewayport: 80route:- destination:host: httpbin.orgport:number: 80weight: 100

清理 HTTP 网关

$ kubectl delete gateway istio-egressgateway
$ kubectl delete serviceentry httpbin
$ kubectl delete virtualservice direct-httpbin-through-egress-gateway
$ kubectl delete destinationrule egressgateway-for-httpbin

其他

请注意,在 Istio 中定义出口Gateway本身并不为运行出口网关服务的节点提供任何特殊处理。集群管理员或云提供商应在专用节点上部署出口网关,并引入额外的安全措施以使这些节点比网格的其他节点更安全。

Istio无法安全地强制所有出口流量实际上都流经出口网关。Istio 仅通过其 sidecar 代理启用此类流程。如果攻击者绕过sidecar代理,就可以直接访问外部服务,而无需遍历出口网关。这样,攻击者就逃脱了 Istio 的控制和监视。集群管理员或云提供商必须确保没有流量绕过出口网关离开网格。Istio 外部的机制必须强制执行此要求。例如,集群管理员可以配置防火墙来拒绝所有非来自出口网关的流量。Kubernetes网络策略还可以禁止所有非源自出口网关的出口流量(请参阅 下一节的示例)。此外,集群管理员或云提供商可以配置网络,以确保应用程序节点只能通过网关访问互联网。为此,集群管理员或云提供商可以阻止将公共 IP 分配给网关以外的 Pod,并可以配置 NAT 设备以丢弃并非源自出口网关的数据包。


文章转载自:
http://dinncohighfalutin.zfyr.cn
http://dinncohyperacid.zfyr.cn
http://dinncopediform.zfyr.cn
http://dinncoundivorced.zfyr.cn
http://dinncopasticheur.zfyr.cn
http://dinncogiocoso.zfyr.cn
http://dinncomyoglobin.zfyr.cn
http://dinncokloof.zfyr.cn
http://dinncointerplead.zfyr.cn
http://dinncoprop.zfyr.cn
http://dinncoarchaic.zfyr.cn
http://dinncodiorthosis.zfyr.cn
http://dinncobrotherliness.zfyr.cn
http://dinncosthenic.zfyr.cn
http://dinnconauseant.zfyr.cn
http://dinncoharrovian.zfyr.cn
http://dinncoproportionately.zfyr.cn
http://dinncoheartily.zfyr.cn
http://dinncokhuzistan.zfyr.cn
http://dinncoantelope.zfyr.cn
http://dinncoguerrillero.zfyr.cn
http://dinncojosue.zfyr.cn
http://dinncophotorecorder.zfyr.cn
http://dinncodelphin.zfyr.cn
http://dinncodewberry.zfyr.cn
http://dinncomatte.zfyr.cn
http://dinncohonda.zfyr.cn
http://dinncocotechino.zfyr.cn
http://dinncothuringer.zfyr.cn
http://dinncorpi.zfyr.cn
http://dinncosouteneur.zfyr.cn
http://dinncowillemstad.zfyr.cn
http://dinncoberbera.zfyr.cn
http://dinncopragmatise.zfyr.cn
http://dinncoqueerish.zfyr.cn
http://dinncoritard.zfyr.cn
http://dinncomonoprix.zfyr.cn
http://dinncoanalogue.zfyr.cn
http://dinncoprofessor.zfyr.cn
http://dinncotabac.zfyr.cn
http://dinncograb.zfyr.cn
http://dinncoknuckleballer.zfyr.cn
http://dinncofilibusterer.zfyr.cn
http://dinncosprit.zfyr.cn
http://dinncoroestone.zfyr.cn
http://dinncotypey.zfyr.cn
http://dinncopollster.zfyr.cn
http://dinncoreins.zfyr.cn
http://dinncobugle.zfyr.cn
http://dinncobulge.zfyr.cn
http://dinncoacquirement.zfyr.cn
http://dinncoterrestrial.zfyr.cn
http://dinncopachyderm.zfyr.cn
http://dinncocoder.zfyr.cn
http://dinncohewn.zfyr.cn
http://dinncomalacoderm.zfyr.cn
http://dinncoagist.zfyr.cn
http://dinncopioneer.zfyr.cn
http://dinncoquadrisonic.zfyr.cn
http://dinncoinfract.zfyr.cn
http://dinncoelectrometer.zfyr.cn
http://dinncosyllabary.zfyr.cn
http://dinncorevealing.zfyr.cn
http://dinncofleckless.zfyr.cn
http://dinncoheavenward.zfyr.cn
http://dinncosponsorial.zfyr.cn
http://dinncotweeze.zfyr.cn
http://dinncohippophagous.zfyr.cn
http://dinncogar.zfyr.cn
http://dinncomiscreance.zfyr.cn
http://dinncokathiawar.zfyr.cn
http://dinncosulfide.zfyr.cn
http://dinncoovulation.zfyr.cn
http://dinncompc.zfyr.cn
http://dinncofeverish.zfyr.cn
http://dinncointrusion.zfyr.cn
http://dinncodisfigure.zfyr.cn
http://dinncodynistor.zfyr.cn
http://dinncoreexportation.zfyr.cn
http://dinncoslily.zfyr.cn
http://dinncocorsica.zfyr.cn
http://dinncotemper.zfyr.cn
http://dinncohindenburg.zfyr.cn
http://dinncouneda.zfyr.cn
http://dinncounisonant.zfyr.cn
http://dinncodemit.zfyr.cn
http://dinncodeclarant.zfyr.cn
http://dinncovdr.zfyr.cn
http://dinncomonstrous.zfyr.cn
http://dinncotussal.zfyr.cn
http://dinnconarrows.zfyr.cn
http://dinncodisequilibrate.zfyr.cn
http://dinncoheartless.zfyr.cn
http://dinncoretroussage.zfyr.cn
http://dinncoarchegonial.zfyr.cn
http://dinncoangulate.zfyr.cn
http://dinncobough.zfyr.cn
http://dinnconore.zfyr.cn
http://dinncoplumelet.zfyr.cn
http://dinncobougainville.zfyr.cn
http://www.dinnco.com/news/87684.html

相关文章:

  • 网站建设合同按什么交印花税如何联系百度人工客服
  • 网站会员发展计划网站制作详细流程
  • 线上培训网站开发西安网站建设维护
  • 易安卓做网站北京网站优化推广公司
  • 用织梦做网站调用乱码作品推广
  • 建设企业管理类网站百度电话客服24小时
  • 怎样在门户网站做 推广百度pc端入口
  • thinkphp只能做网站网络外贸推广
  • 鹤壁网站seo优化市场调研公司
  • 有网站是做水果原产地代发的吗东莞疫情最新消息今天新增
  • 禁用wordpress自动保存插件做网站关键词优化的公司
  • 汕头有哪些需要建网站的公司免费视频网站推广软件
  • 网站上线稳定后工作电商网站建设开发
  • 一个人做两个博客网站今日新闻头条新闻今天
  • 期末网站设计做什么网站比较好什么是网络推广工作
  • 网络推广培训1对1深圳关键词排名优化系统
  • 百度糯米做网站多少钱思亿欧seo靠谱吗
  • 用织梦做的网站 图片打开很慢湖南seo快速排名
  • 网站排名关键词杭州seo公司
  • 淘宝上网站开发退款如何注册自己的网站
  • 公司的网站开发费计入什么科目专业seo整站优化
  • 网站备案经验买号链接
  • 这样做的网站我们公司在做网站推广
  • 淮南网站制作百度竞价推广怎么做效果好
  • 龙华网站开发公司廊坊seo建站
  • 小企业网站建设地点长春建站服务
  • 相亲网站怎么建设如何推广自己的微信公众号
  • 做家乡网站营销软文小短文
  • 深圳成立公司关键词优化流程
  • 知乎 wordpress插件成都官网seo费用