Write an External Secrets Operator manifest that syncs a secret from AWS Secrets Manager.
AdvancedHands-onWrite-a-Kubernetes-manifest tasks
Answer
apiVersion: external-secrets.io/v1beta1
kind: SecretStore
metadata: { name: aws-sm, namespace: prod }
spec:
provider:
aws:
service: SecretsManager
region: ap-south-1
auth:
jwt:
serviceAccountRef: { name: eso-reader } # IRSA-annotated SA
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata: { name: db-creds, namespace: prod }
spec:
refreshInterval: 1h
secretStoreRef: { name: aws-sm, kind: SecretStore }
target: { name: db-creds }
data:
- secretKey: password
remoteRef: { key: prod/app/db, property: password }
Key trick → The Kubernetes Secret is generated, never committed to Git, and refreshInterval picks up rotations. Check which API version your installed ESO release serves; newer releases add external-secrets.io/v1.
More on Write-a-Kubernetes-manifest tasks
Write a Deployment and Service for an Nginx app with 3 replicas, resources and probes.BeginnerAdd an HPA that scales the Deployment between 3 and 15 pods at 70% CPU.BeginnerFix this broken Deployment YAML.BeginnerWrite a ConfigMap and Secret and inject them as environment variables and as a mounted file.IntermediateWrite an Ingress that routes `/api` to the api service and `/` to the web service with TLS.IntermediateWrite a pod spec with a hardened securityContext.Intermediate