kube-lego
by Helm
A Helm chart for kube-Lego (Automatic Signed Certificates for Ingress Services)
About this chart
Kube Lego
A Helm chart for kube-Lego that provides automatic signed certificates for Ingress resources in the deployed namespace.
Based on kube-lego by Jetstack.
Table of Contents
- Quick start
- Introduction
- Prerequisites
- Specific
- Installing the Chart
- Uninstalling the Chart
- Configuration
Quick start
$ helm repo rm cloudposse-incubator 2>/dev/null
$ helm repo add cloudposse-incubator https://charts.cloudposse.com/incubator
$ helm install --namespace=kube-system --name kube-lego --set lego.prod=false,[email protected] incubator/kube-lego
Introduction
This chart installs kube-lego on a Kubernetes cluster using the Helm package manager. It handles the exchange between the Let's Encrypt API to generate signed SSL certificaes which get stored in Kubernetes secrets.
IMPORTANT Before you begin, we recommend you become familiar with the HARD rate limits here: https://letsencrypt.org/docs/rate-limits/
Do not generate prod certificates for testing or you'll probably get rate limited! You've been warned.
Prerequisites
- Kubernetes 1.4+ with Beta APIs enabled
Specific
IMPORTANT:
You should only deploy one kube-lego chart per cluster, therefore we recommend you choose the kube-system namespace.
Installing the Chart
Add the charts repo
$ helm repo rm cloudposse-incubator 2>/dev/null
$ helm repo add cloudposse-incubator https://charts.cloudposse.com/incubator
We recommend that you use the kube-system namespace, since there should only be one install per cluster.
To install the chart:
$ helm install --namespace=kube-system --name=kube-lego incubator/kube-lego
We recommend to use kube-lego as the release name.
The command deploys kube-lego on the Kubernetes cluster with the default configuration. The configuration section lists the parameters that can be configured during installation.
Tip: List all releases using
helm list
Uninstalling the Chart
To uninstall/delete the kube-lego deployment:
$ helm delete --purge kube-lego
The command removes all the Kubernetes components associated with the chart and deletes the release.
Configuration
The following tables lists the configurable parameters of the kube-lego chart and their default values.
| Parameter | Description | Default |
|---|---|---|
image.repository | kube-lego image repository | jetstack/kube-lego |
image.tag | kube-lego image tag | 0.1.3 |
image.pullPolicy | kube-lego image pull policy | IfNotPresent |
lego.email | Email to associate with requests to Let's Encrypt | REQUIRED TO BE SPECIFIED |
lego.prod | Whether or not to generate signed certificates | false |
The above parameters map to the env variables defined in cloudposse/kube-lego. For more information please refer to the cloudposse/kube-lego image and application documentation.
Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,
$ helm install \
--namespace kube-system
--name kube-lego \
--set lego.prod=false,[email protected] \
incubator/kube-lego
The above command sets the lego.prod mode to false and the lego.email to [email protected].
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,
$ helm install \
--namespace kube-system \
--name kube-lego \
-f values.yaml \
incubator/kube-lego
Tip: You can use the default values.yaml as template to get you started.
Deploy kube-lego with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has kube-lego on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartkube-lego is pinned at v0.1.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply