mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
90 lines
2.7 KiB
Plaintext
90 lines
2.7 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * networking/external_dns_operator/nw-creating-dns-records-on-infoblox.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="nw-control-dns-records-public-dns-zone-infoblox_{context}"]
|
|
= Creating DNS records on a public DNS zone on Infoblox
|
|
|
|
[role="_abstract"]
|
|
To create DNS records on Infoblox, use the External DNS Operator. The Operator manages external name resolution for your cluster services.
|
|
|
|
.Prerequisites
|
|
|
|
* You have access to the {oc-first}.
|
|
* You have access to the Infoblox UI.
|
|
|
|
.Procedure
|
|
|
|
. Create a `secret` object with Infoblox credentials by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ 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>
|
|
----
|
|
|
|
. Get a list of routes by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get routes --all-namespaces | grep console
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
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
|
|
----
|
|
|
|
. Create a YAML file, for example, `external-dns-sample-infoblox.yaml`, that defines the `ExternalDNS` object:
|
|
+
|
|
.Example `external-dns-sample-infoblox.yaml` file
|
|
[source,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
|
|
----
|
|
+
|
|
where:
|
|
|
|
`metadata.name`:: Specifies the External DNS name.
|
|
|
|
`provider.type`:: Specifies the provider type.
|
|
|
|
`source.type`:: Specifies options for the source of DNS records.
|
|
|
|
`routerName`:: If the source type is `OpenShiftRoute`, you can pass the OpenShift Ingress Controller name. External DNS selects the canonical hostname of that router as the target while creating a CNAME record.
|
|
|
|
. Create the `ExternalDNS` resource on Infoblox by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc create -f external-dns-sample-infoblox.yaml
|
|
----
|
|
|
|
. From the Infoblox UI, check the DNS records created for `console` routes:
|
|
+
|
|
.. Click *Data Management* -> *DNS* -> *Zones*.
|
|
+
|
|
.. Select the zone name.
|