steampipe plugin install aws

Table: aws_eks_fargate_profile - Query AWS EKS Fargate Profiles using SQL

The AWS EKS Fargate Profile is a component of Amazon Elastic Kubernetes Service (EKS) that allows you to run Kubernetes pods on AWS Fargate. With Fargate, you can focus on designing and building your applications instead of managing the infrastructure that runs them. It eliminates the need for you to choose server types, decide when to scale your node groups, or optimize cluster packing.

Table Usage Guide

The aws_eks_fargate_profile table in Steampipe provides you with information about Fargate Profiles within Amazon Elastic Kubernetes Service (EKS). This table allows you as a DevOps engineer to query profile-specific details, including the profile name, ARN, status, and the EKS cluster to which it belongs. You can utilize this table to gather insights on Fargate profiles, such as profiles associated with a specific EKS cluster, the status of the profiles, and more. The schema outlines the various attributes of the EKS Fargate profile for you, including the profile name, ARN, status, EKS cluster, and associated tags.

Examples

Basic info

Determine the areas in which AWS EKS Fargate profiles are being utilized. This query can help you assess the status and creation date of these profiles, offering insights for resource management and optimization.

select
fargate_profile_name,
fargate_profile_arn,
cluster_name,
created_at,
status,
tags
from
aws_eks_fargate_profile;
select
fargate_profile_name,
fargate_profile_arn,
cluster_name,
created_at,
status,
tags
from
aws_eks_fargate_profile;

List fargate profiles which are inactive

Identify instances where AWS EKS Fargate profiles are not currently active. This can be useful for troubleshooting, maintenance, or resource optimization purposes.

select
fargate_profile_name,
fargate_profile_arn,
cluster_name,
created_at,
status
from
aws_eks_fargate_profile
where
status <> 'ACTIVE';
select
fargate_profile_name,
fargate_profile_arn,
cluster_name,
created_at,
status
from
aws_eks_fargate_profile
where
status != 'ACTIVE';

Get the subnet configuration for each fargate profile

Explore the configurations of various Fargate profiles within your EKS clusters to understand the availability and IP address count for each associated subnet. This can be beneficial to manage resources efficiently and ensure optimal performance of your applications.

select
f.fargate_profile_name,
f.cluster_name,
f.status as fargate_profile_status,
s.availability_zone,
s.available_ip_address_count,
s.cidr_block,
s.vpc_id
from
aws_eks_fargate_profile as f,
aws_vpc_subnet as s,
jsonb_array_elements(f.subnets) as subnet_id
where
s.subnet_id = subnet_id;
select
f.fargate_profile_name,
f.cluster_name,
f.status as fargate_profile_status,
s.availability_zone,
s.available_ip_address_count,
s.cidr_block,
s.vpc_id
from
aws_eks_fargate_profile as f,
aws_vpc_subnet as s
where
s.subnet_id IN (
select
value
from
json_each(f.subnets)
);

List fargate profiles for clusters not running Kubernetes version greater than 1.19

Explore which Fargate profiles are associated with clusters not running Kubernetes version greater than 1.19. This can be beneficial in identifying outdated clusters, facilitating necessary upgrades to improve system performance and security.

select
c.name as cluster_name,
c.arn as cluster_arn,
c.version as cluster_version,
f.fargate_profile_name as fargate_profile_name,
f.fargate_profile_arn as fargate_profile_arn,
f.created_at as created_at,
f.pod_execution_role_arn as pod_execution_role_arn,
f.status as fargate_profile_status
from
aws_eks_fargate_profile as f,
aws_eks_cluster as c
where
c.version :: float > 1.19
and f.cluster_name = c.name;
Error: The corresponding SQLite query is unavailable.

Schema for aws_eks_fargate_profile

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
account_idtext=, !=, ~~, ~~*, !~~, !~~*The AWS Account ID in which the resource is located.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
cluster_nametext=The name of the Amazon EKS cluster that the Fargate profile belongs to.
created_attimestamp with time zoneThe Unix epoch timestamp in seconds for when the Fargate profile was created.
fargate_profile_arntextThe full Amazon Resource Name (ARN) of the Fargate profile.
fargate_profile_nametext=The name of the Fargate profile.
partitiontextThe AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov).
pod_execution_role_arntextThe Amazon Resource Name (ARN) of the pod execution role to use for pods that match the selectors in the Fargate profile.
regiontextThe AWS Region in which the resource is located.
selectorsjsonbThe selectors to match for pods to use this Fargate profile.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
statustextThe current status of the Fargate profile.
subnetsjsonbThe subnets used by the Fargate profile.
tagsjsonbA list of tags assigned to the Fargate profile.
titletextTitle of the resource.

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)" -- aws

You can pass the configuration to the command with the --config argument:

steampipe_export_aws --config '<your_config>' aws_eks_fargate_profile