Amazon EKS
Core pluginmarmotdata/eks
Discover namespaces, services, workloads, and cron jobs from Amazon EKS clusters
The EKS plugin discovers namespaces, services, deployments, stateful sets, cron jobs, and pods from Amazon EKS clusters. It is the Kubernetes plugin's discovery engine with AWS IAM authentication, so the assets, lineage, and run history it produces are identical. See the Kubernetes plugin for details on what gets discovered and how resources are linked.
Authentication uses AWS IAM: on each run the plugin mints a short-lived token from the AWS credentials of wherever Marmot runs. There is no static token to store or rotate. This is the clean way to read an EKS cluster from an EC2 instance or another AWS workload.
Prerequisites
Two grants are needed on the AWS side, plus the read-only Kubernetes RBAC role.
First, the IAM identity that Marmot runs as needs an EKS access entry on the cluster (or a mapping in the older aws-auth ConfigMap).
Second, that access entry must map to a Kubernetes group bound to a read-only role:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: marmot-discovery
rules:
- apiGroups: [""]
resources: ["namespaces", "services", "pods"]
verbs: ["get", "list"]
- apiGroups: ["apps"]
resources: ["deployments", "statefulsets", "replicasets"]
verbs: ["get", "list"]
- apiGroups: ["batch"]
resources: ["cronjobs", "jobs"]
verbs: ["get", "list"]
Credentials resolve from the standard AWS chain: IRSA, EKS Pod Identity, an EC2 instance profile, or static keys. Set credentials.role to assume a role, or credentials.region to pin the region. When Marmot runs outside AWS, set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in its environment and the chain picks them up.
Connecting to a cluster
The plugin looks up the cluster's endpoint and CA certificate from the EKS API, so you only give it the cluster name and region. This needs the eks:DescribeCluster permission.
eks_cluster_name: "prod"
credentials:
region: "eu-west-1"
In the UI
Point-and-click, no config file needed.
- 1 Open
Runs→Create Pipeline - 2 Pick Amazon EKS from the plugin list.
- 3 Fill in the wizard, set a schedule, save.
With the CLI
Save a YAML config, then run marmot ingest.
name: my-eks-pipeline
runs:
- eks:
eks_cluster_name: "<eks_cluster_name>"marmot ingest -c ingest.yaml Not using plugins? Other ways to populate Marmot
Configuration
17 top-level fields.
tags multiselect Tags to apply to discovered assets
external_links object[] External links to show on all assets
name string Display name for the link
icon string Icon identifier for the link
url string URL to the external resource
filter object Filter discovered assets by name (regex)
include multiselect Include patterns for resource names (regex)
exclude multiselect Exclude patterns for resource names (regex)
cluster_name string Cluster name to prefix asset names with
namespaces multiselect Namespaces to discover. Empty or ["*"] means all namespaces
exclude_namespaces multiselect Namespaces to skip when discovering all namespaces
["kube-system","kube-public","kube-node-lease"] label_selector string Only discover namespaced resources matching this label selector (e.g. team=data)
discover_namespaces bool Discover namespaces
true discover_services bool Discover services
true discover_deployments bool Discover deployments
true discover_statefulsets bool Discover stateful sets
true discover_cronjobs bool Discover cron jobs, with their recent job runs as run history
true discover_pods bool Discover pods. Off by default because pods are short-lived and can flood the catalog
false labels_to_metadata bool Include resource labels in asset metadata
true annotations_to_metadata bool Include resource annotations in asset metadata
false credentials object AWS credentials configuration
use_default bool Use AWS credentials from environment or default profile (recommended)
true id string AWS access key ID
secret password AWS secret access key
token password AWS session token
profile string AWS profile to use from shared credentials file
role string AWS IAM role ARN to assume
role_external_id string External ID for cross-account role assumption
region string AWS region for services
endpoint string Custom endpoint URL for AWS services
eks_cluster_name string EKS cluster name