Este conteúdo não está disponível no idioma selecionado.
Chapter 5. Configuring DNS provider credentials
If you want to configure DNS policies in Connectivity Link, you must configure credentials for at least one of the following supported cloud-based DNS providers:
- Amazon Route 53
- Google Cloud DNS
Microsoft Azure DNS
NoteYou must perform the steps for your chosen DNS provider on each OpenShift cluster that you want to use Connectivity Link on. You must configure the secret for the DNS provider in the same namespace that will include your Gateway.
Prerequisites
- See Chapter 1, Connectivity Link prerequisites and permissions.
You have access to the namespace in which your Gateway will be created, for example,
api-gateway.NoteThis guide uses environment variables for convenience only. If you know the environment variable values, you can set up the required
.yamlfiles in a way that suits your needs.
5.1. Configuring Amazon DNS provider credentials Copiar o linkLink copiado para a área de transferência!
Procedure
Set up your environment variables as follows:
export AWS_ACCESS_KEY_ID=xxxxxxx export AWS_SECRET_ACCESS_KEY=xxxxxxx export AWS_REGION=your-aws-regionThese variable values are described as follows:
-
AWS_ACCESS_KEY_ID: Key ID from AWS with Route 53 access. -
AWS_SECRET_ACCESS_KEY: Key from AWS with Route 53 access. -
AWS_REGION: Your AWS region, for example,us-east-2oreu-west-1.
-
Create a
Secretresource for your credentials as follows:kubectl create secret generic aws-credentials \ --namespace=api-gateway \ --type=kuadrant.io/aws \ --from-literal=AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID \ --from-literal=AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \ --from-literal=AWS_REGION=$AWS_REGIONIn this case, you must set the secret
typetoaws.
Additional resources
5.2. Configuring Google DNS provider credentials Copiar o linkLink copiado para a área de transferência!
Procedure
Set up your environment variables as follows:
export GOOGLE=xxxxxxx export PROJECT_ID=xxxxxxxThese variable values are described as follows:
-
GOOGLE: Google credentials JSON file. PROJECT_ID: Google project ID.The
GOOGLEvariable specifies the JSON credentials generated by thegcloudCLI or by the service account. For example,$HOME/.config/gcloud/application_default_credentials.json, which contains the following:{"client_id": "***","client_secret": "***","refresh_token": "***","type": "authorized_user"}
-
Create a
Secretresource for your credentials as follows:kubectl create secret generic test-gcp-credentials \ --namespace=api-gateway \ --type=kuadrant.io/gcp \ --from-literal=PROJECT_ID=$PROJECT_ID \ --from-file=GOOGLE=$GOOGLEIn this case, you must set the secret
typetogcp.
Additional resources
5.3. Configuring Azure DNS provider credentials Copiar o linkLink copiado para a área de transferência!
Procedure
Create a new Azure service principal for managing DNS as follows:
DNS_NEW_SP_NAME=kuadrantDnsPrincipal DNS_SP=$(az ad sp create-for-rbac --name $DNS_NEW_SP_NAME) DNS_SP_APP_ID=$(echo $DNS_SP | jq -r '.appId') DNS_SP_PASSWORD=$(echo $DNS_SP | jq -r '.password')For more details on service principals, see the Microsoft Azure documentation.
To grant read and contributor access to the zones that you want managed for the service principal you are using, perform the following steps:
Fetch the DNS ID used to grant access to the service principal as follows:
DNS_ID=$(az network dns zone show --name example.com \ --resource-group ExampleDNSResourceGroup --query "id" --output tsv) # Get your resource group ID RESOURCE_GROUP_ID=az group show --resource-group ExampleDNSResourceGroup | jq ".id" -rProvide reader access to the resource group as follows:
az role assignment create --role "Reader" --assignee $DNS_SP_APP_ID --scope $DNS_IDProvide contributor access to the DNS zone as follows:
az role assignment create --role "Contributor" --assignee $DNS_SP_APP_ID --scope $DNS_ID
Because you are setting up advanced traffic rules for geographic and weighted responses, you must also grant traffic manager and DNS zone access as follows:
az role assignment create --role "Traffic Manager Contributor" --assignee $DNS_SP_APP_ID --scope $RESOURCE_GROUP_ID az role assignment create --role "DNS Zone Contributor" --assignee $DNS_SP_APP_ID --scope $RESOURCE_GROUP_ID cat <<-EOF > /local/path/to/azure.json { "tenantId": "$(az account show --query tenantId -o tsv)", "subscriptionId": "$(az account show --query id -o tsv)", "resourceGroup": "ExampleDNSResourceGroup", "aadClientId": "$DNS_SP_APP_ID", "aadClientSecret": "$DNS_SP_PASSWORD" } EOFCreate a
Secretresource for your credentials as follows:kubectl create secret generic test-azure-credentials \ --namespace=api-gateway \ --type=kuadrant.io/azure \ --from-file=azure.json=/local/path/to/azure.jsonIn this case, you must set the secret
typetoazure.
Additional resources