DNS01 챌린지 공급자 구성
이 페이지에서는 Issuer 리소스의 DNS01 챌린지 솔버 설정에서 사용할 수 있는 다양한 옵션을 다룬답니다. DNS01 공급자 구성은 설정 문서의 예시처럼 Issuer 리소스에 지정해야 해요.
출처: 문서
본문
DNS01 챌린지 공급자 구성
이 페이지에는 Issuer 리소스의 DNS01 챌린지 솔버 구성에서 사용할 수 있는 다양한 옵션에 대한 세부 내용이 들어 있습니다.
ACME Issuer 구성과 API 형식에 대한 자세한 내용은 ACME Issuers 문서를 참고하세요.
DNS01 공급자 구성은 설정 문서의 예시와 유사하게 Issuer 리소스에 지정해야 합니다.
DNS01 챌린지 방식이 어떻게 동작하는지에 대한 내용은 Let's Encrypt 챌린지 유형 페이지에서 확인할 수 있습니다.
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: example-issuer
spec:
acme:
email: user@example.com
server: https://acme-staging-v02.api.letsencrypt.org/directory
privateKeySecretRef:
name: example-issuer-account-key
solvers:
- dns01:
cloudDNS:
project: my-project
serviceAccountSecretRef:
name: prod-clouddns-svc-acct-secret
key: service-account.json
각 Issuer는 서로 다른 여러 DNS01 챌린지 공급자를 지정할 수 있으며, 하나의 Issuer에 동일한 DNS 공급자의 여러 인스턴스를 두는 것도 가능합니다 (예: 각각 고유한 이름을 가진 두 개의 CloudDNS 계정을 설정할 수 있음).
단일 Issuer에서 여러 솔버 유형을 활용하는 방법에 대한 자세한 내용은 여러 솔버 유형 섹션을 읽어보세요.
DNS01 자체 검사용 네임서버 설정
cert-manager는 DNS01 챌린지를 시도하기 전에 올바른 DNS 레코드가 존재하는지 확인합니다. 기본적으로 cert-manager는 /etc/resolv.conf에서 가져온 재귀 네임서버를 사용해 권위 있는(authoritative) 네임서버를 질의한 뒤, 그 네임서버에 직접 질의해 DNS 레코드가 존재하는지 검증합니다.
이 동작이 원하지 않는 경우 (예: 여러 권위 네임서버가 있거나 스플릿 호라이즌 DNS를 사용하는 경우), cert-manager 컨트롤러는 이 동작을 바꿀 수 있는 두 가지 플래그를 제공합니다.
--dns01-recursive-nameservers cert-manager가 질의해야 하는 재귀 네임서버의 호스트와 포트를 쉼표로 구분한 문자열입니다.
--dns01-recursive-nameservers-only cert-manager가 검증에 재귀 네임서버만 사용하도록 강제합니다. 이 옵션을 켜면 재귀 네임서버가 수행하는 캐싱 때문에 DNS01 자체 검사가 더 오래 걸릴 수 있습니다.
사용 예시:
--dns01-recursive-nameservers-only --dns01-recursive-nameservers=8.8.8.8:53,1.1.1.1:53
cert-manager Helm 차트를 사용하는 경우 .Values.extraArgs를 통해 또는 helm install/upgrade 시점에 --set 명령으로 재귀 네임서버를 설정할 수 있습니다:
--set 'extraArgs={--dns01-recursive-nameservers-only,--dns01-recursive-nameservers=8.8.8.8:53\,1.1.1.1:53}'
DNS01 위임 도메인 (Delegated Domains)
기본적으로 cert-manager는 하위 도메인을 가리키는 CNAME 레코드를 따르지 않습니다.
cert-manager에게 루트 DNS 존에 대한 접근 권한을 주고 싶지 않다면, _acme-challenge.example.com 하위 도메인을 대신 어떤 덜 권한이 있는 도메인(less-privileged.example.org)에 위임할 수 있습니다. 이는 다음과 같은 방식으로 달성할 수 있습니다. 두 개의 존이 있다고 가정해 봅시다:
-
example.com -
less-privileged.example.org -
이 덜 권한 있는 도메인을 가리키는 CNAME 레코드를 생성합니다:
_acme-challenge.example.com IN CNAME _acme-challenge.less-privileged.example.org.
-
cert-manager에게 덜 권한 있는
less-privileged.example.org존을 업데이트할 권한을 부여합니다 -
이 덜 권한 있는 존을 업데이트하기 위한 구성/자격 증명을 제공하고 관련
dns01솔버에 추가 필드를 추가합니다.selector필드는 여전히 원래example.com에 대해 동작하며, 자격 증명은less-privileged.example.org에 대해 제공된다는 점에 유의하세요
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
...
spec:
acme:
...
solvers:
- selector:
dnsZones:
- 'example.com'
dns01:
# Valid values are None and Follow
cnameStrategy: Follow
route53:
region: eu-central-1
accessKeyID:
hostedZoneID:
secretAccessKeySecretRef:
...
별도의 인증서가 필요한 (하위)도메인이 많다면 별칭(aliased) 덜 권한 있는 도메인을 공유하는 것도 가능합니다. 이를 위해서는 각 (하위)도메인에 대해 이런 방식으로 CNAME 레코드를 생성하면 됩니다:
_acme-challenge.example.com IN CNAME _acme-challenge.less-privileged.example.org.
_acme-challenge.www.example.com IN CNAME _acme-challenge.less-privileged.example.org.
_acme-challenge.foo.example.com IN CNAME _acme-challenge.less-privileged.example.org.
_acme-challenge.bar.example.com IN CNAME _acme-challenge.less-privileged.example.org.
이 구성으로 cert-manager는 DNS01 챌린지 중 어떤 DNS 존을 업데이트할지 결정하기 위해 CNAME 레코드를 재귀적으로 따릅니다.
⚠️ cnameStrategy: Follow를 사용하면 cert-manager는 와일드카드 레코드로 합성된 것을 포함해 _acme-challenge.<domain>에서 발견되는 모든 CNAME 레코드를 따릅니다. 예를 들어 *.example.com IN CNAME lb.example.org 같은 레코드는 _acme-challenge.example.com에 대한 CNAME 질의에도 응답하므로, cert-manager는 lb.example.org에 챌린지 TXT 레코드를 생성하려 시도하게 되며, 일반적으로 Route 53의 RRSet with DNS name lb.example.org. is not permitted in zone example.com. 같은 오류로 실패합니다. 이를 피하려면 _acme-challenge.<domain>에 명시적 레코드를 생성하거나(정확히 일치하는 이름이 와일드카드 합성을 막아줌), 다른 존에 챌린지를 위임하지 않는다면 기본값인 cnameStrategy: None을 사용하세요.
지원되는 DNS01 공급자
ACME Issuer에 대해 다양한 DNS 공급자가 지원됩니다. 아래는 사용 가능한 공급자와 그 .yaml 구성, 그리고 사용에 관한 추가 Kubernetes 및 공급자별 참고 사항을 나열한 것입니다.
-
ACMEDNS
-
Akamai
-
AzureDNS
-
CloudFlare
-
Google
-
Route53
-
DigitalOcean
-
RFC2136
웹훅 (Webhook)
cert-manager는 외부 웹훅을 통해 트리 외부(out of tree) DNS 공급자도 지원합니다. 지원되는 공급자와 문서 링크는 다음과 같습니다:
-
AliDNS-Webhook(https://github.com/pragkent/alidns-webhook) -
bizflycloud-certmanager-dns-webhook(https://github.com/bizflycloud/bizflycloud-certmanager-dns-webhook) -
cert-manager-alidns-webhook(https://github.com/DEVmachine-fr/cert-manager-alidns-webhook) -
cert-manager-webhook-abion(https://github.com/abiondevelopment/cert-manager-webhook-abion) -
cert-manager-webhook-arvan(https://github.com/kiandigital/cert-manager-webhook-arvan) -
cert-manager-webhook-bunny(https://github.com/aardbol/cert-manager-webhook-bunny) -
cert-manager-webhook-civo(https://github.com/okteto/cert-manager-webhook-civo) -
cert-manager-webhook-dnspod(https://github.com/qqshfox/cert-manager-webhook-dnspod) -
cert-manager-webhook-dnsimple(https://github.com/neoskop/cert-manager-webhook-dnsimple) -
cert-manager-webhook-exoscale(https://github.com/glasskube/cert-manager-webhook-exoscale) -
cert-manager-webhook-gandi(https://github.com/SINTEF/cert-manager-webhook-gandi) -
cert-manager-webhook-glesys(https://github.com/sthlmio/cert-manager-webhook-glesys) -
cert-manager-webhook-hetzner(https://github.com/vadimkim/cert-manager-webhook-hetzner) -
cert-manager-webhook-ibmcis(https://github.com/jb-dk/cert-manager-webhook-ibmcis) -
cert-manager-webhook-infomaniak(https://github.com/Infomaniak/cert-manager-webhook-infomaniak) -
cert-manager-webhook-inwx(https://gitlab.com/smueller18/cert-manager-webhook-inwx) -
cert-manager-webhook-ionos-cloud(https://github.com/ionos-cloud/cert-manager-webhook-ionos-cloud) -
cert-manager-webhook-linode(https://github.com/linode/cert-manager-webhook-linode) -
cert-manager-webhook-loopia(https://github.com/Identitry/cert-manager-webhook-loopia) -
cert-manager-webhook-netcup(https://github.com/aellwein/cert-manager-webhook-netcup) -
cert-manager-webhook-oci(https://gitlab.com/dn13/cert-manager-webhook-oci) (Oracle Cloud Infrastructure) -
cert-manager-webhook-ovh(https://github.com/aureq/cert-manager-webhook-ovh) -
cert-manager-webhook-opentelekomcloud(https://github.com/akyriako/cert-manager-webhook-opentelekomcloud) -
cert-manager-webhook-pdns(https://github.com/zachomedia/cert-manager-webhook-pdns) -
cert-manager-webhook-rackspace(https://github.com/rackerlabs/cert-manager-webhook-rackspace) -
cert-manager-webhook-regery(https://github.com/darioackermann/cert-manager-webhook-regery) -
cert-manager-webhook-scaleway(https://github.com/scaleway/cert-manager-webhook-scaleway) -
cert-manager-webhook-selectel(https://github.com/selectel/cert-manager-webhook-selectel) -
cert-manager-webhook-softlayer(https://github.com/cgroschupp/cert-manager-webhook-softlayer) -
cert-manager-webhook-solidserver(https://github.com/niklas-letz/cert-manager-webhook-solidserver) -
cert-manager-webhook-vercel(https://github.com/rhythmbhiwani/cert-manager-webhook-vercel) -
cert-manager-webhook-yandex-cloud(https://github.com/malinink/cert-manager-webhook-yandex-cloud) -
cert-manager-webhook-zilore(https://gitlab.com/zilore/cert-manager-webhook-zilore) -
stackit-cert-manager-webhook(https://github.com/stackitcloud/stackit-cert-manager-webhook)
웹훅 공급자 구성 방법에 대한 자세한 내용은 여기에서 확인할 수 있습니다.
새로운 지원되지 않는 DNS 공급자를 만들려면 개발 문서를 참고하세요.
더 알아보기 (Learn more)
- cert-manager 공식 문서: DNS01
- ACME Issuer 구성 및 챌린지 유형 문서