looking for some command to setup a https load balancer on google container engine

1/17/2017

This command

kubectl expose deployment hello-node --type="LoadBalancer"

Enables us to get a http link to the application, is there an easy way to make that load balancer https ?

I have looked at many documentations and everything just seems very complicated, could there be just some easy set of commands that will enable ssl on the container engine?

-- Japheth Odonya
google-kubernetes-engine
kubernetes

2 Answers

1/17/2017

You should look at the Ingress Resource for HTTPS Loadbalancing.

The service you are exposing is creating a OSI-Layer-3 TCP Loadbalancer that knows nothing about the Application Protocol where HTTPS lives. For that you need a Layer-7 Load Balancer and that's what Ingress is providing.

http://kubernetes.io/docs/user-guide/ingress/

You would specify your TLS Certificate as Key inside a secret and then point the Ingress Resource at that.

Also make sure the service you are pointing the Ingress to is of type NodePort otherwise the Ingress will not be working (I found out the hard way)

-- Tigraine
Source: StackOverflow

1/25/2017

As Tigraine mentions, an Ingress is indeed the way to go.

I recently ran into this: https://github.com/jetstack/kube-lego

I haven't tried it myself yet, but it looks like it should be able to help you with your ingress and https setup.

-- Christiaan
Source: StackOverflow