$ 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>
You can create DNS records on Infoblox by using the External DNS Operator.
You can create DNS records on a public DNS zone on Infoblox by using the External DNS Operator.
You have access to the OpenShift CLI (oc
).
You have access to the Infoblox UI.
Create a secret
object with Infoblox credentials by running the following command:
$ 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:
$ oc get routes --all-namespaces | grep console
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:
external-dns-sample-infoblox.yaml
fileapiVersion: 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)
1 | Specifies the External DNS name. |
2 | Defines the provider type. |
3 | You can define options for the source of DNS records. |
4 | 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 CNAME record. |
Create the ExternalDNS
resource on Infoblox by running the following command:
$ 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.