当前位置:主页 > 查看内容

获取指定的Node_云容器引擎 CCE_API参考_Kubernetes API_Node

发布时间:2021-09-23 00:00| 位朋友查看

简介:功能介绍 该API用于获取指定的Node。 URI GET /api/v1/nodes/{name} 表1 描述该API的参数。 表1 参数解释 参数 是否必选 描述 pretty No If 'true', then the output is pretty printed. name Yes Name of the Node. exact No Should the export be exact. E……

功能介绍

该API用于获取指定的Node。

URI

GET /api/v1/nodes/{name}

表1描述该API的参数。

表1 参数解释

参数

是否必选

描述

pretty

No

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

name

Yes

Name of the Node.

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.

请求消息

N/A

响应消息

响应参数:

响应参数的详细描述请参见表3

响应示例:

{
    "kind": "Node",
    "apiVersion": "v1",
    "metadata": {
        "name": "192.168.0.197",
        "namespace": "default",
        "selfLink": "/api/v1/namespaces/default/nodes/192.168.0.197",
        "uid": "868ecebc-dc8e-11e7-9c19-fa163e2d897b",
        "resourceVersion": "417841",
        "creationTimestamp": "2017-12-09T03:10:35Z",
        "labels": {
            "beta.kubernetes.io/arch": "amd64",
            "beta.kubernetes.io/os": "linux",
            "kubernetes.io/hostname": "192.168.0.197",
            "os.architecture": "amd64",
            "os.name": "EulerOS_2.0_SP2",
            "os.version": "3.10.0-327.44.58.35.x86_64",
            "supportContainer": "true"
        },
        "annotations": {
            "alpha.kubernetes.io/provided-node-ip": "192.168.0.197",
            "node.alpha.kubernetes.io/ttl": "0"
        },
        "enable": true
    },
    "spec": {
        "externalID": "192.168.0.197",
        "loginSecret": {},
        "schedulerHints": {}
    },
    "status": {
        "capacity": {
            "cpu": "2",
            "memory": "3744212Ki",
            "pods": "110"
        },
        "allocatable": {
            "cpu": "2",
            "memory": "3641812Ki",
            "pods": "110"
        },
        "phase": "Running",    #该字段仅支持1.15及以下版本的集群
        "conditions": [
            {
                "type": "OutOfDisk",
                "status": "False",
                "lastHeartbeatTime": "2017-12-13T03:05:57Z",
                "lastTransitionTime": "2017-12-09T03:10:35Z",
                "reason": "KubeletHasSufficientDisk",
                "message": "kubelet has sufficient disk space available"
            },
            {
                "type": "MemoryPressure",
                "status": "False",
                "lastHeartbeatTime": "2017-12-13T03:05:57Z",
                "lastTransitionTime": "2017-12-09T03:10:35Z",
                "reason": "KubeletHasSufficientMemory",
                "message": "kubelet has sufficient memory available"
            },
            {
                "type": "NetworkCardNotFound",
                "status": "False",
                "lastHeartbeatTime": "2017-12-13T03:05:57Z",
                "lastTransitionTime": "2017-12-09T03:10:35Z",
                "reason": "NetworkCardFound",
                "message": "network card has found"
            },
            {
                "type": "DiskPressure",
                "status": "False",
                "lastHeartbeatTime": "2017-12-13T03:05:57Z",
                "lastTransitionTime": "2017-12-09T03:10:35Z",
                "reason": "KubeletHasNoDiskPressure",
                "message": "kubelet has no disk pressure"
            },
            {
                "type": "Ready",
                "status": "True",
                "lastHeartbeatTime": "2017-12-13T03:05:57Z",
                "lastTransitionTime": "2017-12-09T03:10:35Z",
                "reason": "KubeletReady",
                "message": "kubelet is posting ready status"
            }
        ],
        "addresses": [
            {
                "type": "InternalIP",
                "address": "192.168.0.197"
            },
            {
                "type": "Hostname",
                "address": "192.168.0.197"
            },
            {
                "type": "DataIP",
                "address": "192.168.0.197"
            }
        ],
        "daemonEndpoints": {
            "kubeletEndpoint": {
                "Port": 10250
            }
        },
        "nodeInfo": {
            "machineID": "6f7a744cc4094fea9ed9558f18f59093",
            "systemUUID": "E73BC002-0E0C-4166-8321-6FE46B5AD12D",
            "bootID": "747fd7db-1e6c-400b-a703-a1f43371f56f",
            "kernelVersion": "3.10.0-327.44.58.35.x86_64",
            "osImage": "EulerOS 2.0 (SP2)",
            "containerRuntimeVersion": "docker://1.11.2",
            "kubeletVersion": "v1.7.3-r13",
            "kubeProxyVersion": "v1.7.3-r13",
            "operatingSystem": "linux",
            "architecture": "amd64"
        },
        "images": [
            {
                "names": [
                    "canal-agent:2.5.T3.B020",
                    "canal-agent:latest"
                ],
                "sizeBytes": 461728195
            },
            {
                "names": [
                    "cfe-kubedns-amd64:2.11.25"
                ],
                "sizeBytes": 334909612
            },
            {
                "names": [
                    "cfe-exechealthz-amd64:2.11.25"
                ],
                "sizeBytes": 326663593
            },
            {
                "names": [
                    "cfe-kube-dnsmasq-amd64:2.11.25"
                ],
                "sizeBytes": 325558483
            },
            {
                "names": [
                    "euleros:2.2.5"
                ],
                "sizeBytes": 288596478
            },
            {
                "names": [
                    "10.125.5.235:20202/test/apache-php:latest"
                ],
                "sizeBytes": 244663227
            },
            {
                "names": [
                    "10.125.5.235:20202/test/redis:latest",
                    "10.125.5.235:20202/test/redis:v1"
                ],
                "sizeBytes": 109208225
            },
            {
                "names": [
                    "172.16.5.235:20202/test-01/mysql:v1"
                ],
                "sizeBytes": 108362139
            },
            {
                "names": [
                    "cfe-pause:2.11.25"
                ],
                "sizeBytes": 350164
            }
        ],
        "nodeState": {},
        "hostname": "node-v17.novalocal"
    }
}

状态码

表2描述API的状态码。

表2 状态码

状态码

描述

200

This operation succeeds, and a Node resource object is returned.

异常状态码请参见状态码


本站部分内容转载于网络,版权归原作者所有,转载之目的在于传播更多优秀技术内容,如有侵权请联系QQ/微信:153890879删除,谢谢!
上一篇:AttachInstances - 弹性伸缩 下一篇:没有了

推荐图文

  • 周排行
  • 月排行
  • 总排行

随机推荐