Reading an Ingress

Function

This API is used to query the details about a specified ingress.

URI

GET /apis/extensions/v1beta1/namespaces/{namespace}/ingresses/{name}

Table 1 Path parameters

Parameter

Description

namespace

Object name and auth scope, such as for teams and projects.

name

Name of the Ingress.

Table 2 Query parameters

Parameter

Mandatory

Description

exact

No

Should the export be exact. Exact export maintains cluster-specific fields like Namespace.

export

No

Should this value be exported. Export strips fields that a user cannot specify.

pretty

No

If 'true', then the output is pretty printed.

Request

N/A

Response

Response parameters

For the description about response parameters, see Table 110.

Example response

{
    "kind": "Ingress",
    "apiVersion": "extensions/v1beta1",
    "metadata": {
        "name": "redis",
        "namespace": "namespace-test",
        "selfLink": "/apis/extensions/v1beta1/namespaces/namespace-test/ingresses/redis",
        "uid": "7f86c310-afe8-11e8-b6ef-f898ef6c78b4",
        "resourceVersion": "5161128",
        "generation": 1,
        "creationTimestamp": "2018-09-04T02:16:14Z",
        "labels": {
            "app": "redis",
            "isExternal": "true",
            "zone": "data"
        },
        "annotations": {
            "kubernetes.io/elb.id": "2d48d034-6046-48db-8bb2-53c67e8148b5",
            "kubernetes.io/elb.ip": "192.168.137.182",
            "kubernetes.io/elb.port": "6071"
        },
        "enable": true
    },
    "spec": {
        "rules": [
            {
                "http": {
                    "paths": [
                        {
                            "path": "/",
                            "backend": {
                                "serviceName": "redis",
                                "servicePort": 8080
                            }
                        }
                    ]
                }
            }
        ]
    },
    "status": {
        "loadBalancer": {
            "ingress": [
                {
                    "ip": "192.168.137.182"
                }
            ]
        }
    }
}

Status Code

Table 3 describes the status code of this API.

Table 3 Status code

Status Code

Description

200

Success

For more status codes, see Status Codes.