18.8. Infoblox での DNS レコードの作成
External DNS Operator を使用して、Infoblox 上に DNS レコードを作成できます。
18.8.1. Infoblox のパブリック DNS ゾーンでの DNS レコードの作成
External DNS Operator を使用して、Infoblox のパブリック DNS ゾーンに DNS レコードを作成できます。
前提条件
-
OpenShift CLI (
oc
) にアクセスできる。 - Infoblox UI にアクセスできる。
手順
次のコマンドを実行して、Infoblox クレデンシャルを使用して
secret
オブジェクトを作成します。oc -n external-dns-operator create secret generic infoblox-credentials --from-literal=EXTERNAL_DNS_INFOBLOX_WAPI_USERNAME=<infoblox_username> --from-literal=EXTERNAL_DNS_INFOBLOX_WAPI_PASSWORD=<infoblox_password>
$ oc -n external-dns-operator create secret generic infoblox-credentials --from-literal=EXTERNAL_DNS_INFOBLOX_WAPI_USERNAME=<infoblox_username> --from-literal=EXTERNAL_DNS_INFOBLOX_WAPI_PASSWORD=<infoblox_password>
Copy to Clipboard Copied! 次のコマンドを実行して、ルートのリストを取得します。
oc get routes --all-namespaces | grep console
$ oc get routes --all-namespaces | grep console
Copy to Clipboard Copied! 出力例
openshift-console console console-openshift-console.apps.test.example.com console https reencrypt/Redirect None openshift-console downloads downloads-openshift-console.apps.test.example.com downloads http edge/Redirect None
openshift-console console console-openshift-console.apps.test.example.com console https reencrypt/Redirect None openshift-console downloads downloads-openshift-console.apps.test.example.com downloads http edge/Redirect None
Copy to Clipboard Copied! ExternalDNS
オブジェクトを定義する YAML ファイル (例:external-dns-sample-infoblox.yaml
) を作成します。external-dns-sample-infoblox.yaml
ファイルの例apiVersion: externaldns.olm.openshift.io/v1beta1 kind: ExternalDNS metadata: name: sample-infoblox spec: provider: type: Infoblox infoblox: credentials: name: infoblox-credentials gridHost: ${INFOBLOX_GRID_PUBLIC_IP} wapiPort: 443 wapiVersion: "2.3.1" domains: - filterType: Include matchType: Exact name: test.example.com source: type: OpenShiftRoute openshiftRouteOptions: routerName: default
apiVersion: externaldns.olm.openshift.io/v1beta1 kind: ExternalDNS metadata: name: sample-infoblox
1 spec: provider: type: Infoblox
2 infoblox: credentials: name: infoblox-credentials gridHost: ${INFOBLOX_GRID_PUBLIC_IP} wapiPort: 443 wapiVersion: "2.3.1" domains: - filterType: Include matchType: Exact name: test.example.com source: type: OpenShiftRoute
3 openshiftRouteOptions: routerName: default
4 Copy to Clipboard Copied! 次のコマンドを実行して、Infoblox に
ExternalDNS
リソースを作成します。oc create -f external-dns-sample-infoblox.yaml
$ oc create -f external-dns-sample-infoblox.yaml
Copy to Clipboard Copied! Infoblox UI から、
console
ルート用に作成された DNS レコードを確認します。-
Data Management
DNS Zones をクリックします。 - ゾーン名を選択します。
-
Data Management