mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-07 01:56:57 +02:00
Merge pull request #1319 from saidst/feature/extend-azure-private-dns-tutorial
Reworked tutorial for Azure Private DNS
This commit is contained in:
commit
e68ea6050b
@ -1,20 +1,60 @@
|
|||||||
|
|
||||||
# Set up ExternalDNS for Azure Private DNS
|
# Set up ExternalDNS for Azure Private DNS
|
||||||
|
|
||||||
This tutorial describes how to set up ExternalDNS for managing records in Azure Private DNS.
|
This tutorial describes how to set up ExternalDNS for managing records in Azure Private DNS.
|
||||||
It assumes to deploy ExternalDNS as a container Kubernetes.
|
|
||||||
|
|
||||||
|
|
||||||
It comprises of the following steps:
|
It comprises of the following steps:
|
||||||
1) Provision Azure Private DNS
|
1) Install NGINX Ingress Controller
|
||||||
2) Configure service principal for managing the zone
|
2) Provision Azure Private DNS
|
||||||
3) Deploy ExternalDNS
|
3) Configure service principal for managing the zone
|
||||||
|
4) Deploy ExternalDNS
|
||||||
|
|
||||||
|
Everything will be deployed on Kubernetes.
|
||||||
|
Therefore, please see the subsequent prerequisites.
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
- Azure Kubernetes Service available
|
- Azure Kubernetes Service is deployed and ready
|
||||||
- nginx-ingress-controller incl. `--publish-service=namespace/nginx-ingress-controller-svcname` available
|
|
||||||
- [Azure CLI 2.0](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli) and `kubectl` installed on the box to execute the subsequent steps
|
- [Azure CLI 2.0](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli) and `kubectl` installed on the box to execute the subsequent steps
|
||||||
|
|
||||||
|
## Install NGINX Ingress Controller
|
||||||
|
|
||||||
|
Helm is used to deploy the ingress controller.
|
||||||
|
|
||||||
|
We employ the popular chart [stable/nginx-ingress](https://github.com/helm/charts/tree/master/stable/nginx-ingress).
|
||||||
|
|
||||||
|
```
|
||||||
|
$ helm install stable/nginx-ingress \
|
||||||
|
--name nginx-ingress \
|
||||||
|
--set controller.publishService.enabled=true
|
||||||
|
```
|
||||||
|
|
||||||
|
The parameter `controller.publishService.enabled` needs to be set to `true.`
|
||||||
|
|
||||||
|
It will make the ingress controller update the endpoint records of ingress-resources to contain the external-ip of the loadbalancer serving the ingress-controller.
|
||||||
|
This is crucial as ExternalDNS reads those endpoints records when creating DNS-Records from ingress-resources.
|
||||||
|
In the subsequent parameter we will make use of this. If you don't want to work with ingress-resources in your later use, you can leave the parameter out.
|
||||||
|
|
||||||
|
Verify the correct propagation of the loadbalancer's ip by listing the ingresses.
|
||||||
|
```
|
||||||
|
$ kubectl get ingress
|
||||||
|
```
|
||||||
|
The address column should contain the ip for each ingress. ExternalDNS will pick up exactly this piece of information.
|
||||||
|
```
|
||||||
|
NAME HOSTS ADDRESS PORTS AGE
|
||||||
|
nginx1 sample1.aks.com 52.167.195.110 80 6d22h
|
||||||
|
nginx2 sample2.aks.com 52.167.195.110 80 6d21h
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
If you do not want to deploy the ingress controller with Helm, ensure to pass the following cmdline-flags to it through the mechanism of your choice:
|
||||||
|
|
||||||
|
```
|
||||||
|
flags:
|
||||||
|
--publish-service=<namespace of ingress-controller >/<svcname of ingress-controller>
|
||||||
|
--update-status=true (default-value)
|
||||||
|
|
||||||
|
example:
|
||||||
|
./nginx-ingress-controller --publish-service=default/nginx-ingress-controller
|
||||||
|
```
|
||||||
|
|
||||||
## Provision Azure Private DNS
|
## Provision Azure Private DNS
|
||||||
|
|
||||||
@ -107,7 +147,6 @@ Azure-CLI features functionality for automatically maintaining this file for AKS
|
|||||||
Then apply one of the following manifests depending on whether you use RBAC or not.
|
Then apply one of the following manifests depending on whether you use RBAC or not.
|
||||||
|
|
||||||
The credentials of the service principal are provided to ExternalDNS as environment-variables.
|
The credentials of the service principal are provided to ExternalDNS as environment-variables.
|
||||||
At the end of this section, we additionally describe how to provide them as a _file_.
|
|
||||||
|
|
||||||
### Manifest (for clusters without RBAC enabled)
|
### Manifest (for clusters without RBAC enabled)
|
||||||
```yaml
|
```yaml
|
||||||
|
Loading…
Reference in New Issue
Block a user