文档首页 > > API参考> Kubernetes API> API groups> 列出APIVersions

列出APIVersions

分享
更新时间:2020/05/26 GMT+08:00

功能介绍

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.

异常状态码请参见状态码

分享:

    相关文档

    相关产品

文档是否有解决您的问题?

提交成功!非常感谢您的反馈,我们会继续努力做到更好!
反馈提交失败,请稍后再试!

*必选

请至少选择或填写一项反馈信息

字符长度不能超过200

提交反馈 取消

如您有其它疑问,您也可以通过华为云社区问答频道来与我们联系探讨

智能客服提问云社区提问