云容器实例 CCI-替换Ingress:请求示例

时间:2024-11-06 15:35:52

请求示例

将Ingress的servicePort由"8080"替换为"8081"。

{
  "apiVersion" : "extensions/v1beta1",
  "kind" : "Ingress",
  "metadata" : {
    "annotations" : {
      "kubernetes.io/elb.id" : "xxx",
      "kubernetes.io/elb.ip" : "192.168.137.182",
      "kubernetes.io/elb.port" : "6071"
    },
    "labels" : {
      "app" : "redis",
      "isExternal" : "true",
      "zone" : "data"
    },
    "name" : "redis"
  },
  "spec" : {
    "rules" : [ {
      "http" : {
        "paths" : [ {
          "backend" : {
            "serviceName" : "redis",
            "servicePort" : 8081
          },
          "path" : "/"
        } ]
      }
    } ]
  }
}
support.huaweicloud.com/api-cci/replaceExtensionsV1beta1NamespacedIngress.html