steampipe plugin install linode

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
kubeconfig
from
linode_kubernetes_cluster
where
id = 1234;
select
kubeconfig
from
linode_kubernetes_cluster
where
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 i
where
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 i
where
i.id = json_extract(node.value, '$.instance_id');

Schema for linode_kubernetes_cluster

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
api_endpointsjsonbAPI endpoints for the cluster.
createdtimestamp with time zoneWhen this Kubernetes cluster was created.
idbigint=This Kubernetes cluster’s unique ID.
k8s_versiontextThe desired Kubernetes version for this Kubernetes cluster in the format of <major>.<minor>, and the latest supported patch version will be deployed.
kubeconfigtextKube config for the cluster.
labeltextThis Kubernetes cluster’s unique label for display purposes only.
poolsjsonbPools for the cluster.
regiontextThis Kubernetes cluster’s location.
statustext
tagsjsonbTags applied to the Kubernetes cluster as a map.
tags_srcjsonbList of Tags applied to the Kubernetes cluster.
updatedtimestamp with time zoneWhen 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