更新时间:2022-04-18 GMT+08:00
分享

列出APIVersions

功能介绍

This API is used to list APIversions.

URI

GET /api

请求消息

N/A.

响应消息

响应参数:

表1 describes the response parameters.

表1 参数解释

参数

参数类型

描述

kind

String

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated.

apiVersion

String

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.

serverAddressByClientCIDRs

serverAddressByClientCIDRs object

a map of client CIDR to server address that is serving this group. This is to help clients reach servers in the most network-efficient way possible. Clients can use the appropriate server address as per the CIDR that they match. In case of multiple matches, clients should use the longest matching CIDR. The server returns only those CIDRs that it thinks that the client can match. For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP. Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.

versions

Array of strings

versions are the api versions that are available.

表2 serverAddressByClientCIDRs字段数据结构说明

参数

参数类型

描述

clientCIDR

String

The CIDR with which clients can match their IP to figure out the server address that they should use.

serverAddress

String

Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.

响应示例:

{
    "kind": "APIVersions",
    "versions": [
        "v1"
    ],
    "serverAddressByClientCIDRs": [
        {
            "clientCIDR": "0.0.0.0/0",
            "serverAddress": "192.168.1.175:6443"
        }
    ]
}

状态码

表3描述API的状态码。

表3 状态码

状态码

描述

200

This operation succeeds, and a group of APIVersions resource objects is returned.

异常状态码请参见状态码

分享:

    相关文档

    相关产品

关闭导读