Cloud Native应用交付

  • 首页
  • 关于本站
  • 个人介绍
  • Downloads
  • Repo
    • Github
    • Container
  • F5
    • F5 Python SDK
    • F5-container
    • F5-LBaaS
  • 社交
    • 联系我
    • 微信/微博
    • 公众号
    • 打赏赞助
行至水穷处 坐看云起时
Cloud Native Application Services: cnadn.net
  1. 首页
  2. ServiceMesh
  3. 正文

Istio ingressgateway 静态TLS证书加载与SDS发现方式配置区别

2020年07月10日 9754点热度 1人点赞 0条评论

静态挂载模式

ingressgateway的deployment中默认将名为istio-ingressgateway-certs的secret mount到/etc/istio/ingressgateway-certs下 ,然后在gateway中指明对应的crt及key的文件路径

pod volume来源:

1
2
3
4
5
6
7
8
9
10
  - name: ingressgateway-certs
    secret:
      defaultMode: 420
      optional: true
      secretName: istio-ingressgateway-certs
  - name: ingressgateway-ca-certs
    secret:
      defaultMode: 420
      optional: true
      secretName: istio-ingressgateway-ca-certs

mount到目录:

1
2
3
4
5
6
    - mountPath: /etc/istio/ingressgateway-certs
      name: ingressgateway-certs
      readOnly: true
    - mountPath: /etc/istio/ingressgateway-ca-certs
      name: ingressgateway-ca-certs
      readOnly: true

gateway中指定:

1
2
3
4
    tls:
      mode: SIMPLE
      serverCertificate: /etc/istio/ingressgateway-certs/tls.crt
      privateKey: /etc/istio/ingressgateway-certs/tls.key

最终产生的envoy配置如下:

1
2
3
4
5
6
7
8
9
10
         "tlsCertificates": [
                                {
                                    "certificateChain": {
                                        "filename": "/etc/istio/ingressgateway-certs/tls.crt"
                                    },
                                    "privateKey": {
                                        "filename": "[redacted]"
                                    }
                                }
                            ],

 

动态SDS发现模式

此模式,采用sds从 “unix:/var/run/ingress_gateway/sds” 发现证书。具体做法为,创建一个secret,然后在gateway里直接指定secret名字即可,无需额外mount。

istio-system namespace下的secret:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
[root@k8s-master-v1-16 ~]# kubectl get secrets httpbin-credential -n istio-system  -o yaml
apiVersion: v1
data:
  cert: ***
  key: ****
kind: Secret
metadata:
  creationTimestamp: "2020-07-10T14:40:26Z"
  name: httpbin-credential
  namespace: istio-system
  resourceVersion: "32803482"
  selfLink: /api/v1/namespaces/istio-system/secrets/httpbin-credential
  uid: bc543747-7366-4661-9f2e-39ae62e7808a
type: Opaque

 

gateway里指定credentialName为对应的secret

1
2
3
      tls:
        credentialName: httpbin-credential
        mode: SIMPLE

envoy产生的配置:

1
2
3
4
5
6
7
8
9
10
11
12
13
                        "commonTlsContext": {
                            "tlsCertificateSdsSecretConfigs": [
                                {
                                    "name": "httpbin-credential",
                                    "sdsConfig": {
                                        "apiConfigSource": {
                                            "apiType": "GRPC",
                                            "grpcServices": [
                                                {
                                                    "googleGrpc": {
                                                        "targetUri": "unix:/var/run/ingress_gateway/sds",
                                                        "statPrefix": "sdsstat"
                                                    }

 

相关文章

  • Istio里Gateway的port定义与实际ingressgateway的listener端口关系及规则
  • 应用交付老兵眼中的Envoy, 云原生时代下的思考
  • Istio sidecar iptables以及流量控制分析
  • Istio 熔断策略及envoy配置
  • Istio超时与延迟注入策略的envoy配置
本作品采用 知识共享署名-非商业性使用 4.0 国际许可协议 进行许可
标签: istio sds tls
最后更新:2020年07月10日

纳米

linjing.io

打赏 点赞
< 上一篇

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理。

页面AI聊天助手
文章目录
  • 静态挂载模式
  • 动态SDS发现模式

纳米

linjing.io

☁️迈向Cloud Native ADC ☁️

认证获得:
TOGAF: ID 152743
Kubernetes: CKA #664
Microsoft: MCSE MCDBA
Cisco: CCNP
Juniper: JNCIS
F5:
F5 Certified Solution Expert, Security
F5 Certified Technology Specialist, LTM/GTM/APM/ASM
F5 Certified BIG-IP Administrator
  • 点击查看本博技术要素列表
  • 归档
    分类
    • AI
    • Automation
    • Avi Networks
    • Cisco ACI
    • CISCO资源
    • F5 with ELK
    • F5-Tech tips
    • F5技术
    • Juniper
    • Linux
    • NGINX
    • SDN
    • ServiceMesh
    • WEB编程
    • WINDOWS相关
    • 业界文章
    • 交换机技术
    • 化云为雨/Openstack
    • 协议原理
    • 容器/k8s
    • 我的工作
    • 我的生活
    • 网站技术
    • 路由器技术
    • 项目案例
    标签聚合
    docker neutron network DNS irule istio k8s F5 envoy api flannel nginx openstack bigip gtm
    最近评论
    汤姆 发布于 9 个月前(09月10日) 嗨,楼主,里面的json怎么下载啊,怎么收费啊?
    汤姆 发布于 9 个月前(09月09日) 大佬,kib的页面可以分享下吗?谢谢
    zhangsha 发布于 1 年前(05月12日) 资料发给我下,谢谢纳米同志!!!!lyx895@qq.com
    李成才 发布于 1 年前(01月02日) 麻烦了,谢谢大佬
    纳米 发布于 1 年前(01月02日) 你好。是的,因为以前下载系统插件在一次升级后将所有的下载生成信息全弄丢了。所以不少文件无法下载。DN...
    浏览次数
    • Downloads - 184,603 views
    • 联系我 - 118,966 views
    • 迄今为止最全最深入的BIGIP-DNS/GTM原理及培训资料 - 117,961 views
    • Github - 104,600 views
    • F5常见log日志解释 - 80,103 views
    • 从传统ADC迈向CLOUD NATIVE ADC - 下载 - 76,057 views
    • Sniffer Pro 4 70 530抓包软件 中文版+视频教程 - 74,320 views
    • 迄今为止最全最深入的BIGIP-DNS/GTM原理及培训资料 - 67,770 views
    • 关于本站 - 61,446 views
    • 这篇文档您是否感兴趣 - 55,762 views
    链接表
    • F5SE创新
    • Jimmy Song‘s Blog
    • SDNlab
    • Service Mesh社区
    • 三斗室
    • 个人profile
    • 云原生社区

    COPYRIGHT © 2023 Cloud Native 应用交付. ALL RIGHTS RESERVED.

    Theme Kratos Made By Seaton Jiang

    京ICP备14048088号-1

    京公网安备 11010502041506号