turbot/alicloud
steampipe plugin install alicloud

Table: alicloud_cs_kubernetes_cluster - Query Alibaba Cloud Container Service Kubernetes Clusters using SQL

Alibaba Cloud Container Service for Kubernetes (ACK) is a fully-managed service compatible with Kubernetes to help users with cluster creation and operation. It integrates virtualization, storage, network, and security services, enabling micro-service applications to be deployed, managed, and scaled in a more efficient, secure, and stable manner. ACK supports multiple Kubernetes application deployment models, including monolithic applications, micro-services, and serverless applications.

Table Usage Guide

The alicloud_cs_kubernetes_cluster table provides insights into Kubernetes Clusters within Alibaba Cloud Container Service (ACK). As a DevOps engineer, explore cluster-specific details through this table, including cluster configurations, versions, and statuses. Utilize it to uncover information about clusters, such as those with specific configurations, the versions of Kubernetes they are running, and their current operational status.

Examples

Basic info

Explore which Kubernetes clusters are currently active, their size, and type within the Alibaba Cloud service. This can be useful to manage resources and understand the distribution of different types of clusters.

select
name,
cluster_id,
state,
size,
cluster_type
from
alicloud_cs_kubernetes_cluster;
select
name,
cluster_id,
state,
size,
cluster_type
from
alicloud_cs_kubernetes_cluster;

List running clusters

Determine the areas in which active clusters are operating to manage resources and ensure optimal performance. This query is useful for maintaining system efficiency and preventing overutilization of resources.

select
name,
cluster_id,
state,
size,
cluster_type
from
alicloud_cs_kubernetes_cluster
where
state = 'running';
select
name,
cluster_id,
state,
size,
cluster_type
from
alicloud_cs_kubernetes_cluster
where
state = 'running';

List managed Kubernetes clusters

Discover the segments that are utilizing Managed Kubernetes clusters. This is useful for assessing the distribution of cluster types and identifying areas for potential optimization or consolidation.

select
name,
cluster_id,
state,
size,
cluster_type
from
alicloud_cs_kubernetes_cluster
where
cluster_type = 'ManagedKubernetes';
select
name,
cluster_id,
state,
size,
cluster_type
from
alicloud_cs_kubernetes_cluster
where
cluster_type = 'ManagedKubernetes';

Schema for alicloud_cs_kubernetes_cluster

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.
arntextThe Alibaba Cloud Resource Name (ARN) of the cluster.
capabilitiestext
cluster_healthytextThe health status of the cluster.
cluster_idtext=The ID of the cluster.
cluster_logjsonbThe logs of a cluster.
cluster_namespacejsonb
cluster_spectext
cluster_typetextThe type of the cluster.
created_attimestamp with time zoneThe time when the cluster was created.
current_versiontextThe version of the cluster.
data_disk_categorytextThe type of data disks.
data_disk_sizebigintThe size of a data disk.
deletion_protectionbooleanIndicates whether deletion protection is enabled for the cluster.
docker_versiontextThe version of Docker.
enabled_migrationtext
external_loadbalancer_idtextThe ID of the Server Load Balancer (SLB) instance deployed in the cluster.
gw_bridgetext
init_versiontextThe initial version of the cluster.
instance_typetextThe Elastic Compute Service (ECS) instance type of cluster nodes.
maintenance_infotext
maintenance_windowjsonb
master_urljsonbThe endpoints that are open for connections to the cluster.
meta_datajsonbThe metadata of the cluster.
nametextThe name of the cluster.
need_update_agenttext
network_modetextThe network type of the cluster.
next_versiontext
node_statustextThe status of cluster nodes.
outputstext
parameterstext
porttextContainer port in Kubernetes.
private_zonetextIndicates whether PrivateZone is enabled for the cluster.
profiletextThe identifier of the cluster.
regiontextThe Alicloud region in which the resource is located.
resource_group_idtextThe ID of the resource group to which the cluster belongs.
service_discovery_typestext
sizebigintThe number of nodes in the cluster.
statetextThe status of the cluster.
subnet_cidrcidrThe CIDR block of pods in the cluster.
swarm_modetext
tagsjsonbA map of tags for the resource.
tags_srcjsonbA list of tags attached with the cluster.
titletextTitle of the resource.
updatedtimestamp with time zoneThe time when the cluster was updated.
upgrade_componentstext
vpc_idtextThe ID of the VPC used by the cluster.
vswitch_cidrcidrThe CIDR block of VSwitches.
vswitch_idtextThe IDs of VSwitches.
worker_ram_role_nametextThe name of the RAM role for worker nodes in the cluster.
zone_idtextThe ID of the zone where the cluster is deployed.

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