Pros and cons of configuring SSL certificate in webserver vs Kubernetes Ingress/OpenShit route...

Discussão em 'StackOverflow' iniciado por Stack, Janeiro 11, 2021.

  1. Stack

    Stack Membro Participativo

    Assume I have a Python application/JBoss application. I can setup my SSL certificate at server level

    For instance in Python 3 using SimpleHTTPServer:

    def main():
    key_file = "/etc/letsencrypt/live/mydomain.fr/privkey.pem"
    cert_file = "/etc/letsencrypt/live/mydomain.fr/fullchain.pem"
    port = 9443
    httpd = HTTPServer(('0.0.0.0', port), SimpleHTTPRequestHandler)

    httpd.socket = ssl.wrap_socket(httpd.socket,
    keyfile=key_file,
    certfile=cert_file, server_side=True)

    httpd.serve_forever()


    However if our Webapp is deployed in Kubernetes or OpenShift: We can keep our application in HTTP and use Kubernetes ingress (spec.tls) or OpenShift route (spec.tls) to expose the app in HTTPs and route to a service and then a pod in HTTP.

    What would be the pros and cons of the 2 solutions?

    Can I consider traffic is encrypted inside the cluster (like pod to pod) when using Kubernetes services IP/pods IPs though we are in HTTP?

    Continue reading...

Compartilhe esta Página