Bonjour,
Je possède un Managed k8s cluster chez OVH, avec Istio et Knative Serving. J'ai réussi à obtenir un certificat TLS pour me connecter via HTTPS à la main via buzut.net/certbot-challenge-dns-ovh-wildcard/ avec DNS-01. Voici les étapes :
étape 1 : récupéré dns_ovh_endpoint, dns_ovh_application_key, dns_ovh_application_secret et dns_ovh_consumer_key sur https://api.ovh.com/createToken/ dans un fichier ~/.ovhapi
étape 2 : sudo certbot certonly --dns-ovh --dns-ovh-credentials ~/.ovhapi -d "*.default.mydomain.fr
étape 3 : kubectl create --namespace istio-system secret tls istio-ingressgateway-certs \
--key /etc/letsencrypt/live/default.mydomain.fr/privkey.pem \
--cert /etc/letsencrypt/live/default.mydomain.fr/fullchain.pem
étape 4 : kubectl edit gateway knative-ingress-gateway --namespace knative-serving
- hosts:
- '*'
port:
name: https
number: 443
protocol: HTTPS
tls:
mode: SIMPLE
privateKey: /etc/istio/ingressgateway-certs/tls.key
serverCertificate: /etc/istio/ingressgateway-certs/tls.crt
Cependant je n'arrive pas à mettre en place la génération automatique des certificats via cert-manager ClusterIssuer toujours avec DNS-01, en suivant https://knative.dev/docs/serving/using-auto-tls/.
La première étape de ce tuto est de créer un ClusterIssuer, voici un exemple pour Google Cloud, cependant je n'arrive pas à l'adapter pour OVH :
apiVersion: cert-manager.io/v1alpha2
kind: ClusterIssuer
metadata:
name: letsencrypt-dns-issuer
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
# This will register an issuer with LetsEncrypt. Replace
# with your admin email address.
email: myemail@gmail.com
privateKeySecretRef:
# Set privateKeySecretRef to any unused secret name.
name: letsencrypt-dns-issuer
solvers:
- dns01:
clouddns:
# Set this to your GCP project-id
project: $PROJECT_ID
# Set this to the secret that we publish our service account key
# in the previous step.
serviceAccountSecretRef:
name: cloud-dns-key
key: key.json
Merci pour votre aide !
Dimitri