You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

能否通过VMware NSX-T API端点关联Tier-1网关与Edge Cluster?

NSX-T API关联Tier-1/Tier-0网关与Edge Cluster的正确方法

一、Tier-1网关与Edge Cluster的关联(API实现)

可以通过NSX-T API完成Tier-1网关与Edge Cluster的关联,操作方式如下:

  • 推荐使用Policy API(NSX-T 3.x及以上版本优先),端点为:
    PUT /policy/api/v1/infra/tier-1s/{tier-1-id}
  • 请求体中需指定edge_cluster_path字段,值为Edge Cluster的完整Policy路径(可通过GET /policy/api/v1/infra/edge-clusters获取),同时可指定故障转移模式。示例请求体:
{
  "display_name": "Tier1-Prod",
  "edge_cluster_path": "/infra/edge-clusters/edge-cluster-01",
  "failover_mode": "ACTIVE_STANDBY"
}
  • 若使用传统Manager API,端点为PUT /api/v1/logical-routers/{tier-1-router-id},请求体字段同样为edge_cluster_path,值为Edge Cluster的Manager路径,如/api/v1/edge-clusters/edge-cluster-01。

二、Tier-0网关关联Edge Cluster的错误修正

你遇到的"Json de-serialization error: property edge_cluster_path is unrecognized."错误,是因为Tier-0网关的API字段名并非edge_cluster_path,不同API版本的正确字段如下:

1. NSX-T 3.x Policy API

创建或更新Tier-0网关时,需使用edge_cluster_references数组指定关联的Edge Cluster,示例请求体:

{
  "display_name": "Tier0-Prod",
  "edge_cluster_references": [
    {
      "target_path": "/infra/edge-clusters/edge-cluster-01",
      "member_index": 0
    }
  ],
  "failover_mode": "ACTIVE_STANDBY"
}

2. 传统Manager API(NSX-T 2.x或3.x兼容模式)

创建或更新Tier-0网关时,需使用edge_cluster_member数组,示例请求体:

{
  "display_name": "Tier0-Prod",
  "edge_cluster_member": [
    {
      "edge_cluster_id": "edge-cluster-01",
      "member_index": 0
    }
  ]
}

注意事项

  • 务必确认使用的NSX-T API版本,不同版本字段定义差异较大,可通过GET /api/v1/supported-versions查询当前环境支持的API版本
  • Edge Cluster的路径/ID需准确,可通过对应API的列表接口获取(如Policy API的GET /policy/api/v1/infra/edge-clusters)
  • 关联操作前,确保网关未绑定其他Edge Cluster,否则需先移除原有关联再进行新关联

内容的提问来源于stack exchange,提问作者Rahul Rahatal

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.13 01:38:35