No DNS / ingress to Azure Dev Space deployed via CI/DC

3/3/2019

Having experimented with Azure Dev Spaces, running azds ip from visual studio works fine - a public URL is generated (in the format http://xxxdemoappcore.rxxxxxxn.weu.azds.io/) and a tunnel to localhost is also created.

I not want to make use of Azure Dev Spaces in the CI/CD pipeline. I've just set up deployment of a .NET core web application via Azure Pipelines CI/CD with Azure Dev Spaces, following this tutorial to the letter.

Use CI/CD with Azure Dev Spaces https://docs.microsoft.com/en-us/azure/dev-spaces/how-to/setup-cicd

After the helm upgrade in the Release task, the following output is generated:

2019-03-03T10:28:41.8525110Z ##[section]Starting: helm upgrade xxxdemoappcore
2019-03-03T10:28:41.8531800Z ==============================================================================
2019-03-03T10:28:41.8531952Z Task         : Package and deploy Helm charts
2019-03-03T10:28:41.8532015Z Description  : Deploy, configure, update your Kubernetes cluster in Azure Container Service by running helm commands.
2019-03-03T10:28:41.8532120Z Version      : 0.138.15
2019-03-03T10:28:41.8532164Z Author       : Microsoft Corporation
2019-03-03T10:28:41.8532422Z Help         : [More Information](https://go.microsoft.com/fwlink/?linkid=851275)
2019-03-03T10:28:41.8532483Z ==============================================================================
2019-03-03T10:28:44.0765885Z [command]/opt/hostedtoolcache/helm/2.13.0/x64/linux-amd64/helm upgrade --namespace dev-spaces --install --force --set image.repository=xxxdemocontainers.azurecr.io/xxxdemoappcore,image.tag=4518,ingress.hosts[0]=dev-spaces.xxxdemoappcore.b0ada56739xxxxc79d0a.westeurope.aksapp.io --wait xxxdemoappcore-dev-spaces /home/vsts/work/r1/a/drop/xxxdemoappcore/chart
2019-03-03T10:28:47.3563764Z Release "xxxdemoappcore-dev-spaces" has been upgraded. Happy Helming!
2019-03-03T10:28:47.3564495Z LAST DEPLOYED: Sun Mar  3 10:28:43 2019
2019-03-03T10:28:47.3565059Z NAMESPACE: dev-spaces
2019-03-03T10:28:47.3565364Z STATUS: DEPLOYED
2019-03-03T10:28:47.3565552Z 
2019-03-03T10:28:47.3565805Z RESOURCES:
2019-03-03T10:28:47.3566010Z ==> v1/Pod(related)
2019-03-03T10:28:47.3566261Z NAME                                 READY  STATUS   RESTARTS  AGE
2019-03-03T10:28:47.3567019Z xxxdemoappcore-66c677db44-c2x59  2/2    Running  0         77m
2019-03-03T10:28:47.3567230Z 
2019-03-03T10:28:47.3567451Z ==> v1/Service
2019-03-03T10:28:47.3567816Z NAME                TYPE       CLUSTER-IP   EXTERNAL-IP  PORT(S)  AGE
2019-03-03T10:28:47.3568098Z xxxdemoappcoreClusterIP  10.0.91.148  <none>       80/TCP   152m
2019-03-03T10:28:47.3568252Z 
2019-03-03T10:28:47.3568443Z ==> v1beta1/Ingress
2019-03-03T10:28:47.3568645Z NAME                HOSTS                                                                    ADDRESS  PORTS  AGE
2019-03-03T10:28:47.3569110Z xxxdemoappcoredev-spaces.xxxdemowebappcore.b0ada56739xxxxc79d0a.westeurope.aksapp.io  80       152m
2019-03-03T10:28:47.3569326Z 
2019-03-03T10:28:47.3569494Z ==> v1beta2/Deployment
2019-03-03T10:28:47.3569878Z NAME                READY  UP-TO-DATE  AVAILABLE  AGE
2019-03-03T10:28:47.3570104Z xxxdemoappcore1/1    1           1          152m
2019-03-03T10:28:47.3570298Z 
2019-03-03T10:28:47.3570439Z 
2019-03-03T10:28:47.3570594Z NOTES:
2019-03-03T10:28:47.3570804Z 1. Get the application URL by running these commands:
2019-03-03T10:28:47.3571184Z   http://dev-spaces.xxxdemoappcore.b0ada56739xxxxc79d0a.westeurope.aksapp.io/
2019-03-03T10:28:47.3571445Z 
2019-03-03T10:28:47.3597040Z ##[section]Finishing: helm upgrade xxxdemoappcore

The URL http://dev-spaces.xxxdemoappcore.b0ada56739xxxxc79d0a.westeurope.aksapp.io/ cannot resolve DNS.

Can anything be determined by the output above or any additional logs as to why the public URL can not be resolved?

Why is the URL different when generated from CI/CD compared with azds up from local?

-- Dan Cook
azure-aks
azure-devops
kubernetes
kubernetes-helm

1 Answer

3/8/2019

From official documentation:

When you run the prep command, you have the option of specifying the --public flag. This flag tells the controller to create an internet-accessible endpoint for this service

azds up expands the DNS name (value of Ingress.hosts) based on default azds.yaml file template, which in case of Windows, can be found here:

"C:\Program Files\Microsoft SDKs\Azure\Azure Dev Spaces CLI (Preview)\InitTemplates\azds.yaml.generic"

It can be still modified in your workspace`s azds.yaml file directly.

-- Nepomucen
Source: StackOverflow