Skip to content

Add support for K8S Ingress resources #3

Open

Description

@kop

Since Kubernetes release 1.2.0, Ingress resources are supporting TLS. It would be great if this image would be compatible with Ingress.

What needs to be done is to change secret data format to:

"data": {
   "tls.crt": "$CERT",
   "tls.key": "$KEY",
   "dhparam": "$DHPARAM"
 }

And response with 200 HTTP code when root URI (/) is requested (for health checks).

P.S. I will be happy to prepare a PR later today.

Activity

  1. alexcouper commented on Apr 29, 2016

    @alexcouper
    Member
  2. kop commented on Apr 29, 2016

    @kop
    Author

    @alexcouper Something tells me that it depends on implementation. There are different types of ingress controllers available: GCE, Nginx.

    I think config reloading on certificate change should be part of their job and not this package.

    Alternatively, we could create new secret (in format $SECRET_NAME_<timestamp>) when certs are updated and simply patch Ingress resource with a new value. Old secrets should not be a problem, since K8S 1.3 will come with garbage collector of unused Secrets and ConfigMaps.

  3. alexcouper commented on Apr 29, 2016

    @alexcouper
    Member

    true that would work.

    The other thing that had concerned me was not knowing how to route through to letsencrypt pod for some requests (like is done in nginx-ssl-proxy) - but I see now that this is entirely possible using the nginx ingress controller

    So in summary, go for it, looking forward to seeing the PR!

  4. devth commented on Jun 1, 2016

    @devth
    Contributor

    👍 this would be awesome!

  5. phutchins commented on Jul 8, 2016

    @phutchins

    I've was planning on building something quite similar to this so I used this is a starting point.
    Here's what I added/changed...

    • Made the changes to get it working with multiple domains and Ingress.
    • Added a health check on / so that it returns 200 OK.
    • Updated the kubectl version to be in line with docker best practice and make updating easier.
    • I made the secret unique per domain and made it customizable

    I'd be glad to contribute back some of what I've done if interested...

    My plans are to make this more dynamic such that on a service that you want to have SSL, simply add a label and it will dynamically get picked up and handled.

    https://github.com/phutchins/kubernetes-ssl-manager

  6. alexcouper commented on Jul 11, 2016

    @alexcouper
    Member

    @phutchins sounds fantastic. Please do contribute back and I'll happily test and merge.

  7. txels commented on Oct 13, 2016

    @txels
    Member

    Part of this has been done in #13 (including the new data keys in the secret)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions