Comments (8)
Plan to do that as part of #11. This annotations haven't been around for too long. Should happen within the next week 👍
from kube-lego.
GCE should be supported as of release 0.1.0. Look at the examples
from kube-lego.
What is about a simplification of the kube-lego setup?
One proposal:
- Use a
NodePort
for thekube-lego
service. AFAIKports.type: NodePort
is already necessary of service ports receiving ingress traffic (atleast on GKE)? - Manually (or automatically?) patch a referenced ingress resource (via env) to redirect
/.well-known/acme-challenge
to thekube-lego
service.
I tried to change the configurations according to this, but the currently problem is, that kube-lego
seems to stop after:
time="2016-08-04T00:26:59Z" level=fatal msg="Error while process certificate requests: reachabily test failed for this cert" context=kubelego
It restarts after a while, but not fast enough for the GKE health-check to recognize the service as healthy. So the ingress controller does not send any traffic to the service. Whats about to keep kube-lego
up and running and always receiving traffic on /
or /healthz
?
from kube-lego.
Okay I've got it working with GKE as a proof of concept.
My steps:
kube-lego-deployment.yaml
: Add alivenessProbe
, so GKE can adopt this lifenessProbe for the health check for the backend-servicekube-lego-svc.yaml
: Setports.type: NodePort
kube-lego-configmap.yaml
: Customize to your needskubectl apply -f kube-lego-configmap.yaml -f kube-lego-deployment.yaml -f kube-lego-svc.yaml
- Change your ingress to redirect
/.well-known/acme-challenge/
to thekube-lego
service. DO NOT setannotations.kubernetes.io/tls-acme: "true"
in the ingress for now! (Reason: [1]) - Wait until the health check for
kube-lego
is HEALTHY (watch kubectl describe ing
) - Optional: Delete the ingress created by
kube-lego
(you wont need it, it will bind an additional IP)kubectl delete ingress kube-lego
- Test manually if everything is redirected to your endpoints, especially to
kube-lego
:curl -i http://example.com/.well-known/acme-challenge/_selftest
should be status 200. kubectl annotate ing your-ingress-name kubernetes.io/tls-acme="true"
- Inspect the logs of the
kube-lego
pod and the secrets, hopefully it installed the desired secret and the GKE LoadBalancer installed it for SSL.
My examples as a Gist: https://gist.github.com/MaxDaten/482f6bd71348b1502edc7348318bea17
[1] You should not set annotations.kubernetes.io/tls-acme: "true"
before health check for the backend-service is HEALTHY, because kube-lego
immediately starts with the selfcheck, but no traffic on /.well-known/acme-challenge
is redirected to it, as long the health check fails. This seems to result into a kind of deadlock.
from kube-lego.
@MaxDaten thanks for your input on that. First of all I am not too sure if you are aware that there is a simple setup based on using nginx-ingress on GKE/GCE like this is:
- Disable L7-Loadbalancing in GKE:
gcloud container clusters update <cluster-name> --update-addons HttpLoadBalancing=DISABLED
- Run nginx-ingress like described in the examples
I am using this for months without any issue.
For having GCE ingress support, we need to support differentiation between ingress-classes. I plan to implement that for this ticket. This will include a lot of your (steps).
I agree on the deadlock, the reason for that is that kube-lego is currently not disabling ingress resources if they fail a couple of times, this is probably not trivial to implement. (see #13)
from kube-lego.
First of all I am not too sure if you are aware that there is a simple setup based on using nginx-ingress on GKE/GCE like this is:
Yes I'm aware of it, but wasn't aware how to disable the L7-LB, thanks for the hint. But this has the downside (depends on your perspective) to manage the LB on your own and you have to pull it into your cluster, since the L7 resides now on the managed master. Currently I prefer the managed LB. because I'm the one man army here.
from kube-lego.
Thanks alot, I will definitely try it out!
from kube-lego.
Just stopping by to say thank you. I installed it, and it works like a charm =)
from kube-lego.
Related Issues (20)
- The tls-sni challenge has been disabled due to strong credibility of a vulnerability report HOT 4
- Adding heptio/contour support HOT 1
- Wildcard Certificate Support HOT 2
- Pull the complete certificate chain HOT 1
- Unsupported ingress class HOT 1
- renewal expiry date is incorrect HOT 1
- Support for Letsencrypt wildcard certificate HOT 1
- Let's Encrypt Wildcard Support HOT 9
- How safe is it to use Kube Lego in producation on v1.9+ of Kubernetes? HOT 2
- If one of the domains in an ingress fails reachability, kube-lego should not try to authorize any of the domains
- Pod kube-lego not starting HOT 4
- read udp i/o timeout HOT 4
- Does not seem to work on k8s 1.8.8-gke.0 HOT 6
- Failed to list *v1beta1.Ingress HOT 1
- creating new secret
- Auto-renewal of certificates is not being triggered in 0.1.6 HOT 2
- Memory Leak?
- kubernetes 1.10 on GCP cant create a GCE loadbalancer ingress without secret
- Add: kubernetes.io/tls-acme: 'true' annotation
- Archive the kube-lego repository
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kube-lego.