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_typefrom alicloud_cs_kubernetes_cluster;
select name, cluster_id, state, size, cluster_typefrom 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_typefrom alicloud_cs_kubernetes_clusterwhere state = 'running';
select name, cluster_id, state, size, cluster_typefrom alicloud_cs_kubernetes_clusterwhere 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_typefrom alicloud_cs_kubernetes_clusterwhere cluster_type = 'ManagedKubernetes';
select name, cluster_id, state, size, cluster_typefrom alicloud_cs_kubernetes_clusterwhere cluster_type = 'ManagedKubernetes';
Control examples
Schema for alicloud_cs_kubernetes_cluster
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. | |
arn | text | The Alibaba Cloud Resource Name (ARN) of the cluster. | |
capabilities | text | ||
cluster_healthy | text | The health status of the cluster. | |
cluster_id | text | = | The ID of the cluster. |
cluster_log | jsonb | The logs of a cluster. | |
cluster_namespace | jsonb | ||
cluster_spec | text | ||
cluster_type | text | The type of the cluster. | |
created_at | timestamp with time zone | The time when the cluster was created. | |
current_version | text | The version of the cluster. | |
data_disk_category | text | The type of data disks. | |
data_disk_size | bigint | The size of a data disk. | |
deletion_protection | boolean | Indicates whether deletion protection is enabled for the cluster. | |
docker_version | text | The version of Docker. | |
enabled_migration | text | ||
external_loadbalancer_id | text | The ID of the Server Load Balancer (SLB) instance deployed in the cluster. | |
gw_bridge | text | ||
init_version | text | The initial version of the cluster. | |
instance_type | text | The Elastic Compute Service (ECS) instance type of cluster nodes. | |
maintenance_info | text | ||
maintenance_window | jsonb | ||
master_url | jsonb | The endpoints that are open for connections to the cluster. | |
meta_data | jsonb | The metadata of the cluster. | |
name | text | The name of the cluster. | |
need_update_agent | text | ||
network_mode | text | The network type of the cluster. | |
next_version | text | ||
node_status | text | The status of cluster nodes. | |
outputs | text | ||
parameters | text | ||
port | text | Container port in Kubernetes. | |
private_zone | text | Indicates whether PrivateZone is enabled for the cluster. | |
profile | text | The identifier of the cluster. | |
region | text | The Alicloud region in which the resource is located. | |
resource_group_id | text | The ID of the resource group to which the cluster belongs. | |
service_discovery_types | text | ||
size | bigint | The number of nodes in the cluster. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
state | text | The status of the cluster. | |
subnet_cidr | cidr | The CIDR block of pods in the cluster. | |
swarm_mode | text | ||
tags | jsonb | A map of tags for the resource. | |
tags_src | jsonb | A list of tags attached with the cluster. | |
title | text | Title of the resource. | |
updated | timestamp with time zone | The time when the cluster was updated. | |
upgrade_components | text | ||
vpc_id | text | The ID of the VPC used by the cluster. | |
vswitch_cidr | cidr | The CIDR block of VSwitches. | |
vswitch_id | text | The IDs of VSwitches. | |
worker_ram_role_name | text | The name of the RAM role for worker nodes in the cluster. | |
zone_id | text | The 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