Apache Kafka with Istio on K8sSebastian Toader & Zsolt Varga 2021-Feb-26 Apache Kafka with Istio on K8s 2 • Scalability • Resiliency • Security • Observability • Disaster recovery Production grade Apache Kafka on Kubernetes certificate attached automatically by Istio Proxy sidecar container • Client certificate includes the K8s service account of the Kafka client application • SPIFE:///ns/ /sa/ 8 Security layer provided by Istio 9 • Kafka does not process client certificate in PLAINTEXT mode 0 码力 | 14 页 | 875.99 KB | 1 年前3
Istio at Scale: How eBay is building a massive Multitenant Service Mesh using IstioApplication Deployment: Cloud Layout ● Multiple K8s Clusters in an AZ ○ Each K8s cluster ~ 200 - 5,000 nodes ○ Upto 100,000 Pods in a cluster ○ 10,000+ K8s services - including prod, pre-prod, staging worst-case scenario Region R1 AZ 1 AZ 2 AZ n Data Center DC1 K8s Cluster K8s Cluster K8s Cluster K8s Cluster K8s Cluster K8s Cluster Region Rn #IstioCon Application Specs Region services - Global IPAM, Access-control Policy store, etc. ● AZ Control Plane ○ Syncs specs to workload K8s clusters in the AZ ○ Shared-Nothing Architecture ■ Hosts services catering to the AZ, e.g., AZ0 码力 | 22 页 | 505.96 KB | 1 年前3
Istio audit report - ADA Logics - 2023-01-30 - v1.0with a sound code base, well-established security practices and a responsive product security team. 8 Istio Security Audit, 2023 Fuzzing The second goal of the audit was to assess and improve the fuzz 3 FuzzReadCACert istio.io/istio/security/pkg/ k8s/chiron https://github.com/istio/istio/blob/6 5478ea81272c0ceaab568974aff7 00aef907312/security/pkg/k8s/chir on/fuzz_test.go#L22 4 FuzzIstioCASign istio the IstioCAServiceServer which is created in https://github.com/istio/istio/blob/346260e5115e9fbc65ba8a559bc686e6ca046a32/securi ty/pkg/server/ca/server.go#L136: 13 Istio Security Audit, 2023 Authentication0 码力 | 55 页 | 703.94 KB | 1 年前3
Istio Security Assessmenthardened version that describes each of the security controls in more detail. See Appendix B on page 40. 8 | Google Istio Security Assessment Google / NCC Group Confidential Finding Lack of VirtualService Gateway following command and observe that a normal HTML page is returned curl -v "http://$GATEWAY/productpage" 8. Use an administrative account to run the following commands kubectl -n test delete virtualservices total 380 32 @ 0x4374a0 0x405f77 0x405c3b 0x135de04 0x4674a1 # 0x135de03 k8s.io/client- go/tools/cache.(*controller).Run.func1+0x33 k8s.io/client- go@v0.18.0/tools/cache/controller.go:124 32 @ 0x4374a0 0x4476630 码力 | 51 页 | 849.66 KB | 1 年前3
Envoy原理介绍及线上问题踩坑Envoy流量拦截原理、常用部署方式 3. Envoy可扩展过滤器架构、可观测性 4. Envoy线程模型 5. 生产环境问题分析及解决方法 6. 针对Envoy做的一些优化及效果 7. 常用性能分析测试工具及使用方法 8. 华为ASM产品介绍 Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 4 前言 • 微服务架构最早由Fred 的请求。 • 请求进入本地服务器内进行处理并返回响应。 Copyright © Huawei Technologies Co., Ltd. All rights reserved. Page 8 Envoy原理及总体架构-流量拦截 prerouting input output postrouting Istio_inbound Istio_in_redirect Istio_output 路 由 上 游 连 接 池 12.localhost app2 15.lo 1 2 3.非本 POD、 非 Envoy 自身 4.DNAT 5 6 7. UID=1337 8 9 10.跳 过普 通端 口 11.DNAT 1 3 14.lo 网络发送 • outbound方向:本POD内发起对外调用流量 • outbound方向增加ISTIO_OUTPUT、 ISTIO_REDIRECT链。0 码力 | 30 页 | 2.67 MB | 1 年前3
Is Your Virtual Machine Really Ready-to-go with Istio?External IPs #IstioCon V1.1 ServiceEntry #IstioCon V1.6-1.8 Better VM Workload Abstraction A K8s Service and Pods Two separate object with distinct lifecycles Before Workload Entry, a single Istio WorkloadEntry Component Deployment WorkloadGroup Service registry and discovery Service ServiceEntry K8s Pods labels: app: foo class: pod ServiceEntry selector: app: foo Istio Workload Entries labels: using service account ○ work with an Istio ServiceEntry ● Workload Group ○ a collection of non-K8s workloads ○ metadata and identity for bootstrap ○ mimic the sidecar proxy injection ○ automate VM0 码力 | 50 页 | 2.19 MB | 1 年前3
Service mesh security best practices: from implementation to verification Prevention Certificate Authority K8s Network Policy K8s RBAC Audit Logging Image Verification Admission Control Workload Identity K8s RBAC K8s CNI AuthZ Policy Peer AuthN Policy access control Service 2 Service 1 1. Ensure traffic is natively encrypted, such as HTTPS 3. use k8s network policies to limit traffic bypassing sidecars Cluster security best practices: safely handle & authz policies Namespace bar 2. Enforce k8s RBAC policies: roles bound to namespace, only mesh admins are allowed to have ClusterRole. 1. Use k8s network policies to limit the traffic in & out0 码力 | 29 页 | 1.77 MB | 1 年前3
Istio 在 Free Wheel 微服务中的实践自动维护mTLS密钥 • Mixer: 在k8s中部署了两组Mixer • Policy提供授权、Quota等能力 • Telemetry提供监控数据收集能力 基本原理 • Istio从架构上可以分为4个板块: • Istio Proxy: Mesh的基础 • 网络安全:兼容Spiffe标准实现 • 配置管理:为C++实现的Proxy接 入k8s的动态配置管理 • Attribute 情: • Sidecar Injection: 注入initContainer, Sidecar, istio-certs volume • Citadel: 自动刷新secrets, k8s自动加 载istio-secrets volume • Pilot: 和Sidecar建立连接,管理动态配 置 • Mixer: 和Sidecar建立连接,管理授权 、Quota和审计数据 FreeWheel的Istio实践 • 通过在Sidecar中增加FreeWheel自定义认证支持,下游可以充分利用 Istio提供的授权、限流、监控接口,不过要注意Sidecar也有一些小坑 : • Sidecar没有k8s自动注入的secret,也无法通过容器内环境变量自 动建立master连接,需要管理额外的kubeconfig • Sidecar内的服务流量默认是不被劫持的,如果需要劫持需要添加额 外的annotation0 码力 | 31 页 | 4.21 MB | 1 年前3
SolarMesh 基于Istio构建的流量监管平台© 2021 Cloud To Go 为什么我们需要服务网格 - 业务上k8s带来的问题 Ø 集群内的情况不可见 Ø 环境不统一,很难复现问题 Ø 集群中的网络限制 Ø ... Ø 学习k8s成高 Ø 测试方法发生了改变 Ø 有些问题只能在集群内出 现,难以测试 Ø ... 测试难 运维难 Ø 学习k8s成高 Ø 缺少好用的工具 Ø ... 排错难 Copyright © © 2021 Cloud To Go 为什么我们需要服务网格 - 微服务+k8s Kubernetes上 应用的网络问题 困扰开发、测试、运维最突出的问题: Copyright © 2021 Cloud To Go 为什么我们需要服务网格 - 服务网格带来了什么 服务网格是一个云原生的网络基础设施,它把微服务调度中有关网络的公共能力下沉,在无任何代码侵入的 情况下提供可观察性、流量管理和安全性等能力。 © 2021 Cloud To Go SolarMesh的架构设计 Copyright © 2021 Cloud To Go SolarMesh的架构设计 负载均衡 服务发现 弹性伸缩 k8s 应用 自我修复 基础设施 | VM/DOCKER 熔断限流 流量观测 超时重试 服务网格 流量安全 SolarMesh Copyright © 2021 Cloud To Go0 码力 | 20 页 | 1.29 MB | 1 年前3
Istio控制平面组件原理解析ü抢救机制触发 ü抢救令牌减少一个(总共10个) ü在2(n-1) * 200毫秒后执行(为什么不立即执行) ü失败再次触发抢救机制 ü10个令牌用完,没有抢救成功,放弃退出优雅关闭envoy ü K8s发送SIGTERM信号让容器优雅关闭 ü Pilot-Agent接收信号通过context关闭子服务,发送SIGKILL关闭envoy ü Envoy不支持优雅关闭,需要通过金丝雀或蓝绿部署方式实现 和Google强强联手 官方博客:The universal data plane API缓存Istio和k8s配置 ü一个小型的非持久性key/value数据库 ü借助k8s.io/client-go建立缓存 ü缓存Istio:route-rule,virtual-service,gateway等 ü缓存k8s:node,Service,Endpoints等触发配置生效方式 V2通过GRPC双向流,主动推送配置给envoy: "3a7a649f-4eeb-4d70-972c-ad2d43a680af", • "172.00.00.000","Thu, 05 Jul 2018 08:12:19 GMT","780", • "bc1f172f-b8e3-4ec0-a070-f2f6de38a24f","718"]转换成属性词汇异步Flush到Adapter ü通过Template润色数据 ü使用Go的协程异步Flush到Adapter üAdapter展示数据0 码力 | 30 页 | 9.28 MB | 6 月前3
共 31 条
- 1
- 2
- 3
- 4













