13.5. 외부 DNS Operator 설치
새 프로젝트를 생성합니다.
$ oc new-project external-dns-operator
OperatorHub에서
외부 DNS
Operator를 설치합니다.$ cat << EOF | oc apply -f - apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: external-dns-group namespace: external-dns-operator spec: targetNamespaces: - external-dns-operator --- apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: external-dns-operator namespace: external-dns-operator spec: channel: stable-v1.1 installPlanApproval: Automatic name: external-dns-operator source: redhat-operators sourceNamespace: openshift-marketplace EOF
외부 DNS
Operator가 실행될 때까지 기다립니다.$ oc rollout status deploy external-dns-operator --timeout=300s
AWS IAM 사용자 인증 정보에서 시크릿을 생성합니다.
$ oc -n external-dns-operator create secret generic external-dns \ --from-file "${SCRATCH}/credentials"
ExternalDNS
컨트롤러를 배포합니다.$ cat << EOF | oc apply -f - apiVersion: externaldns.olm.openshift.io/v1beta1 kind: ExternalDNS metadata: name: ${DOMAIN} spec: domains: - filterType: Include matchType: Exact name: ${DOMAIN} provider: aws: credentials: name: external-dns type: AWS source: openshiftRouteOptions: routerName: external-dns-ingress type: OpenShiftRoute zones: - ${ZONE_ID} EOF
컨트롤러가 실행될 때까지 기다립니다.
$ oc rollout status deploy external-dns-${DOMAIN} --timeout=300s