Associate IAM role with K8S serviceEKSEC2 or other kinds of instances/VM/MachinesUpdate annotations in deployment.yamlSource
Associate IAM role with K8S service
EKS
EC2 or other kinds of instances/VM/Machines
- Use kube2iam
Update annotations in deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 3
template:
metadata:
annotations:
iam.amazonaws.com/role: role-arn
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.9.1
ports:
- containerPort: 80