智能边缘平台 IEF-创建部署:请求示例

时间:2024-04-15 09:12:47

请求示例

创建部署,应用部署到指定节点,容器网络为主机网络。

{
  "name" : "app",
  "description" : "this is a test app",
  "node_ids" : [ "9ebd8efb-9fdd-44a1-abda-9cdbc287a867" ],
  "tags" : [ {
    "key" : "app",
    "value" : "test"
  } ],
  "deployment" : {
    "replicas" : 1,
    "template" : {
      "configs" : {
        "host_network" : true,
        "host_pid" : true,
        "restart_policy" : "Always",
        "toleration_seconds" : 300
      },
      "containers" : [ {
        "name" : "container-0",
        "image_url" : "nginx:alpine",
        "resources" : {
          "limits" : {
            "cpu" : "0.25",
            "memory" : "500"
          },
          "requests" : {
            "cpu" : "0.25",
            "memory" : "500"
          }
        }
      } ]
    }
  }
}
support.huaweicloud.com/api-ief/CreateDeployments.html