Table: linode_kubernetes_cluster - Query Linode Kubernetes Clusters using SQL
Linode Kubernetes Engine (LKE) is a managed service within Linode that allows you to deploy, manage, and scale containerized applications using Kubernetes. It simplifies the process of managing clusters by handling the underlying infrastructure, allowing you to focus on deploying applications. LKE provides a highly available, scalable, and secure environment for running your applications.
Table Usage Guide
The linode_kubernetes_cluster
table provides insights into Kubernetes clusters within Linode Kubernetes Engine (LKE). As a DevOps engineer, explore cluster-specific details through this table, including the configuration, nodes, and status. Utilize it to uncover information about clusters, such as their current status, node count, and Kubernetes version.
Examples
All clusters
Explore all the Kubernetes clusters in your Linode account to manage and optimize your cloud resources effectively. This can help you in identifying underutilized resources and potential areas for cost savings.
select *from linode_kubernetes_cluster;
select *from linode_kubernetes_cluster;
Get Kube Config for a cluster
Review the configuration for a specific Kubernetes cluster within the Linode service. This is useful for understanding the cluster's setup and managing its resources.
select kubeconfigfrom linode_kubernetes_clusterwhere id = 1234;
select kubeconfigfrom linode_kubernetes_clusterwhere id = 1234;
Instance details for each node in the cluster
Explore the operational status and other relevant details of each node within a specific cluster. This can be useful in monitoring and managing resources within a cloud-based infrastructure.
select node ->> 'id' as node_id, node ->> 'status' as node_status, i.*from linode_kubernetes_cluster as kc, jsonb_array_elements(kc.pools) as pool, jsonb_array_elements(pool -> 'nodes') as node, linode_instance as iwhere i.id = (node -> 'instance_id') :: int;
select json_extract(node.value, '$.id') as node_id, json_extract(node.value, '$.status') as node_status, i.*from linode_kubernetes_cluster as kc, json_each(kc.pools) as pool, json_each(json_extract(pool.value, '$.nodes')) as node, linode_instance as iwhere i.id = json_extract(node.value, '$.instance_id');
Schema for linode_kubernetes_cluster
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
api_endpoints | jsonb | API endpoints for the cluster. | |
created | timestamp with time zone | When this Kubernetes cluster was created. | |
euuid | text | An external unique identifier for this account. | |
id | bigint | = | This Kubernetes cluster’s unique ID. |
k8s_version | text | The desired Kubernetes version for this Kubernetes cluster in the format of <major>.<minor>, and the latest supported patch version will be deployed. | |
kubeconfig | text | Kube config for the cluster. | |
label | text | This Kubernetes cluster’s unique label for display purposes only. | |
pools | jsonb | Pools for the cluster. | |
region | text | This Kubernetes cluster’s location. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
status | text | ||
tags | jsonb | Tags applied to the Kubernetes cluster as a map. | |
tags_src | jsonb | List of Tags applied to the Kubernetes cluster. | |
updated | timestamp with time zone | When this Kubernetes cluster was updated. |
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)" -- linode
You can pass the configuration to the command with the --config
argument:
steampipe_export_linode --config '<your_config>' linode_kubernetes_cluster