# Obtain cluster information - DescribeUK8SCluster

## Overview

Obtain cluster information






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `DescribeUK8SCluster`.                      | **Yes** |
| **PublicKey**  | string  | The user's public key can be obtained from [Console](https://console.netlake.cn/uaccount/api_manage)                                             | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Region** | string | Belonging Area |**Yes**|
| **ProjectId** | string | Project ID |No|
| **ClusterId** | string | k8s Cluster ID |**Yes**|

### Response Field

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **RetCode** | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. |**Yes**|
| **Action** | string | Operation command name. |**Yes**|
| **Message** | string | Returns an error message, providing detailed description when `RetCode` is non-zero. |No|
| **ClusterName** | string | Resource Name |**Yes**|
| **ClusterId** | string | Cluster ID |**Yes**|
| **VPCId** | string | Belonging VPC |**Yes**|
| **SubnetId** | string | Subnet Ownership |**Yes**|
| **PodCIDR** | string | Pod Network |**Yes**|
| **ServiceCIDR** | string | Service Network Segment |**Yes**|
| **MasterCount** | int | Master Node Quantity |**Yes**|
| **MasterList** | array[[*UhostInfo*](#uhostinfo)] | Configuration information for the Master node, refer to UhostInfo for specifics. This information is not returned for the hosted version. |No|
| **NodeList** | array[[*UhostInfo*](#uhostinfo)] | Configuration information of Node, refer to UhostInfo for details. |No|
| **CreateTime** | int | Creation Time |No|
| **NodeCount** | int | Number of Node Nodes |No|
| **ApiServer** | string | Cluster apiserver address |No|
| **Status** | string | Status |No|
| **ExternalApiServer** | string | External apiserver address of the cluster |No|
| **KubeProxy** | [*KubeProxy*](#kubeproxy) | kube-proxy configuration |No|
| **Version** | string | K8S Version |No|
| **ClusterDomain** | string | Custom or default clusterdomain |No|
| **EtcdCert** | string | Cluster etcd service certificate |No|
| **EtcdKey** | string | etcd Service Key for Cluster |No|
| **CACert** | string | Cluster CA Root Certificate |No|
| **MasterResourceStatus** | string | Master Configuration Alerts: Normal is normal;<br />Warning requires an upgrade;<br />Error requires an urgent upgrade; |No|
| **CNIMode** | string | CNI mode, options VPC/Calico |No|
| **MonitorType** | string | Types of cluster monitoring: no for no monitoring; cloudwatch for unified monitoring platform; prometheus for built-in monitoring. |No|
| **Autoscaler** | [*Autoscaler*](#autoscaler) | Cluster Node Autoscaling (CA) Configuration |No|
| **EnableUserAuth** | boolean | Whether the authorization management feature is enabled |No|
| **DedicatedPodSubnet** | boolean | Pod use Dedicated subnet or not |No|
| **PodSubnetIds** | array[string] | List of subnets in pod dedicated subnet mode |No|
| **DeleteProtection** | int | Deletion protection switch. 0 means disabled, 1 means enabled. Disabled by default. |No|
| **PodSubnetSecGroups** | array[string] | Security groups use by pod under dedicated subnet mode |No|
| **NodeCIDR** | string | CIDR block used for cluster nodes or node-side networking |No|
| **ExternalUlb** | string | Resource ID of the external load balancer used by the API Server |No|
| **InternalUlb** | string | Resource ID of the internal load balancer used by the API Server |No|
| **UpdateTime** | int | Cluster update time |No|
| **LbClass** | string | Class of load balancer used by the cluster |No|
| **RuntimeName** | string | Container Runtime Name |No|
| **RuntimeVersion** | string | Container Runtime Version |No|
| **ClusterType** | string | Cluster Type |No|
| **LoopbackClientCert** | [*LoopbackClientCert*](#loopbackclientcert) | API Server Loopback Client Cert |No|

#### Data Model


#### UhostInfo

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Zone** | string | Located Data Center |**Yes**|
| **Name** | string | Host Name |**Yes**|
| **CPU** | int | Cpu Quantity |**Yes**|
| **Memory** | int | UMem |**Yes**|
| **IPSet** | array[[*IPSet*](#ipset)] | Node IP Information |**Yes**|
| **DiskSet** | array[[*DiskSet*](#diskset)] | Node Disk Information |**Yes**|
| **NodeId** | string | Host ID |**Yes**|
| **OsName** | string | Image Information |**Yes**|
| **CreateTime** | int | Creation Time |**Yes**|
| **ExpireTime** | int | Expiration Date |**Yes**|
| **State** | string | Host Status |**Yes**|
| **NodeType** | string | Node Type: 'uhost' represents cloud host; 'uphost' represents physical cloud host. |**Yes**|
| **GPU** | int | GPU number |**Yes**|
| **GpuType** | string | GPU 型号 |**Yes**|
| **BasicImageName** | string | Basic Image Name |**Yes**|
| **OsType** | string | Os Type |**Yes**|
| **TotalDiskSpace** | int | Total Disk Space |**Yes**|
| **MachineType** | string |  |**Yes**|
| **SecGroupId** | array[[*SecGroupId*](#secgroupid)] | SecGroup Ids |**Yes**|

#### KubeProxy

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Mode** | string | KubeProxy mode, enumeration values are [ipvs, iptables] |No|

#### Autoscaler

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **ScaleDownUnneededTime** | string | Shrinkage Trigger Delay |**Yes**|
| **ScaleDownUtilizationThreshold** | string | Shrinkage Threshold |**Yes**|
| **ScaleDownDelayAfterAdd** | string | Silent Period |**Yes**|
| **Enabled** | int | Turn On/Off |**Yes**|
| **Version** | string | Scaler Version |**Yes**|
| **UpdateTime** | int |  |**Yes**|
| **ScaleDownGpuUtilizationThreshold** | string |  |**Yes**|

#### LoopbackClientCert

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **ExpireTime** | int | ExpireTime |No|
| **Warn** | boolean | Warn |No|

#### IPSet

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Type** | string | International: International, BGP: Bgp, Private Network: Private |No|
| **IPId** | string | Resource ID of IP (No corresponding resource ID for internal IP) |No|
| **IP** | string | IP Address |No|
| **Bandwidth** | int | Bandwidth corresponding to the IP, unit: Mb (Bandwidth information is not displayed for internal IP) |No|
| **Default** | string | Information of whether it is the default elastic network card. true: It is the default elastic network card; other values: No. |No|
| **IPMode** | string | IP Mode |No|
| **VPCId** | string | VPC Id |No|
| **SubnetId** | string | Subnet Id |No|
| **Mac** | string | MAC Address |No|
| **NetworkInterfaceId** | string | Network Interface Id |No|

#### DiskSet

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Type** | string | Disk Type. System Disk: Boot, Data Disk: Data, Network Disk: Udisk |No|
| **DiskId** | string | Long Disk ID |No|
| **Name** | string | UDisk Name (only returned when the disk is UDisk) |No|
| **Drive** | string | Disk Drive Letter |No|
| **Size** | int | Disk size, unit: GB |No|
| **BackupType** | string | Backup plan, enumeration type: BASIC_SNAPSHOT, ordinary snapshot; DATAARK, Ark. If there is no snapshot, this field will not be returned. |No|
| **IOPS** | int | The current IOPS value of the host |No|
| **Encrypted** | string | Yes: Encrypted No: Unencrypted |No|
| **DiskType** | string | LOCAL_NORMAL\| CLOUD_NORMAL\| LOCAL_SSD\| CLOUD_SSD\|EXCLUSIVE_LOCAL_DISK |No|
| **IsBoot** | string | True\| False |No|

#### SecGroupId

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Id** | string | Security Group Name |No|
| **Name** | string | Security Group ID |No|
| **Priority** | string | Security Group Priority |No|

## Example

### Request Example
    
```
https://api.netlake.cn/?Action=DescribeUK8SCluster
&Region=zfXlbPNP
&Zone=dSenpJQB
&ClusterID=kCvoCLjV
```

### Response Example
    
```json
{
  "Action": "DescribeUK8SClusterResponse",
  "Autoscaler": {},
  "CACert": "bgsgUSSj",
  "CNIMode": "lhkRDcNM",
  "ClusterDomain": "TrnBlMmf",
  "DedicatedPodSubnet": true,
  "DeleteProtection": 5,
  "EnableUserAuth": true,
  "EtcdCert": "KfWoZCox",
  "EtcdKey": "fcwdvzzi",
  "ExternalApiServer": "GVZVJyHy",
  "KubeProxy": {},
  "MasterResourceStatus": "BBlivSsQ",
  "MonitorType": "XjdGMetb",
  "PodSubnetIds": [
    "zVCBFDyV"
  ],
  "PodSubnetSecGroups": [
    "nOXEdkfR"
  ],
  "RetCode": 0,
  "UserAuthable": false,
  "Version": "JSrvWaDf"
}
```





