首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >tls主机的k8s入口倍数

tls主机的k8s入口倍数
EN

Stack Overflow用户
提问于 2018-11-06 13:46:29
回答 1查看 6.8K关注 0票数 4

我试图在gke上配置一个入口,以便在两个不同的主机上提供两个不同的ssl证书。

我的SSl证书是作为机密存储的,我的k8s版本是1.10.9-gke.0 (我目前正在尝试升级到1.11,看看是否有任何改变)。

这是我的入口配置:

代码语言:javascript
复制
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    ingress.kubernetes.io/backends: '{"k8s-be-30086--b1574396a1d7162f":"HEALTHY","k8s-be-31114--b1574396a1d7162f":"HEALTHY"}'
    ingress.kubernetes.io/forwarding-rule: k8s-fw-default-si-preproduction-ingress--b1574396a1d7162f
    ingress.kubernetes.io/https-forwarding-rule: k8s-fws-default-si-preproduction-ingress--b1574396a1d7162f
    ingress.kubernetes.io/https-target-proxy: k8s-tps-default-si-preproduction-ingress--b1574396a1d7162f
    ingress.kubernetes.io/ssl-cert: k8s-ssl-default-si-preproduction-ingress--b1574396a1d7162f
    ingress.kubernetes.io/static-ip: k8s-fw-default-si-preproduction-ingress--b1574396a1d7162f
    ingress.kubernetes.io/target-proxy: k8s-tp-default-si-preproduction-ingress--b1574396a1d7162f
    ingress.kubernetes.io/url-map: k8s-um-default-si-preproduction-ingress--b1574396a1d7162f
  creationTimestamp: 2018-10-26T09:45:46Z
  generation: 9
  name: si-preproduction-ingress
  namespace: default
  resourceVersion: "1846219"
  selfLink: /apis/extensions/v1beta1/namespaces/default/ingresses/si-preproduction-ingress
  uid: e9bba9ad-d903-11e8-872e-42010a840feb
spec:
  tls:
  - hosts:
    - domain_1
    secretName: cert_1
  - hosts:
    - domain_2
    secretName: cert_2
  rules:
  - host: domain_1
    http:
      paths:
      - backend:
          serviceName: si-preproduction-service
          servicePort: 80
        path: /*
  - host: domain_2
    http:
      paths:
      - backend:
          serviceName: si-preproduction-service
          servicePort: 80
        path: /*
status:
  loadBalancer:
    ingress:
    - ip: our_ip

我的cert_1在domain_1上是正确的,但是它也是在domain_2 (而不是cert_2)上服务的,因此没有保护我的连接是应该的。

我还将在github 这里上发表一篇文章。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-11-07 17:14:48

升级到k8s 1.11+解决了这个问题。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53173211

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档