没有通过CI / DC部署到Azure开发空间的DNS /入口

时间:2019-03-03 10:42:35

标签: kubernetes azure-devops kubernetes-helm azure-aks

尝试使用Azure Dev Spaces,在Visual Studio中运行My_list = [[1,2,3,4,5],[6,7,8,9,10],[11,12,13,14,15],[16,17,18,19,20]] n=len(My_list) new_list=[[],[],[],[]] for i in range(0,n-1,2): new_list[i]=My_list[i][:3]+My_list[i+1][3:] new_list[i+1]=My_list[i][3:]+My_list[i+1][:3] print(new_list) 可以正常工作-生成公共URL(格式为http://xxxdemoappcore.rxxxxxxn.weu.azds.io/),并创建到本地主机的隧道。

我不想在CI / CD管道中使用Azure开发空间。按照本教程的介绍,我刚刚通过Azure Pipelines CI / CD和Azure Dev Spaces设置了.NET核心Web应用程序的部署。

将CI / CD与Azure开发空间一起使用 https://docs.microsoft.com/en-us/azure/dev-spaces/how-to/setup-cicd

在Release任务中升级头盔后,将生成以下输出:

azds ip

URL http://dev-spaces.xxxdemoappcore.b0ada56739xxxxc79d0a.westeurope.aksapp.io/无法解析DNS。

上面的输出或任何其他有关无法解析公共URL的日志可以确定什么吗?

为什么从CI / CD生成的URL与从本地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 生成的URL不同?

1 个答案:

答案 0 :(得分:0)

摘自official文档:

  

运行prep命令时,可以选择指定   -公共标志。该标志告诉控制器为该服务创建可访问Internet的端点

azds up 根据默认的azds.yaml文件模板扩展DNS名称(Ingress.hosts的值),在Windows中,可以在此处找到:

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

仍然可以直接在工作区的azds.yaml文件中对其进行修改。