【Container App】部署Contianer App 遇见 Failed to deploy new revision: The Ingress's TargetPort or ExposedPort must be specified for TCP apps.

简介: Failed to deploy new revision: The Ingress's TargetPort or ExposedPort must be specified for TCP apps.

问题描述

在部署Contianer App时候,遇见Failed to deploy new revision: The Ingress's TargetPort or ExposedPort must be specified for TCP apps.

回到Container App的门户,然后修改操作都会触发报错。均提示 The Ingress's TargetPort or ExposedPort must be specified for TCP apps. 信息。

这是什么情况呢?

问题解答

根据提示信息 :The Ingress's TargetPort or ExposedPort must be specified for TCP apps.

当 Container App 的 Ingress 设置为TCP时,必须同时指定 TargetPort 和 ExposedPort 。

  • Target port (与容器中应用通信的端口) : This is the port your container is listening on that will receive traffic. Set this value to the port number that your container uses. For HTTP ingress, your application ingress endpoint will always be exposed on port 443. For TCP ingress, configure the exposed port to customize your application ingress endpoint.
  • Exposed port (暴露给外部用户访问的端口): This is the port that other applications will use to connect to your TCP application.

因为使用HTTP Ingress Type的时候,exposed不需要配置,因为它只会使用80/443端口,但是TCP ingress时,需要指定对外部用户暴露的端口。

而在部署 Container App的新版本时候遇见错误的原因就是在Ingress页面从HTTP 修改为 TCP时, 这个页面中对 Exposed Port 字段没有必填验证,从而导致后后续无法对Container App做任何更新操作。

当为TCP ingress type指定了一个端口后 (可以指定与 target port相同的值),问题得到解决。

参考资料

Target port missing error while port is present : https://github.com/hashicorp/terraform-provider-azurerm/issues/26902#issuecomment-2264426370



当在复杂的环境中面临问题,格物之道需:浊而静之徐清,安以动之徐生。 云中,恰是如此!

相关文章
|
域名解析 网络协议 API
【Azure Container App】配置容器应用的缩放规则 Managed Identity 连接中国区 Azure Service Bus 问题
本文介绍了在 Azure Container Apps 中配置基于自定义 Azure Service Bus 的自动缩放规则时,因未指定云环境导致的域名解析错误问题。解决方案是在扩展规则中添加 `cloud=AzureChinaCloud` 参数,以适配中国区 Azure 环境。内容涵盖问题描述、原因分析、解决方法及配置示例,适用于使用 KEDA 实现事件驱动自动缩放的场景。
253 1
|
12月前
|
Java Shell Maven
【Azure Container App】构建Java应用镜像时候遇无法编译错误:ERROR [build 10/10] RUN ./mvnw.cmd dependency:go-offline -B -Dproduction package
在部署Java应用到Azure Container App时,构建镜像过程中出现错误:“./mvnw.cmd: No such file or directory”。尽管项目根目录包含mvnw和mvnw.cmd文件,但依然报错。问题出现在Dockerfile构建阶段执行`./mvnw dependency:go-offline`命令时,系统提示找不到可执行文件。经过排查,确认是mvnw文件内容异常所致。最终通过重新生成mvnw文件解决该问题,镜像成功构建。
669 1
|
容器
【Azure Container App】在消耗性的Container App Environmnet中无法查看当时正在使用多少CPU多少实例数的替代方案
在 Azure Container Apps 中使用 Consumption 消耗型环境时,无法通过门户查看当前核心 (CPU) 和实例使用情况。这是因为消耗型工作负载配置文件的设计所致。若需查看使用状态,可使用 az cli 命令 `az containerapp env list-usages` 获取详细信息,包括 Current Cores 数量。文档还提供了参考资料链接以帮助用户深入了解相关命令用法。
288 17
|
JavaScript API
【Azure Function】Function App门户上的Test/Run返回错误:Failed to fetch
Running your function in portal requires the app to explicitly accept requests from https://portal.azure.cn. This is known as cross-origin resource sharing (CORS).Configure CORS to add https://portal.azure.cn to allowed origins.
498 7
|
缓存 容器 Perl
【Azure Container App】Container Apps 设置延迟删除 (terminationGracePeriodSeconds) 的解释
terminationGracePeriodSeconds : 这个参数的定义是从pod收到terminated signal到最终shutdown的最大时间,这段时间是给pod中的application 缓冲时间用来处理链接关闭,应用清理缓存的;并不是从idel 到 pod被shutdown之间的时间;且是最大时间,意味着如果application 已经gracefully shutdown,POD可能被提前terminated.
471 3
|
存储 Linux 网络安全
【Azure App Service】.NET代码实验App Service应用中获取TLS/SSL 证书 (App Service Linux/Linux Container)
【Azure App Service】.NET代码实验App Service应用中获取TLS/SSL 证书 (App Service Linux/Linux Container)
361 0
|
9月前
|
缓存 移动开发 JavaScript
如何优化UniApp开发的App的启动速度?
如何优化UniApp开发的App的启动速度?
1497 139
|
9月前
|
移动开发 JavaScript weex
UniApp开发的App在启动速度方面有哪些优势和劣势?
UniApp开发的App在启动速度方面有哪些优势和劣势?
664 137
|
9月前
|
数据采集 JavaScript 前端开发
开发比分App?你缺的不是程序员
开发体育比分App,关键不在代码,而在懂体育、懂数据、懂用户。明确定位、理清需求、选好数据源,再找专业的产品、数据与技术人才协同,才能少走弯路。程序员最后入场,效率最高。
376 154

热门文章

最新文章