Course contentsShow
← Cloud and Infrastructure
Lesson 1281 of 2,98925. Kubernetes Configuration and SecretsFree lesson

AWS Secrets Manager Integration

Configuring SecretStore for AWS Secrets Manager using IAM roles, IRSA, and secret retrieval patterns.

AWS Secrets Manager Integration

You'll learn: How to connect Kubernetes to AWS Secrets Manager using SecretStore, IAM roles, and IRSA so your pods can retrieve secrets directly from AWS.

What Is AWS Secrets Manager Integration?

AWS Secrets Manager is a cloud service that stores, rotates, and manages secrets like database passwords and API keys. With the External Secrets Operator you've just learned about, you can configure a SecretStore resource to pull these secrets from AWS into your Kubernetes cluster automatically—no manual copying required.

Core Components

IAM Roles for Service Accounts (IRSA)

Think of IRSA as a badge system: instead of embedding AWS credentials in your cluster, you assign an IAM role to a Kubernetes service account. Pods using that service account automatically get temporary AWS credentials—secure and rotationless.

SecretStore Configuration

Your SecretStore tells External Secrets Operator where and how to connect to AWS Secrets Manager:

apiVersion: external-secrets.io/v1beta1
kind: SecretStore
metadata:
  name: aws-secret-store
spec:
  provider:
    aws:
      service: SecretsManager
      region: us-east-1
      auth:
        jwt:
          serviceAccountRef:
            name: external-secrets-sa

This points to AWS Secrets Manager in us-east-1 and uses the external-secrets-sa service account (which has the IAM role attached via IRSA).

Secret Retrieval Pattern

Once configured, your ExternalSecret references the SecretStore and fetches specific secrets by name or ARN:

apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
  name: db-credentials
spec:
  secretStoreRef:
    name: aws-secret-store
  target:
    name: db-secret
  data:
    - secretKey: password
      remoteRef:
        key: prod/database/password

The operator pulls prod/database/password from AWS and creates a Kubernetes Secret named db-secret.

Key Takeaway: AWS Secrets Manager integration uses IRSA for secure authentication, SecretStore for connection configuration, and ExternalSecret resources to map AWS secrets into Kubernetes Secrets—keeping credentials centralized and automatically synchronized.