turbot/alicloud
steampipe plugin install alicloud

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_id
from
alicloud_cs_kubernetes_cluster_node;
select
node_name,
cluster_id,
state,
creation_time,
instance_id
from
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_role
from
alicloud_cs_kubernetes_cluster_node
where
instance_role = 'Worker';
select
node_name,
instance_id,
instance_name,
instance_role
from
alicloud_cs_kubernetes_cluster_node
where
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_count
from
alicloud_cs_kubernetes_cluster_node
group by
instance_id;
select
instance_id,
count(*) as node_count
from
alicloud_cs_kubernetes_cluster_node
group by
instance_id;

Schema for alicloud_cs_kubernetes_cluster_node

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
account_idtextThe Alicloud Account ID in which the resource is located.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
cluster_idtext=The ID of the cluster that the node pool belongs to.
creation_timetimestamp with time zoneThe time when the node was created.
error_messagetextThe error message generated when the node was created.
expired_timetimestamp with time zoneThe expiration time of the node.
host_nametextThe name of the host.
image_idtextThe ID of the system image that is used by the node.
instance_charge_typetextThe billing method of the node.
instance_idtext=The ID of the ECS instance.
instance_nametextThe name of the node. This name contains the ID of the cluster to which the node is deployed.
instance_roletextThe role of the node.
instance_statustextThe state of the node.
instance_typetextThe instance type of the node.
instance_type_familytextThe ECS instance family of the node.
ip_addresstextThe IP address of the node.
is_aliyun_nodebooleanIndicates whether the instance is provided by Alibaba Cloud.
node_nametextThe name of the node in the ACK cluster.
node_statustextIndicates whether the node is ready in the ACK cluster. Valid values: true, false.
nodepool_idtextThe ID of the node pool.
regiontextThe Alicloud region in which the resource is located.
sourcetextIndicates how the nodes in the node pool were initialized. The nodes can be manually created or created by using Resource Orchestration Service (ROS).
statetextThe states of the nodes in the node pool.
titletextTitle 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