在kubernetes集群中配置SSL [英] configure SSL in cluster of kubernetes

查看:132
本文介绍了在kubernetes集群中配置SSL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在aws中都使用了两个链接kubernetes.

I have used both links kubernetes in aws.

1)

  • 通过此链接,我成功配置了Kubernetes Cluster
  • https://codeburst.io/getting-started-with-kubernetes-deploy-a-docker-container-with-kubernetes-in-5-minutes-eb4be0e96370

    • 通过上面的链接,我成功地将docker映像从ecr部署/拉到了群集

    但是问题是我需要通过HTTPS(ssl)协议运行应用程序

    But problem is that I need to run app through HTTPS(ssl) protocol

    我们在AWS ECR中有docker镜像.我们还有ssl的证书密钥文件和链文件.我们如何使用kubernetes对其进行配置?因此容器将在https中运行

    we have docker image in aws ECR.we also have certificate key file and chain file for ssl.how do we configure it with kubernetes? so container will run in https

    现在它像 http://www.example.com 一样运行.应该像 https://www.example.com

    right now it's running like http://www.example.com .It's should be like https://www.example.com

    过程就像

    1)在github中推送代码(完成)

    1) push code in github (Done)

    2)创建docker映像(完成)

    2) create docker image (Done)

    3)将Docker映像推送到AWS ECR(完成)

    3) push docker image to aws ECR (Done)

    4)从aws ecr提取图像并与kubernetes集群一起运行(完成)

    4) pull image from aws ecr and run with kubernetes cluster (Done)

    6)在80端口的http协议上工作(完成) http://www.example.com

    6) work on http protocol on 80 port (done) http://www.example.com

    7)将域绑定到群集端点(完成)

    7) bind domain to cluster end point(done)

    8)配置SSL(未完成) https://www.example.com

    8) configure SSL (Not done) https://www.example.com

    有人有建议吗?

    推荐答案

    要在kubernetes上运行应用程序或设置SSL和TLS,最佳做法建议使用cert-manager& ingress.

    To run the application or setup SSL and TLS on kubernetes best practices suggest to use cert-manager & ingress.

    Ingress充当网关,将服务公开给外界并管理连接.

    Ingress works as the gateway and expose the service to the outside world and manage the connection.

    cert-manager用于管理域的SSL证书.您可以按照本指南设置ingresscert-manager:

    While cert-manager use for manage the SSL certificates for domains. you can follow this guide to setup ingress and cert-manager:

    查看全文

    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆