marmotdata/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"]
AWS credentials
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"
Keyless authentication
On Marmot Cloud or Marmot Enterprise the pipeline can present its own identity instead of access keys. Register your Marmot instance as an IAM OIDC identity provider (client id sts.amazonaws.com), create a role whose trust policy allows sts:AssumeRoleWithWebIdentity for that provider with <issuer host>:sub equal to the pipeline's subject, pipeline:<name> as reported by the pipeline API, and set credentials.role_arn and credentials.region. No key exists anywhere; Marmot mints a short-lived token for each run.
In the UI
Point and click, no config file needed.
- Open Runs and choose Create pipeline.
- Pick AWS EKS from the plugin list.
- Fill in the settings, set a schedule and save.
With the CLI
Save a YAML config, then run marmot ingest.
Not using plugins? Other ways to populate Marmot
Configuration
Fields marked Required must be set.
tagsList of textTags to apply to discovered assets
external_linksList of groupsExternal links to show on all assets
nameTextDisplay name for the link
iconTextIcon identifier for the link
urlTextURL to the external resource
filterGroup of settingsFilter discovered assets by name (regex)
includeList of textInclude patterns for resource names (regex)
excludeList of textExclude patterns for resource names (regex)
zoneTextTells this system apart from others of the same technology and becomes part of every asset's MRN
cluster_nameTextCluster name to prefix asset names with
namespacesList of textNamespaces to discover. Empty or ["*"] means all namespaces
exclude_namespacesList of textNamespaces to skip when discovering all namespaces
label_selectorTextOnly discover namespaced resources matching this label selector (e.g. team=data)
discover_namespacesYes or noDiscover namespaces
discover_servicesYes or noDiscover services
discover_deploymentsYes or noDiscover deployments
discover_statefulsetsYes or noDiscover stateful sets
discover_cronjobsYes or noDiscover cron jobs, with their recent job runs as run history
discover_podsYes or noDiscover pods. Off by default because pods are short-lived and can flood the catalog
labels_to_metadataYes or noInclude resource labels in asset metadata
annotations_to_metadataYes or noInclude resource annotations in asset metadata
audienceTextAudience of the Marmot identity token. Derived from the credentials' federation settings; set it only when the cloud side expects another
credentialsGroup of settingsAWS credentials configuration
use_defaultYes or noUse AWS credentials from environment or default profile (recommended)
idTextAWS access key ID
secretSecretAWS secret access key
tokenSecretAWS session token
profileTextAWS profile to use from shared credentials file
role_arnTextIAM role to assume with the Marmot identity token (AssumeRoleWithWebIdentity); its trust policy names the Marmot issuer as an OIDC provider. Setting it federates: no keys are needed, and region is required. role, if also set, is assumed on top of it
roleTextAWS IAM role ARN to assume with AssumeRole from the base credentials (static keys, a profile, the default chain, or role_arn)
role_external_idTextExternal ID for cross-account role assumption
regionTextAWS region for services
endpointTextCustom endpoint URL for AWS services
eks_cluster_nameText RequiredEKS cluster name