After you prepare your DNS backend as described in Prepare a DNS backend for ExternalDNS, prepare your cluster model as described below.
To configure the cluster model:
Select from the following options:
Open your Git project repository.
In classes/cluster/<cluster_name>/kubernetes/control.yml
:
If you are performing the initial deployment of your MCP Kubernetes
cluster, configure the provider
parameter in the snippet below
depending on your DNS provider: coredns|aws|google|designate
.
If you are making changes to an existing cluster, add and configure
the snippet below. For example:
parameters:
kubernetes:
common:
addons:
externaldns:
enabled: True
namespace: kube-system
image: mirantis/external-dns:latest
domain: domain
provider: coredns
Set up the pillar data for your DNS provider to configure it as an add-on. Use the credentials generated while preparing your DNS provider.
For Designate:
parameters:
kubernetes:
common:
addons:
externaldns:
externaldns:
enabled: True
domain: company.mydomain
provider: designate
designate_os_options:
OS_AUTH_URL: https://keystone_auth_endpoint:5000
OS_PROJECT_DOMAIN_NAME: default
OS_USER_DOMAIN_NAME: default
OS_PROJECT_NAME: admin
OS_USERNAME: admin
OS_PASSWORD: password
OS_REGION_NAME: RegionOne
For AWS Route 53:
parameters:
kubernetes:
common:
addons:
externaldns:
externaldns:
enabled: True
domain: company.mydomain
provider: aws
aws_options:
AWS_ACCESS_KEY_ID: XXXXXXXXXXXXXXXXXXXX
AWS_SECRET_ACCESS_KEY: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
For Google CloudDNS:
parameters:
kubernetes:
common:
addons:
externaldns:
externaldns:
enabled: True
domain: company.mydomain
provider: google
google_options:
key: ''
project: default-123
Note
You can export the credentials from the Google console and process them using the cat key.json | tr -d 'n' command.
For CoreDNS:
parameters:
kubernetes:
common:
addons:
coredns:
enabled: True
namespace: kube-system
image: coredns/coredns:latest
etcd:
operator_image: quay.io/coreos/etcd-operator:v0.5.2
version: 3.1.8
base_image: quay.io/coreos/etcd
Commit and push the changes to the project Git repository.
Log in to the Salt Master node.
Update your Salt formulas and the system level of your repository:
/srv/salt/reclass
.Now, proceed to Deploy ExternalDNS.