Table: alicloud_cs_kubernetes_cluster_node - Query Alibaba Cloud Container Service Kubernetes Cluster Nodes using SQL
Alibaba Cloud Container Service for Kubernetes (ACK) is a fully-managed service compatible with Kubernetes to help users focus on their applications rather than managing container infrastructure. It provides out-of-the-box Kubernetes native capabilities, simplifies the deployment of Kubernetes clusters, and offers high-performance and flexible management of containerized applications throughout their lifecycle.
Table Usage Guide
The alicloud_cs_kubernetes_cluster_node
table provides insights into Kubernetes Cluster Nodes within Alibaba Cloud Container Service (ACK). As a DevOps engineer or system administrator, you can explore node-specific details through this table, including configuration, status, and associated metadata. Utilize it to monitor the health and performance of your nodes, track resource usage, and manage your containerized applications more effectively.
Examples
Basic info
Explore the status and details of your Kubernetes nodes within the Alibaba Cloud Container Service. This allows you to monitor your infrastructure and identify any potential issues or changes.
select node_name, cluster_id, state, creation_time, instance_idfrom alicloud_cs_kubernetes_cluster_node;
select node_name, cluster_id, state, creation_time, instance_idfrom alicloud_cs_kubernetes_cluster_node;
List worker nodes
Identify instances where the role of a node in a Kubernetes cluster is 'Worker'. This allows you to quickly determine which nodes are performing worker tasks within your cluster.
select node_name, instance_id, instance_name, instance_rolefrom alicloud_cs_kubernetes_cluster_nodewhere instance_role = 'Worker';
select node_name, instance_id, instance_name, instance_rolefrom alicloud_cs_kubernetes_cluster_nodewhere instance_role = 'Worker';
Count the number of nodes per instance
Determine the distribution of nodes across different instances in your Kubernetes cluster. This can help identify any uneven distribution and manage workload balancing effectively.
select instance_id, count(*) as node_countfrom alicloud_cs_kubernetes_cluster_nodegroup by instance_id;
select instance_id, count(*) as node_countfrom alicloud_cs_kubernetes_cluster_nodegroup by instance_id;
Schema for alicloud_cs_kubernetes_cluster_node
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The Alicloud Account ID in which the resource is located. |
akas | jsonb | Array of globally unique identifier strings (also known as) for the resource. | |
cluster_id | text | = | The ID of the cluster that the node pool belongs to. |
creation_time | timestamp with time zone | The time when the node was created. | |
error_message | text | The error message generated when the node was created. | |
expired_time | timestamp with time zone | The expiration time of the node. | |
host_name | text | The name of the host. | |
image_id | text | The ID of the system image that is used by the node. | |
instance_charge_type | text | The billing method of the node. | |
instance_id | text | = | The ID of the ECS instance. |
instance_name | text | The name of the node. This name contains the ID of the cluster to which the node is deployed. | |
instance_role | text | The role of the node. | |
instance_status | text | The state of the node. | |
instance_type | text | The instance type of the node. | |
instance_type_family | text | The ECS instance family of the node. | |
ip_address | text | The IP address of the node. | |
is_aliyun_node | boolean | Indicates whether the instance is provided by Alibaba Cloud. | |
node_name | text | The name of the node in the ACK cluster. | |
node_status | text | Indicates whether the node is ready in the ACK cluster. Valid values: true, false. | |
nodepool_id | text | The ID of the node pool. | |
region | text | The Alicloud region in which the resource is located. | |
source | text | Indicates how the nodes in the node pool were initialized. The nodes can be manually created or created by using Resource Orchestration Service (ROS). | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
state | text | The states of the nodes in the node pool. | |
title | text | Title of the resource. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- alicloud
You can pass the configuration to the command with the --config
argument:
steampipe_export_alicloud --config '<your_config>' alicloud_cs_kubernetes_cluster_node