如何在Kubernetes中配置信任库

时间:2019-06-15 16:06:55

标签: ssl https kubernetes kubernetes-ingress truststore

我是kubernetes的新手,想配置一个将某些请求重定向到端口443上的kubernetes https服务的入口,但是由于未配置服务ca证书/信任库,因此请求失败。

请帮助我了解如何在kubernetes中配置信任库/服务证书

以下是我现有的入口配置。

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  annotations:
    field.cattle.io/publicEndpoints: '[{"addresses":[""],"port":80,"protocol":"HTTP","serviceName":"sec:my-gui","ingressName":"sec:my-gui-ingress","hostname":"my.gui.com","path":"/","allNodes":false}]'
    nginx.ingress.kubernetes.io/backend-protocol: HTTPS
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
    nginx.ingress.kubernetes.io/secure-backends: "true"
  creationTimestamp: 2019-06-12T09:43:31Z
  generation: 5
  labels:
    app: my-gui
  name: my-gui
  namespace: sec
  resourceVersion: "65677399"
  selfLink: /apis/extensions/v1beta1/namespaces/sec/ingresses/my-gui
  uid: 8a1bbed6-8cf6-11e9-bcc5-005056b0f192
spec:
  rules:
  - host: my.gui.com
    http:
      paths:
      - path: /business
        backend:
          serviceName: my-backend
          servicePort: 443
  tls:
  - hosts:
    - my.gui.com
    secretName: my-cert
status:
  loadBalancer:
    ingress:
    - {}

0 个答案:

没有答案