Authentication

This provider requires authentication.

  • region: AWS region where the EKS cluster is located (required: True, sensitive: False)
  • cluster_name: Name of the EKS cluster (required: True, sensitive: False)
  • access_key: AWS access key (Leave empty if using IAM role at EC2) (required: False, sensitive: True)
  • secret_access_key: AWS secret access key (Leave empty if using IAM role at EC2) (required: False, sensitive: True)

Certain scopes may be required to perform specific actions or queries via the provider. Below is a summary of relevant scopes and their use cases:

In workflows

This provider can be used in workflows.

As “step” to query data, example:

steps:
    - name: Query eks
      provider: eks
      config: "{{ provider.my_provider_name }}"
      with:
        command_type: {value}  # Type of query to execute
        # Additional arguments for the query

Check the following workflow examples:

Provider Methods

The provider exposes the following Provider Methods. They are available in the AI Assistant.

  • get_pods List all pods in a namespace or across all namespaces (view, scopes: pods:list, pods:get)

    • namespace: The namespace to list pods from. If None, lists pods from all namespaces.
  • get_pvc List all PVCs in a namespace or across all namespaces (view, scopes: pods:list)

    • namespace: The namespace to list pods from. If None, lists pods from all namespaces.
  • get_node_pressure Get pressure metrics for all nodes (view, scopes: pods:list)

  • exec_command Execute a command in a pod (action, scopes: pods:exec)

    • namespace: Namespace of the pod
    • pod_name: Name of the pod
    • command: Command to execute (string or array)
    • container: Name of the container (optional, defaults to first container)
  • restart_pod Restart a pod by deleting it (action, scopes: pods:delete)

    • namespace: Namespace of the pod
    • pod_name: Name of the pod
  • get_deployment Get deployment information (view, scopes: pods:list)

    • deployment_name: Name of the deployment to get
    • namespace: Target namespace (defaults to “default”)
  • scale_deployment Scale a deployment to specified replicas (action, scopes: deployments:scale)

    • deployment_name: Name of the deployment to get
    • namespace: Target namespace (defaults to “default”)
    • replicas: Number of replicas to scale to
  • get_pod_logs Get logs from a pod (view, scopes: pods:logs)

    • namespace: Namespace of the pod
    • pod_name: Name of the pod
    • container: Name of the container (optional)
    • tail_lines: Number of lines to fetch from the end of logs (default: 100)

Connecting with the Provider

To connect to Amazon EKS, follow these steps:

  1. Log in to your AWS Console

  2. Create an IAM user with EKS permissions:

aws iam create-user --user-name eks-user
  1. Attach required policies:
aws iam attach-user-policy --user-name eks-user --policy-arn arn:aws:iam::aws:policy/AmazonEKSClusterPolicy
aws iam attach-user-policy --user-name eks-user --policy-arn arn:aws:iam::aws:policy/AmazonEKSServicePolicy
  1. Create access keys
aws iam create-access-key --user-name eks-user

You should get:

{
  "AccessKey": {
    "AccessKeyId": "AKIAXXXXXXXXXXXXXXXX",
    "SecretAccessKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "Status": "Active"
  }
}

The AccessKeyId is your access_key and SecretAccessKey is your secret_access_key.

  1. Note your cluster name and region from the EKS console or using:
aws eks list-clusters --region <your-region>

Required Permissions

The AWS IAM user needs these permissions:

  1. eks:DescribeCluster
  2. eks:ListClusters

Additional permissions for specific operations:

  1. eks:AccessKubernetesApi for pod/deployment operations
  2. eks:UpdateCluster for scaling operations
CommandAWS IAM Permissions
get_podseks:DescribeCluster
eks:AccessKubernetesApi
get_pvceks:DescribeCluster
eks:AccessKubernetesApi
get_node_pressureeks:DescribeCluster
eks:AccessKubernetesApi
get_deploymenteks:DescribeCluster
eks:AccessKubernetesApi
scale_deploymenteks:DescribeCluster
eks:AccessKubernetesApi
exec_commandeks:DescribeCluster
eks:AccessKubernetesApi
restart_podeks:DescribeCluster
eks:AccessKubernetesApi
get_pod_logseks:DescribeCluster
eks:AccessKubernetesApi