cert-manager-webhook-ionos-cloud

by jsaenz-ionos

Helm chartv0.3.4App v1.0.5Verified publisher

A Helm chart for Kubernetes

About this chart

IONOS Cloud DNS Webhook for cert-manager

This webhook allows you to utilize IONOS Cloud as a DNS provider for performing DNS-01 challenges when using cert-manager.

Overview

Cert-manager is a powerful Kubernetes add-on that automates the management and issuance of TLS certificates from various issuing sources. The IONOS Cloud Webhook extends cert-manager's capabilities to manage DNS challenges using IONOS Cloud's DNS services.

Usage

  1. Install the webhook server

    helm repo add cert-manager-webhook-ionos-cloud https://ionos-cloud.github.io/cert-manager-webhook-ionos-cloud
    helm upgrade cert-manager-webhook-ionos-cloud \
    --namespace cert-manager \
    --install cert-manager-webhook-ionos-cloud/cert-manager-webhook-ionos-cloud
    

    Note that you can set custom environment variables if needed. For example, proxy configuration for restricted environments:

    # values.yaml
    env:
      - name: HTTP_PROXY
        value: "http://proxy.company.com:8080"
      - name: HTTPS_PROXY
        value: "http://proxy.company.com:8080"
      - name: NO_PROXY
        value: "localhost,127.0.0.1,.local,.cluster.local"
    
  2. Create IONOS Cloud Authentication Token Secret: See IONOS Cloud Token management for how to get a token.

    kubectl create secret generic cert-manager-webhook-ionos-cloud \
      --namespace=cert-manager \
      --from-literal=auth-token=<IONOS CLOUD AUTH TOKEN>
    
  3. Configuration of ClusterIssuer/Issuer:

The first step of using cert-manager is creating an Issuer or ClusterIssuer.


apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
  name: letsencrypt-prod
spec:
  acme:
    server: https://acme-v02.api.letsencrypt.org/directory
    email: [email protected] # Replace this with your email address
    privateKeySecretRef:
      name: letsencrypt-prod
    solvers:
    - dns01:
        webhook:
          solverName: ionos-cloud
          groupName: acme.ionos.com
          config:
            #optional, defaults to cert-manager-webhook-ionos-cloud
            secretRef: cert-manager-webhook-ionos-cloud
            #optional, defaults to auth-token
            authTokenSecretKey: auth-token

Important:

  • Before engaging into DNS-01, cert-manager does a DNS pre-check (SOA and NS records). Depending on your environment, you may see a failure in the cert-manager logs with the following message: error When querying the SOA record for the domain.... To fix the issue, you need to add the following arguments to the cert-manager: --dns01-recursive-nameservers-only, --dns01-recursive-nameservers=8.8.8.8:53,1.1.1.1:53. For more details, check out the official documentation: https://cert-manager.io/docs/configuration/acme/dns01/#setting-nameservers-for-dns01-self-check
  • image.tag defaults to an empty string on purpose. The chart uses appVersion as default image tag when available (set during release packaging via helm package --app-version ...).
  • If you install from source/unpackaged chart (no appVersion), set image.tag explicitly. To force your explicit tag even when appVersion exists, set image.override=true.

Parameters

NameDescriptionValue
certManager.namespacethe namespace where cert-manager is deployedcert-manager
certManager.serviceAccountNamethe name of the cert-manager service accountcert-manager
image.tagexplicit container image tag; defaults to chart appVersion when available""
image.repositorythe docker image repositoryghcr.io/ionos-cloud/cert-manager-webhook-ionos-cloud
image.pullPolicyThe image pull policy to be used for the container imageIfNotPresent
image.overridedisable appVersion default and force the explicit image.tag valuefalse
resources.limits.cpuThe cpu limit for the container
resources.limits.memoryThe memory limit for the container
resources.requests.cpuThe requested cpu for the container
resources.requests.memoryThe requested memory for the container
nodeSelectorThe node selector for the pod{}
tolerationsTolerations for the pod assignment{}
affinityAffinity for the pod{}
podSecurityContextSecurity context for the pod (e.g. runAsNonRoot, seccompProfile){}
securityContextSecurity context for the container (e.g. allowPrivilegeEscalation, capabilities){}
service.portThe port exposed by the service443
service.typeThe type of the service that exposes the podClusterIP

Deploy cert-manager-webhook-ionos-cloud with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has cert-manager-webhook-ionos-cloud 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartcert-manager-webhook-ionos-cloud is pinned at v0.3.4 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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