View cluster details
Requests
HTTP request
GET /apis/platform.tkestack.io/v1/clusters/{name}
read the specified Cluster
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | True | name of the Cluster |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| exact | boolean | False | Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18. |
| export | boolean | False | Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18. |
| pretty | string | False | If 'true', then the output is pretty printed. |
Responses
Content-Type
application/json,
application/yaml,
application/vnd.kubernetes.protobuf
Status code: 200
OK
Sample response
Cluster is a Kubernetes cluster in
{
"apiVersion": "platform.tkestack.io/v1",
"kind": "Cluster",
"metadata": {
"annotations": {
"cpaas.io/network-type": "kube-ovn",
"platform.tkestack.io/galaxy-ipam-ip": "10.96.0.8",
"platform.tkestack.io/gpu-quota-admission-ip": "10.96.0.9"
},
"creationTimestamp": "2021-06-21T04:10:33Z",
"labels": {
"cluster-type": "Baremetal",
"cpaas.io/arch": "amd64"
},
"name": "global",
"resourceVersion": "11982192",
"selfLink": "/apis/platform.tkestack.io/v1/clusters/global",
"uid": "6cc56a49-8ac3-45ea-916c-10fb67b9472b"
},
"spec": {
"clusterCIDR": "10.199.0.0/16",
"clusterCredentialRef": {
"name": "cc-global"
},
"displayName": "Global",
"dnsDomain": "cluster.local",
"etcd": {
"local": {
"dataDir": "/var/lib/etcd",
"serverCertSANs": [
"etcd",
"etcd.kube-system",
"192.168.0.100"
]
}
},
"features": {
"enableMasterSchedule": true,
"files": [
{
"dst": "/etc/kubernetes/audit/policy.yaml",
"src": "/app/provider/baremetal/audit/policy.yaml"
}
],
"ha": {
"thirdParty": {
"vip": "192.168.0.100",
"vport": 6443
}
},
"ipvs": true,
"skipConditions": [
"EnsureGalaxy",
"EnsureNvidiaDriver",
"EnsureKubernetesImages",
"EnsureMetricsServer"
],
"upgrade": {
"mode": "Auto",
"strategy": {
"drainNodeBeforeUpgrade": false,
"maxUnready": 0
}
}
},
"finalizers": [
"cluster"
],
"kubeletExtraArgs": {
"max-pods": "110"
},
"machines": [
{
"displayName": "",
"ip": "192.168.0.101",
"ipv6": "",
"labels": {
"node-role.kubernetes.io/master": "",
"nvidia-device-enable": "false"
},
"networkDevice": "",
"port": 22,
"proxy": {},
"publicIP": "",
"role": "",
"username": "root"
},
{
"displayName": "",
"ip": "192.168.0.102",
"ipv6": "",
"labels": {
"node-role.kubernetes.io/master": "",
"nvidia-device-enable": "false"
},
"networkDevice": "",
"port": 22,
"proxy": {},
"publicIP": "",
"role": "",
"username": "root"
},
{
"displayName": "",
"ip": "192.168.0.102",
"ipv6": "",
"labels": {
"node-role.kubernetes.io/master": "",
"nvidia-device-enable": "false"
},
"networkDevice": "",
"port": 22,
"proxy": {},
"publicIP": "",
"role": "",
"username": "root"
}
],
"networkDevice": "eth0",
"properties": {
"maxNodePodNum": 256
},
"publicAlternativeNames": [
"192.168.0.101",
"192.168.0.102",
"192.168.0.103",
"192.168.0.100"
],
"serviceCIDR": "10.96.0.0/12",
"tenantID": "default",
"type": "Baremetal",
"version": "1.19.9"
},
"status": {
"addresses": [
{
"host": "192.168.0.101",
"path": "",
"port": 6443,
"type": "Real"
},
{
"host": "192.168.0.102",
"path": "",
"port": 6443,
"type": "Real"
},
{
"host": "192.168.0.103",
"path": "",
"port": 6443,
"type": "Real"
},
{
"host": "192.168.0.100",
"path": "",
"port": 6443,
"type": "Advertise"
}
],
"clusterCIDR": "10.199.0.0/16",
"conditions": [
{
"lastProbeTime": "2021-07-01T07:58:26Z",
"lastTransitionTime": "2021-06-29T02:15:58Z",
"status": "True",
"type": "HealthCheck"
}
],
"dnsIP": "10.96.0.10",
"nodeCIDRMaskSize": 24,
"phase": "Running",
"resource": {},
"serviceCIDR": "10.96.0.0/12",
"version": "1.19.9"
}
}Parameters
| Name | Type | Description |
|---|---|---|
| apiVersion | string | See common parameters |
| kind | string | See common parameters |
| metadata | object | See common parameters |
| spec | object |
ClusterSpec is a description of a cluster.
Path: spec |
| spec.clusterCIDR | string |
ClusterCIDR is used to set a separated CIDR for k8s pod
Path: spec.clusterCIDR |
| spec.clusterCredentialRef | object |
LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
Path: spec.clusterCredentialRef |
| clusterCredentialRef.name | string |
Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
Path: spec.clusterCredentialRef.name |
| spec.displayName | string |
DisplayName is the display name of the cluster.
Path: spec.displayName |
| spec.dnsDomain | string |
DNSDomain is the dns domain used by k8s services. Defaults to "cluster.local".
Path: spec.dnsDomain |
| spec.etcd | object |
Etcd contains elements describing Etcd configuration.
Path: spec.etcd |
| etcd.local | object |
LocalEtcd describes that kubeadm should run an etcd cluster locally
Path: spec.etcd.local |
| local.dataDir | string |
DataDir is the directory etcd will place its data. Defaults to "/var/lib/etcd".
Path: spec.etcd.local.dataDir |
| local.serverCertSANs | array |
ServerCertSANs sets extra Subject Alternative Names for the etcd server signing cert.
Path: spec.etcd.local.serverCertSANs |
| local.serverCertSANs[] | string |
Path: spec.etcd.local.serverCertSANs[] |
| spec.features | object |
ClusterFeature records the features that are enabled by the cluster.
Path: spec.features |
| features.enableMasterSchedule | boolean |
enable master node schedule or not
Path: spec.features.enableMasterSchedule |
| features.files | array |
files
Path: spec.features.files |
| features.files[] | object |
Path: spec.features.files[] |
| files[].dst | string |
destination file, only support regular file
Path: spec.features.files[].dst |
| files[].src | string |
source file, only support regular file
Path: spec.features.files[].src |
| features.ha | object |
Path: spec.features.ha |
| ha.thirdParty | object |
Path: spec.features.ha.thirdParty |
| thirdParty.vip | string |
virtual IP of the HA
Path: spec.features.ha.thirdParty.vip |
| thirdParty.vport | integer (int32) |
virtual port of the HA
Path: spec.features.ha.thirdParty.vport |
| features.ipvs | boolean |
ipvs on-off
Path: spec.features.ipvs |
| features.skipConditions | array |
SkipConditions is a set of conditions that needs to be skipped
Path: spec.features.skipConditions |
| features.skipConditions[] | string |
Path: spec.features.skipConditions[] |
| features.upgrade | object |
Path: spec.features.upgrade |
| upgrade.mode | string |
Upgrade mode, default value is Auto.
Path: spec.features.upgrade.mode |
| upgrade.strategy | object |
UpgradeStrategy used to control the upgrade process.
Path: spec.features.upgrade.strategy |
| strategy.drainNodeBeforeUpgrade | boolean |
Whether drain node before upgrade. Draining node before upgrade is recommended. But not all pod running as cows, a few running as pets. If your pod can not accept be expelled from current node, this value should be false.
Path: spec.features.upgrade.strategy.drainNodeBeforeUpgrade |
| strategy.maxUnready | string (int-or-string) |
IntOrString is a type that can hold an int32 or a string. When used in JSON or YAML marshalling and unmarshalling, it produces or consumes the inner type. This allows you to have, for example, a JSON field that can accept a name or number.
Path: spec.features.upgrade.strategy.maxUnready |
| spec.finalizers | array |
Finalizers is an opaque list of values that must be empty to permanently remove object from storage.
Path: spec.finalizers |
| spec.finalizers[] | string |
Path: spec.finalizers[] |
| spec.kubeletExtraArgs | object |
kubelet extra arguments
Path: spec.kubeletExtraArgs |
| spec.machines | array |
cluster machine, represent master nodes in the cluster
Path: spec.machines |
| spec.machines[] | object |
ClusterMachine is the master machine definition of cluster.
Path: spec.machines[] |
| machines[].displayName | string |
displayName
Path: spec.machines[].displayName |
| machines[].ip | string |
Path: spec.machines[].ip |
| machines[].ipv6 | string |
ipv6
Path: spec.machines[].ipv6 |
| machines[].labels | object |
Path: spec.machines[].labels |
| machines[].networkDevice | string |
networkDevice
Path: spec.machines[].networkDevice |
| machines[].port | integer (int32) |
Path: spec.machines[].port |
| machines[].proxy | object |
MachineProxy is the proxy to connect Machine's ssh.
Path: spec.machines[].proxy |
| machines[].publicIP | string |
publicIP
Path: spec.machines[].publicIP |
| machines[].role | string |
master/node
Path: spec.machines[].role |
| machines[].username | string |
Path: spec.machines[].username |
| spec.networkDevice | string |
network device
Path: spec.networkDevice |
| spec.properties | object |
ClusterProperty records the attribute information of the cluster.
Path: spec.properties |
| properties.maxNodePodNum | integer (int32) |
max number of node pod
Path: spec.properties.maxNodePodNum |
| spec.publicAlternativeNames | array |
public alternative names
Path: spec.publicAlternativeNames |
| spec.publicAlternativeNames[] | string |
Path: spec.publicAlternativeNames[] |
| spec.serviceCIDR | string |
ServiceCIDR is used to set a separated CIDR for k8s service, it's exclusive with MaxClusterServiceNum.
Path: spec.serviceCIDR |
| spec.tenantID | string |
tenant id
Path: spec.tenantID |
| spec.type | string |
cluster type, baremetal or imported
Path: spec.type |
| spec.version | string |
cluster version
Path: spec.version |
| status | object |
ClusterStatus represents information about the status of a cluster.
Path: status |
| status.addresses | array |
List of addresses reachable to the cluster.
Path: status.addresses |
| status.addresses[] | object |
ClusterAddress contains information for the cluster's address.
Path: status.addresses[] |
| addresses[].host | string |
The cluster address.
Path: status.addresses[].host |
| addresses[].path | string |
path
Path: status.addresses[].path |
| addresses[].port | integer (int32) |
port
Path: status.addresses[].port |
| addresses[].type | string |
Cluster address type, one of Public, ExternalIP or InternalIP.
Path: status.addresses[].type |
| status.clusterCIDR | string |
ClusterCIDR is used to set a separated CIDR for k8s pod
Path: status.clusterCIDR |
| status.conditions | array |
cluster conditions
Path: status.conditions |
| status.conditions[] | object |
ClusterCondition contains details for the current condition of this cluster.
Path: status.conditions[] |
| conditions[].lastProbeTime | string (date-time) |
Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.
Path: status.conditions[].lastProbeTime |
| conditions[].lastTransitionTime | string (date-time) |
Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.
Path: status.conditions[].lastTransitionTime |
| conditions[].status | string |
Status is the status of the condition. Can be True, False, Unknown.
Path: status.conditions[].status |
| conditions[].type | string |
Type is the type of the condition.
Path: status.conditions[].type |
| status.dnsIP | string |
dns ip
Path: status.dnsIP |
| status.nodeCIDRMaskSize | integer (int32) |
node CIDR mask size
Path: status.nodeCIDRMaskSize |
| status.phase | string |
cluster phase
Path: status.phase |
| status.resource | object |
ClusterResource records the current available and maximum resource quota information for the cluster.
Path: status.resource |
| status.serviceCIDR | string |
ServiceCIDR is used to set a separated CIDR for k8s service, it's exclusive with MaxClusterServiceNum.
Path: status.serviceCIDR |
| status.version | string |
cluster version
Path: status.version |