container engine kubernetes and ssl

12/6/2015

How do I have a web app on HTTPS on google cloud container engine using HTTPS load balancing? I created SslCertificate resource. And, I created a kubernetes service that has port 443 externally open:

{
    "kind":"Service",
    "apiVersion":"v1",
    "metadata":{
        "name":"app",
        "labels":{
            "app":"app"
        }
    },
    "spec":{
        "ports": [
            {
                "port":443,
                "name":"app-server"
            }
        ],
        "selector":{
            "app":"app"
        },
        "type": "LoadBalancer"
    }
}

, but that's not enough, or right?

-- user2943928
google-compute-engine
kubernetes
ssl

1 Answer

12/7/2015

When you create a service externalized on Google's cloud with the "LoadBalancer" directive, it creates an L3 load balancer. You can also use the new ingress directive to create an L7 (e.g. HTTP) balancer, but that doesn't yet support SSL.

To enable SSL, you should follow the HTTP Load Balancing instructions but create an HTTPS service (with an SSL certificate) when configuring the cloud load balancer.

-- Robert Bailey
Source: StackOverflow