-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documented Azure DNS deployment (#1525)
* Updated Helm chart, docs and examples for connecting to Azure Public DNS service. Signed-off-by: Nuno Guedes <nunoguedes@hotmail.com> * Bug fixing the Windows DNS example Signed-off-by: Nuno Guedes <nunoguedes@hotmail.com> --------- Signed-off-by: Nuno Guedes <nunoguedes@hotmail.com> Signed-off-by: Yury Tsarev <yury@upbound.io> Co-authored-by: Yury Tsarev <yury@upbound.io>
- Loading branch information
Showing
43 changed files
with
938 additions
and
419 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
chart/k8gb/templates/external-dns/external-dns-azure-auth.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{{- if and .Values.azuredns.enabled .Values.azuredns.createAuthSecret }} | ||
apiVersion: v1 | ||
kind: Secret | ||
type: Opaque | ||
metadata: | ||
name: {{ .Values.azuredns.authSecretName | default "external-dns-secret-azure" }} | ||
data: | ||
azure.json: {{ include "external-dns.azure-credentials" . | b64enc }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<h1 align="center" style="margin-top: 0;">Using Azure Public DNS provider</h1> | ||
|
||
This document outlines how to configure k8gb to use the Azure Public DNS provider. Azure Private DNS is not supported as it does not support NS records at this time. For private DNS scenarios in Azure, please refer to the [Windows DNS](deploy_azuredns.md) documentation and consider implementing it using VM-based DNS services such as Windows DNS or BIND. | ||
|
||
### external-dns credentials for Azure DNS | ||
|
||
In this example, we will use a registered app in Microsoft Entra ID and it's corresponding Client ID / Client Secret to authenticate with the Azure DNS zone. All of the [supported authentication fields supported by external-dns](https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/azure.md#configuration-file) are supported by k8gb and can be used in the `azuredns` section of the `k8gb` Helm chart values.yaml file. | ||
|
||
## Sample solution | ||
|
||
In this sample solution we will deploy two private AKS clusters in different regions. A workload will be deployed to both clusters and exposed to the internet with the help of k8gb and Azure Public DNS. | ||
|
||
## Reference Setup | ||
|
||
The reference setup includes two private AKS clusters that can be deployed on two different regions for load balancing or to provide a failover solution. | ||
|
||
Configurable resources: | ||
|
||
* Resource groups | ||
* VNet and subnets | ||
* Managed Identity | ||
* Clusters | ||
|
||
## Run the sample | ||
|
||
* To run the provided sample, please use the provided Makefile [here](https://github.com/k8gb-io/k8gb/tree/master/docs/examples/azuredns/). | ||
* Deploys all the required infrastructure and configurations | ||
* Before executing, please fill all the local variables in the scripts with the correct naming for the resources in order to avoid having problems with your Azure policies | ||
* Scripts will use Az CLI, please ensure that it is installed and logged when trying to execute the command | ||
* [Microsoft Learn](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli "Install Az CLI") | ||
|
||
### Deploy infrastructure | ||
|
||
This action will create resource groups, vnets and private AKS clusters to run all required workloads | ||
|
||
```sh | ||
make deploy-infra | ||
``` | ||
|
||
### Setup clusters | ||
|
||
Install required Ingress controller in both clusters in order to deploy K8GB and demo application | ||
|
||
```sh | ||
make setup-clusters | ||
``` | ||
|
||
### Install K8gb | ||
|
||
This action will install K8gb in both clusters using the provided [sample](https://github.com/k8gb-io/k8gb/tree/master/docs/examples/azuredns/k8gb/) values.yaml for each cluster. Please ensure that the are correctly updated before execution | ||
|
||
```sh | ||
make deploy-k8gb | ||
``` | ||
|
||
### Install demo app | ||
|
||
Deploys the sample Podinfo workload with failover GLSB configured using annotations in the Ingress resource [samples](https://github.com/k8gb-io/k8gb/tree/master/docs/examples/azuredns/demo/). | ||
Ensure that the hosts on the samples are correctly updated before execution | ||
|
||
```sh | ||
make deploy-demo | ||
``` | ||
|
||
### Destroy lab | ||
|
||
* Destroys the lab environment created for this sample | ||
|
||
```sh | ||
make destroy-infra | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ui: | ||
message: aks1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ui: | ||
message: aks2 |
Oops, something went wrong.