首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在AKS集群下的devspace中运行应用程序时的问题

在AKS集群下的devspace中运行应用程序时的问题
EN

Stack Overflow用户
提问于 2020-05-13 13:33:52
回答 1查看 134关注 0票数 1

我用http enabled.Also创建了一个AKS集群,我的项目启用了开发空间,可以使用cluster.While运行azds应用程序正在创建所有必要的部署文件(helm.yaml,charts.yaml,values.yaml).However我想使用带有开发空间url的公共端点来访问我的应用程序,但是当我使用azds列表时,它只提供本地主机url,而不是启用开发空间的url。

有人能帮帮忙吗?

我的azds.yaml如下所示

代码语言:javascript
复制
kind: helm-release
apiVersion: 1.1
build:
  context: .
  dockerfile: Dockerfile
install:
  chart: charts/webfrontend
  values:
  - values.dev.yaml?
  - secrets.dev.yaml?
  set:
    # Optionally, specify an array of imagePullSecrets. These secrets must be manually created in the namespace.
    # This will override the imagePullSecrets array in values.yaml file.
    # If the dockerfile specifies any private registry, the imagePullSecret for that registry must be added here.
    # ref: https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod
    #
    # For example, the following uses credentials from secret "myRegistryKeySecretName".
    #
    # imagePullSecrets:
    #   - name: myRegistryKeySecretName
    replicaCount: 1
    image:
      repository: webfrontend
      tag: $(tag)
      pullPolicy: Never
    ingress:
      annotations:
        kubernetes.io/ingress.class: traefik-azds
      hosts:
      # This expands to form the service's public URL: [space.s.][rootSpace.]webfrontend.<random suffix>.<region>.azds.io
      # Customize the public URL by changing the 'webfrontend' text between the $(rootSpacePrefix) and $(hostSuffix) tokens
      # For more information see https://aka.ms/devspaces/routing
      - $(spacePrefix)$(rootSpacePrefix)webfrontend$(hostSuffix)
configurations:
  develop:
    build:
      dockerfile: Dockerfile.develop
      useGitIgnore: true
      args:
        BUILD_CONFIGURATION: ${BUILD_CONFIGURATION:-Debug}
    container:
      sync:
      - "**/Pages/**"
      - "**/Views/**"
      - "**/wwwroot/**"
      - "!**/*.{sln,csproj}"
      command: [dotnet, run, --no-restore, --no-build, --no-launch-profile, -c, "${BUILD_CONFIGURATION:-Debug}"]
      iterate:
        processesToKill: [dotnet, vsdbg, webfrontend]
        buildCommands:
        - [dotnet, build, --no-restore, -c, "${BUILD_CONFIGURATION:-Debug}"]

我遵循了下面的指南https://microsoft.github.io/AzureTipsAndTricks/blog/tip228.html

AZDS up正在将终结点交给我的localhost

服务'webfrontend‘端口80 (http)可通过http://localhost:50597上的端口转发获得

EN

回答 1

Stack Overflow用户

发布于 2020-05-13 18:19:09

你的azds.yaml文件入口定义是公共的'webfrontend‘域吗?

以下是使用.NET核心示例应用程序创建的示例azds.yaml文件:

代码语言:javascript
复制
kind: helm-release
apiVersion: 1.1
build:
  context: .
  dockerfile: Dockerfile
install:
  chart: charts/webfrontend
  values:
  - values.dev.yaml?
  - secrets.dev.yaml?
  set:
    replicaCount: 1
    image:
      repository: webfrontend
      tag: $(tag)
      pullPolicy: Never
    ingress:
      annotations:
        kubernetes.io/ingress.class: traefik-azds
      hosts:
        # This expands to [space.s.][rootSpace.]webfrontend.<random suffix>.<region>.azds.io
        # Customize the public URL by changing the 'webfrontend' text between the $(rootSpacePrefix) and $(hostSuffix) tokens
        # For more information see https://aka.ms/devspaces/routing
        - $(spacePrefix)$(rootSpacePrefix)webfrontend$(hostSuffix)
configurations:
  develop:
    build:
      dockerfile: Dockerfile.develop
      useGitIgnore: true
      args:
        BUILD_CONFIGURATION: ${BUILD_CONFIGURATION:-Debug}
    container:
      sync:
      - "**/Pages/**"
      - "**/Views/**"
      - "**/wwwroot/**"
      - "!**/*.{sln,csproj}"
      command: [dotnet, run, --no-restore, --no-build, --no-launch-profile, -c, "${BUILD_CONFIGURATION:-Debug}"]
      iterate:
        processesToKill: [dotnet, vsdbg]
        buildCommands:
        - [dotnet, build, --no-restore, -c, "${BUILD_CONFIGURATION:-Debug}"]

您在'azds up‘日志中看到了多少个服务日志,您是否正在查看类似于:

代码语言:javascript
复制
Service 'webfrontend' port 'http' is available at `http://webfrontend.XXX

你遵循这个指南了吗?https://docs.microsoft.com/pl-pl/azure/dev-spaces/troubleshooting#dns-name-resolution-fails-for-a-public-url-associated-with-a-dev-spaces-service

你们有最新版本的azds吗?

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61767133

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档