SlideShare uma empresa Scribd logo
1 de 12
Baixar para ler offline
Agenda
● IAM Roles
○ The old easy way
○ The old hard way
○ The KIAM way
○ The IRSA way
● NFS on K8s Options:
○ A) The Kubeadm Way
○ B) The EKS Way
2
Before we start… the sources…
● ❌ Medium.com “look-at-me” posts.
● ❌ Vendor marketing mumbo-jumbo.
● ✅ Peer reviewed CS publications.
● ✅ K8s failure stories (https://k8s.af/).
● ✅ Golang code review.
● ✅ Memes.
3
AWS EC2
MD API
Iptables
(OS Level)
Application
Pod
169.254.169.254
/iam/security-credentials/role:X
AWS Account
K8s Worker: Y
AWS STS
API
DNAT: None
assumeRole role:X
attached to Y # me
return {ID, Key}
EC2: Y
Role: X
The Old Easy Way
Attached
On your Amazon EC2
workloads, you MUST retrieve
session credentials using the
method described below.
These credentials should
enable your workload to make
AWS API requests, without
needing to use
sts:AssumeRole to assume
the same role that is already
associated with the instance.
https://docs.aws.amazon.com/
AWSEC2/latest/UserGuide/ia
m-roles-for-amazon-ec2.html
✅
Kiam Agent
(Proxy)
Iptables
(OS Level)
Application
Pod
sts.amazon.com
/iam/security-credentials/role:X
AWS STS
API
DNAT: sts.amazon.com => None
DNAT: 169.254.169.254 => <Kiam-Agent-IP>
The Old Hard Way
AWS EC2
MD API
EC2: Y
Role: X
Attached
assumeRole role:X
attached to Y # me
return {ID, Key}
On your Amazon EC2 workloads, you CAN retrieve
session credentials using the method described below.
These credentials should enable your workload to make
AWS API requests, without needing to use
sts:AssumeRole to assume the same role that is already
associated with the instance.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide
/iam-roles-for-amazon-ec2.html
❌
✅
AWS Account
K8s Worker: Y
Kiam Agent
(Proxy)
AWS EC2
MD API
Iptables
(OS Level)
Application
Pod
169.254.169.254
/iam/security-credentials/role:X
Kiam Server
(Proxy)
Root
(Parent)
Account
Worker
(Master)
Other
Account
Worker
AWS STS
API
DNAT: 169.254.169.254 => <Kiam>
using role:SuperPower from account:Main
assumeRole role:X on account:Other
return sts: {ID, Key}
Account: Other
=> Role: X
Role:
SuperPower
(...)/role:X
The KIAM Way
(Kubeadm)
AWS EC2
MD API
https://github.com/uswitch/kiam/blob/master/cmd/kiam/iptables.go
❗
Application
Pod
Use: SA
EKS
CP
EKS
Worker
AWS STS
API
Acc: 1
Role: X
The IRSA Way
(AWS EKS)
AWS EC2
MD API
EKS Cluster
OIDC EP: Z
using EKS-Cluster-OIDC-Magic
assumeRole role:X who trusts me
return sts: {ID, Key}
Trust
KubeAPI
Kubelet
Account
IDP Prov(s)
SSO OIDC
Provider
assumeRole role:X
return {ID, Key}
Account: 1
Add
😎
assumeRole role:<Role>
return {ID, Key}
MFA!
The IRSA Way
(AWS EKS)
EKS Cluster
OIDC Magic
In-Depth
NFS on Kubernetes
NFS on Kubeadm
1. AWS EFS endpoint without
access policy (roles) only rely on
Sec. Group open to VPC CIDR (No
roles/auth same as in DUS Data
Center).
2. Test mount -t from your Mac
(Allow VPN first).
3. nfs-common & nfs-utils => AMI.
4. Helm: NFS Subdir External
Provisioner (SIG) - I don’t like SIGs
but Jenkins can be fully down or?!
5. +YAML: pv, pvc.
6. +YAML: app pod (client).
7. Deploy.
NFS on
AWS EKS
The EKS Way
KIAM
EFS_CSI_Driver
EKS Cluster
The EKS Way
EKS OIDC
EFS_CSI_Driver
EKS Cluster
NFS provisioner
in EKS flavor with
IARS support.
EKS works! but ✅ terraform, 💅 eksctl or 👮 AWS CLI:
https://docs.aws.amazon.com/eks/latest/userguide/efs-csi.html
Non-AWS
Standard
Full AWS
Standard
❗
Container Storage Interface (CSI)
Legacy
/ Risk of
Incompatiblity
The
End

Mais conteúdo relacionado

Semelhante a KubeAdm vs. EKS - The IAM Roles Madness

A New Perspective on Resource-Level Cloud Forensics
A New Perspective on Resource-Level Cloud ForensicsA New Perspective on Resource-Level Cloud Forensics
A New Perspective on Resource-Level Cloud Forensics
Christopher Doman
 

Semelhante a KubeAdm vs. EKS - The IAM Roles Madness (20)

Managed Container Orchestration with Amazon ECS
Managed Container Orchestration with Amazon ECSManaged Container Orchestration with Amazon ECS
Managed Container Orchestration with Amazon ECS
 
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...
[Games on AWS 2019] AWS 입문자를 위한 초단기 레벨업 트랙 | AWS 레벨업 하기! : 컨테이너 - 김세호 AWS 솔루션...
 
Productionize Serverless Application Building and Deployments with AWS SAM - ...
Productionize Serverless Application Building and Deployments with AWS SAM - ...Productionize Serverless Application Building and Deployments with AWS SAM - ...
Productionize Serverless Application Building and Deployments with AWS SAM - ...
 
"AWS Fargate: Containerization meets Serverless" at AWS User Group Cologne 20...
"AWS Fargate: Containerization meets Serverless" at AWS User Group Cologne 20..."AWS Fargate: Containerization meets Serverless" at AWS User Group Cologne 20...
"AWS Fargate: Containerization meets Serverless" at AWS User Group Cologne 20...
 
AWS CloudFormation Intrinsic Functions and Mappings
AWS CloudFormation Intrinsic Functions and Mappings AWS CloudFormation Intrinsic Functions and Mappings
AWS CloudFormation Intrinsic Functions and Mappings
 
Visibility into Serverless Applications built using AWS Fargate (CON312-R1) -...
Visibility into Serverless Applications built using AWS Fargate (CON312-R1) -...Visibility into Serverless Applications built using AWS Fargate (CON312-R1) -...
Visibility into Serverless Applications built using AWS Fargate (CON312-R1) -...
 
AWS Summit Singapore - Lambda, Step Functions and Datadog: A Symphony
AWS Summit Singapore - Lambda, Step Functions and Datadog: A SymphonyAWS Summit Singapore - Lambda, Step Functions and Datadog: A Symphony
AWS Summit Singapore - Lambda, Step Functions and Datadog: A Symphony
 
윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션
윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션
윈도 닷넷 개발자를 위한 솔루션 클라우드 데브옵스 솔루션
 
Advanced Task Scheduling with Amazon ECS
Advanced Task Scheduling with Amazon ECSAdvanced Task Scheduling with Amazon ECS
Advanced Task Scheduling with Amazon ECS
 
Phil Basford - machine learning at scale with aws sage maker
Phil Basford - machine learning at scale with aws sage makerPhil Basford - machine learning at scale with aws sage maker
Phil Basford - machine learning at scale with aws sage maker
 
Serverless Application Development with SAM
Serverless Application Development with SAMServerless Application Development with SAM
Serverless Application Development with SAM
 
Machine learning at scale with aws sage maker
Machine learning at scale with aws sage makerMachine learning at scale with aws sage maker
Machine learning at scale with aws sage maker
 
Going Serverless
Going ServerlessGoing Serverless
Going Serverless
 
AWS Lambda
AWS LambdaAWS Lambda
AWS Lambda
 
Building CICD Pipelines for Serverless Applications
Building CICD Pipelines for Serverless ApplicationsBuilding CICD Pipelines for Serverless Applications
Building CICD Pipelines for Serverless Applications
 
A New Perspective on Resource-Level Cloud Forensics
A New Perspective on Resource-Level Cloud ForensicsA New Perspective on Resource-Level Cloud Forensics
A New Perspective on Resource-Level Cloud Forensics
 
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...
DevOps Fest 2019. Alex Casalboni. Configuration management and service discov...
 
Serverless functions deep dive
Serverless functions deep diveServerless functions deep dive
Serverless functions deep dive
 
Build and run applications without thinking about servers
Build and run applications without thinking about serversBuild and run applications without thinking about servers
Build and run applications without thinking about servers
 
Deliver Docker Containers Continuously on AWS - QCon 2017
Deliver Docker Containers Continuously on AWS - QCon 2017Deliver Docker Containers Continuously on AWS - QCon 2017
Deliver Docker Containers Continuously on AWS - QCon 2017
 

Mais de Olaf Reitmaier Veracierta

Mais de Olaf Reitmaier Veracierta (20)

PoC Azure Administration
PoC Azure AdministrationPoC Azure Administration
PoC Azure Administration
 
RabbitMQ Status Quo Critical Review
RabbitMQ Status Quo Critical ReviewRabbitMQ Status Quo Critical Review
RabbitMQ Status Quo Critical Review
 
AWS Graviton3 and GP3
AWS Graviton3 and GP3AWS Graviton3 and GP3
AWS Graviton3 and GP3
 
Kubernetes Workload Rebalancing
Kubernetes Workload RebalancingKubernetes Workload Rebalancing
Kubernetes Workload Rebalancing
 
AWS Cost Optimizations Risks
AWS Cost Optimizations RisksAWS Cost Optimizations Risks
AWS Cost Optimizations Risks
 
AWS Network Architecture Rework
AWS Network Architecture ReworkAWS Network Architecture Rework
AWS Network Architecture Rework
 
SRE Organizational Framework
SRE Organizational FrameworkSRE Organizational Framework
SRE Organizational Framework
 
Insight - Architecture Design
Insight - Architecture DesignInsight - Architecture Design
Insight - Architecture Design
 
Bandwidth control approach - Cisco vs Mikrotik on Multitenancy
Bandwidth control approach - Cisco vs Mikrotik on MultitenancyBandwidth control approach - Cisco vs Mikrotik on Multitenancy
Bandwidth control approach - Cisco vs Mikrotik on Multitenancy
 
Transparent Layer 2 Bandwidth Shaper
Transparent Layer 2 Bandwidth ShaperTransparent Layer 2 Bandwidth Shaper
Transparent Layer 2 Bandwidth Shaper
 
Arquitectura de Referencia - BGP - GSLB - SLB
Arquitectura de Referencia - BGP - GSLB - SLBArquitectura de Referencia - BGP - GSLB - SLB
Arquitectura de Referencia - BGP - GSLB - SLB
 
Backup aaS Solution Architecture
Backup aaS Solution ArchitectureBackup aaS Solution Architecture
Backup aaS Solution Architecture
 
Presentación de Arquitectura en la Nube
Presentación de Arquitectura en la NubePresentación de Arquitectura en la Nube
Presentación de Arquitectura en la Nube
 
Distributed Web Cluster (LAPP)
Distributed Web Cluster (LAPP)Distributed Web Cluster (LAPP)
Distributed Web Cluster (LAPP)
 
Multi-Cloud Connection Architecture
Multi-Cloud Connection ArchitectureMulti-Cloud Connection Architecture
Multi-Cloud Connection Architecture
 
Managed Cloud Services Revision
Managed Cloud Services RevisionManaged Cloud Services Revision
Managed Cloud Services Revision
 
Ingeniería de Software
Ingeniería de SoftwareIngeniería de Software
Ingeniería de Software
 
Estrategia para Despliegue de Contenedores (Agile/DevOps)
Estrategia para Despliegue de Contenedores (Agile/DevOps)Estrategia para Despliegue de Contenedores (Agile/DevOps)
Estrategia para Despliegue de Contenedores (Agile/DevOps)
 
On-Premise Private Cloud Architecture
On-Premise Private Cloud ArchitectureOn-Premise Private Cloud Architecture
On-Premise Private Cloud Architecture
 
Multimedia Streaming Architecture
Multimedia Streaming ArchitectureMultimedia Streaming Architecture
Multimedia Streaming Architecture
 

Último

Último (20)

The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024Top 10 Symfony Development Companies 2024
Top 10 Symfony Development Companies 2024
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
THE BEST IPTV in GERMANY for 2024: IPTVreel
THE BEST IPTV in  GERMANY for 2024: IPTVreelTHE BEST IPTV in  GERMANY for 2024: IPTVreel
THE BEST IPTV in GERMANY for 2024: IPTVreel
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 

KubeAdm vs. EKS - The IAM Roles Madness

  • 1.
  • 2. Agenda ● IAM Roles ○ The old easy way ○ The old hard way ○ The KIAM way ○ The IRSA way ● NFS on K8s Options: ○ A) The Kubeadm Way ○ B) The EKS Way 2
  • 3. Before we start… the sources… ● ❌ Medium.com “look-at-me” posts. ● ❌ Vendor marketing mumbo-jumbo. ● ✅ Peer reviewed CS publications. ● ✅ K8s failure stories (https://k8s.af/). ● ✅ Golang code review. ● ✅ Memes. 3
  • 4. AWS EC2 MD API Iptables (OS Level) Application Pod 169.254.169.254 /iam/security-credentials/role:X AWS Account K8s Worker: Y AWS STS API DNAT: None assumeRole role:X attached to Y # me return {ID, Key} EC2: Y Role: X The Old Easy Way Attached On your Amazon EC2 workloads, you MUST retrieve session credentials using the method described below. These credentials should enable your workload to make AWS API requests, without needing to use sts:AssumeRole to assume the same role that is already associated with the instance. https://docs.aws.amazon.com/ AWSEC2/latest/UserGuide/ia m-roles-for-amazon-ec2.html ✅
  • 5. Kiam Agent (Proxy) Iptables (OS Level) Application Pod sts.amazon.com /iam/security-credentials/role:X AWS STS API DNAT: sts.amazon.com => None DNAT: 169.254.169.254 => <Kiam-Agent-IP> The Old Hard Way AWS EC2 MD API EC2: Y Role: X Attached assumeRole role:X attached to Y # me return {ID, Key} On your Amazon EC2 workloads, you CAN retrieve session credentials using the method described below. These credentials should enable your workload to make AWS API requests, without needing to use sts:AssumeRole to assume the same role that is already associated with the instance. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide /iam-roles-for-amazon-ec2.html ❌ ✅ AWS Account K8s Worker: Y
  • 6. Kiam Agent (Proxy) AWS EC2 MD API Iptables (OS Level) Application Pod 169.254.169.254 /iam/security-credentials/role:X Kiam Server (Proxy) Root (Parent) Account Worker (Master) Other Account Worker AWS STS API DNAT: 169.254.169.254 => <Kiam> using role:SuperPower from account:Main assumeRole role:X on account:Other return sts: {ID, Key} Account: Other => Role: X Role: SuperPower (...)/role:X The KIAM Way (Kubeadm) AWS EC2 MD API https://github.com/uswitch/kiam/blob/master/cmd/kiam/iptables.go ❗
  • 7. Application Pod Use: SA EKS CP EKS Worker AWS STS API Acc: 1 Role: X The IRSA Way (AWS EKS) AWS EC2 MD API EKS Cluster OIDC EP: Z using EKS-Cluster-OIDC-Magic assumeRole role:X who trusts me return sts: {ID, Key} Trust KubeAPI Kubelet Account IDP Prov(s) SSO OIDC Provider assumeRole role:X return {ID, Key} Account: 1 Add 😎 assumeRole role:<Role> return {ID, Key} MFA!
  • 8. The IRSA Way (AWS EKS) EKS Cluster OIDC Magic In-Depth
  • 10. NFS on Kubeadm 1. AWS EFS endpoint without access policy (roles) only rely on Sec. Group open to VPC CIDR (No roles/auth same as in DUS Data Center). 2. Test mount -t from your Mac (Allow VPN first). 3. nfs-common & nfs-utils => AMI. 4. Helm: NFS Subdir External Provisioner (SIG) - I don’t like SIGs but Jenkins can be fully down or?! 5. +YAML: pv, pvc. 6. +YAML: app pod (client). 7. Deploy.
  • 11. NFS on AWS EKS The EKS Way KIAM EFS_CSI_Driver EKS Cluster The EKS Way EKS OIDC EFS_CSI_Driver EKS Cluster NFS provisioner in EKS flavor with IARS support. EKS works! but ✅ terraform, 💅 eksctl or 👮 AWS CLI: https://docs.aws.amazon.com/eks/latest/userguide/efs-csi.html Non-AWS Standard Full AWS Standard ❗ Container Storage Interface (CSI) Legacy / Risk of Incompatiblity