Configure TLS/SSL for Kubernetes Services using Cert-Manager, NGINX Ingress and Let’s Encrypt

8/20/2018

I apologize in advance for my english.

So, I need to configure a secure connection to my services in Ingress. DNS name (sh220.westeurope.cloudapp.azure.com) registered on virtual machine Azure. Guided by: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/portal-create-fqdn

But...

..."solver configuration for domain "sh220.westeurope.cloudapp.azure.com" not found. Ensure you have configured a challenge mechanism using the certificate.spec.acme.config field"...

What is "a challenge mechanism"? What am I doing wrong?

kubectl describe certificate events:

Events:
Type    Reason       Age              From          Message
----    ------       ----             ----          -------
Normal  CreateOrder  3s (x5 over 1h)  cert-manager  Created new ACME order, attempting validation...

Certificate

apiVersion: certmanager.k8s.io/v1alpha1
kind: Certificate
metadata:
  name: mysh220-cert
  namespace: default
spec:
  secretName: mysh220-cert-tls
  issuerRef:
    name: letsencrypt-staging
  commonName: sh220.westeurope.cloudapp.azure.com
  dnsNames:
  - sh220.westeurope.cloudapp.azure.com
  acme:
    config:
    - http01:
        ingress: sh220-ingress
      domains:
      - westeurope.cloudapp.azure.com

In Ingress spec:

host: sh220.westeurope.cloudapp.azure.com
tls:
  - secretName: mysh220-cert-tls
    hosts: 
      - sh220.westeurope.cloudapp.azure.com

cert-manager-v0.4.1

Thanks for any help.

-- Alexey
azure
kubernetes
kubernetes-ingress
ssl-certificate

1 Answer

8/20/2018

The solution to my problem was simple: https://docs.microsoft.com/en-us/azure/aks/ingress

-- Alexey
Source: StackOverflow