Skip to main content

linode

Cloud hosting platform that provides virtual private servers, Kubernetes, managed databases, and other cloud infrastructure services.

Provider Summary

total services: 21
total resources: 163

See also: [SHOW] [DESCRIBE] [REGISTRY]


Installation

To pull the latest version of the linode provider, run the following command:

REGISTRY PULL linode;

To view previous provider versions or to pull a specific provider version, see here.

Authentication

The following system environment variables are used for authentication by default:

These variables are sourced at runtime (from the local machine or as CI variables/secrets).

Using different environment variables

To use different environment variables (instead of the defaults), use the --auth flag of the stackql program. For example:


AUTH='{ "linode": { "type": "bearer", "credentialsenvvar": "YOUR_LINODE_TOKEN_VAR" }}'
stackql shell --auth="${AUTH}"

or using PowerShell:


$Auth = "{ 'linode': { 'type': 'bearer', 'credentialsenvvar': 'YOUR_LINODE_TOKEN_VAR' }}"
stackql.exe shell --auth=$Auth

Compute inventory

All Linode instances on your account, with placement, plan and status:

SELECT
id,
label,
region,
type,
status,
ipv4
FROM linode.linode.instances;

Find the right plan and region

The plan catalog with pricing - price is an object, so project the hourly and monthly rates with json_extract:

SELECT
id,
vcpus,
memory,
disk,
json_extract(price, '$.hourly') as hourly_price,
json_extract(price, '$.monthly') as monthly_price
FROM linode.linode.types
ORDER BY json_extract(price, '$.monthly')
LIMIT 5;

Regions filtered by capability (for example, only regions where you can run Kubernetes):

SELECT
id,
label,
country
FROM linode.regions.regions
WHERE capabilities LIKE '%Kubernetes%';

Available images from a given vendor:

SELECT
id,
label,
vendor,
size
FROM linode.images.images
WHERE vendor = 'Debian';

Launch a Linode

INSERT columns are the native Linode API body properties (no prefixes). This launches the smallest available plan running Debian 12:

INSERT INTO linode.linode.instances (
label,
region,
type,
image,
root_pass
)
SELECT
'demo-vm',
'us-ord',
'g6-nanode-1',
'linode/debian12',
'<a strong password>';

Watch it come up and grab its address:

SELECT id, label, status, ipv4
FROM linode.linode.instances
WHERE label = 'demo-vm';

Lifecycle operations (stop, start, reboot, resize and so on) are EXEC methods - named for the action, addressed by the Linode id:

EXEC linode.linode.instances.shutdown @linodeId = '12345678';

EXEC linode.linode.instances.boot @linodeId = '12345678';

Clean it up when you are done:

DELETE FROM linode.linode.instances
WHERE linodeId = 12345678;

Storage

Block storage volumes and Object Storage buckets across the account:

SELECT
id,
label,
size,
region,
status
FROM linode.volumes.volumes;
SELECT
label,
cluster,
size,
objects
FROM linode.object_storage.buckets;

Kubernetes

LKE clusters on the account:

SELECT
id,
label,
region,
k8s_version
FROM linode.lke.clusters;

Account and billing

Your account standing at a glance:

SELECT
company,
balance,
active_since
FROM linode.account.account;

Services