更新指定Namespace下的某个Ingress对象的状态
功能介绍
This API is used to partially update status of the specified Ingress.
其中以下字段支持更新:
status.loadBalancer
URI
PATCH /apis/networking.k8s.io/v1beta1/namespaces/{namespace}/ingresses/{name}/status (Supports 1.15 and 1.15+)
PATCH /apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}/status (Supports 1.15-)
表1描述该API的参数。
参数 |
是否必选 |
描述 |
---|---|---|
name |
Yes |
name of the Ingress |
namespace |
Yes |
Object name and auth scope, such as for teams and projects. |
pretty |
No |
If 'true', then the output is pretty printed. |
body |
Yes |
- |
请求消息
请求参数:
请求参数的详细描述请参见表2。
“Content-Type”的详细描述请参见 PATCH请求方法操作说明。
请求示例:
Content-Type: application/merge-patch+json { "status": { "loadBalancer": { "ingress": [ { "ip": "10.154.199.81", "hostname": "testaa" } ] } } }
响应示例:
{ "kind": "Ingress", "apiVersion": "extensions/v1beta1", "metadata": { "name": "ingress-test", "namespace": "default", "selfLink": "/apis/extensions/v1beta1/namespaces/default/ingresses/ingress-test/status", "uid": "29817662-7adb-11e8-a5f8-fa163e458c2a", "resourceVersion": "1498365", "generation": 3, "creationTimestamp": "2018-06-28T13:57:14Z", "labels": { "isExternal": "true", "zone": "data" }, "annotations": { "kubernetes.io/ingress.class": "public-elb", "protocol": "HTTP", "ingress.beta.kubernetes.io/role": "data", "ingress.kubernetes.io/secure-backends": "false", "kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"extensions/v1beta1\",\"kind\":\"Ingress\",\"metadata\":{\"annotations\":{\"ingress.beta.kubernetes.io/role\":\"data\",\"ingress.kubernetes.io/secure-backends\":\"false\",\"kubernetes.io/elb.id\":\"203e27c4-ceaa-4bca-b652-6947f77d1ce0\",\"kubernetes.io/elb.ip\":\"10.154.199.81\",\"kubernetes.io/elb.port\":\"80\",\"kubernetes.io/ingress.class\":\"public-elb\",\"protocol\":\"HTTP\"},\"labels\":{\"isExternal\":\"true\",\"zone\":\"data\"},\"name\":\"ingress-test\",\"namespace\":\"default\"},\"spec\":{\"rules\":[{\"host\":\"test1\",\"http\":{\"paths\":[{\"backend\":{\"serviceName\":\"ingress-test\",\"servicePort\":8086},\"path\":\"/sssss\",\"property\":{\"ingress.beta.kubernetes.io/url-match-mode\":\"STARTS_WITH\"}}]}}]}}\n", "kubernetes.io/elb.id": "203e27c4-ceaa-4bca-b652-6947f77d1ce0", "kubernetes.io/elb.ip": "10.154.199.81", "kubernetes.io/elb.port": "80" } }, "spec": { "rules": [ { "host": "agaaaa", "http": { "paths": [ { "path": "/sssss", "backend": { "serviceName": "test", "servicePort": 8080 }, "property": { "ingress.beta.kubernetes.io/url-match-mode": "STARTS_WITH" } } ] } } ] }, "status": { "loadBalancer": { "ingress": [ { "ip": "10.154.199.81", "hostname": "testaa" } ] } } }
