Professional Documents
Culture Documents
AWS Container Day A Journey To Modern App
AWS Container Day A Journey To Modern App
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
§ Introduction
§ Container and Docker
Agenda § Elastic Container Service
§ Elastic Kubernetes Service
§ Customer Reference
§ Quiz
( 100 $ AWS Credit for top 3 )
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
NEW WORLD IT Employees at work
Online
marketing
Factories +
supply chain
Customer tracking
New Needs
New channels direct to customer
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Cloud Native Principles
Pay as you go, afterwards
High utilization—turn idle resources off
Self service—no waiting
Globally distributed by default
Cross-zone/region availability models
Immutable code deployments
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Why Containers?
• Speed
• Efficiency
• Easier packaging
• Less risky deployments
• Better Development
experience
• Microservices Photo & Licence
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Introduction to Containers and Docker
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Application environment components
Dependencies Configuration
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
It worked on my machine, why not in
prod?
Runtime Engine
Dependencies
Code
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Four environments, same container
W
rit
ab
le
Start from base images that have
ad ad
Container
d
your dependencies, add your
ng
ix
custom code. Image
d
References
nod unt
parent
ej
image
s
Image
b
Docker file for easy, reproducable
u
builds. Base image
bootfs
kernel
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Virtual machine versus Docker
VM App 2
Hypervisor Docker
Host OS Host OS
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Container Services Landscape
Amazon Elastic
MANAGEMENT Amazon Elastic
Kubernetes
Deployment, Scheduling, Container Service
Service
Scaling & Management of
containerized applications
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
We Give You The Power To Choose:
ECS EKS
1. Choose your
orchestration tool
2. Choose your
launch type
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Elastic
Container Service
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon ECS - Architecture
EC2 instance
Task Task
ECS container
Elastic Load Balancing agent
Container Container
EC2 instance
Amazon ECS Service
Internet
Task Task • Agent
ECS container communication
agent service
Container Container
• API
• Cluster
EC2 instance management
Engine
• Key and value store
Task Task
ECS container
Elastic Load Balancing agent
Container Container
EC2 instance
Amazon ECS Service
Internet
Task Task • Agent
ECS container communication
agent service
Container Container
• API
• Cluster
EC2 instance management
Engine
• Key and value store
Task Task
ECS container
Elastic Load Balancing agent
Container Container
EC2 instance
Amazon ECS Service
Internet
Task Task • Agent
ECS container communication
agent service
Container Container
• API
• Cluster
EC2 instance management
Engine
• Key and value store
Task Task
ECS container
Elastic Load Balancing agent
Container Container
EC2 instance
Amazon ECS Service
Internet
Task Task • Agent
ECS container communication
agent service
Container Container
• API
• Cluster
EC2 instance management
Engine
• Key and value store
Task Task
ECS container
Elastic Load Balancing agent
Container Container
EC2 instance
Amazon ECS Service
Internet
Task Task • Agent
ECS container communication
agent service
Container Container
• API
• Cluster
EC2 instance management
Engine
• Key and value store
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon ECS - Service
EC2 instance
Task Task
ECS container
Elastic Load Balancing agent
Container Container
EC2 instance
Amazon ECS Service
Internet
Task Task • Agent
ECS container communication
agent service
Container Container
• API
• Cluster
EC2 instance management
Engine
• Key and value store
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon ECS - Task placement
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Fargate
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Without Fargate, you end up managing more than just containers
EC2 Instance
Docker ECS
OS
Agent Agent
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
- Patching and Upgrading OS, agents, etc.
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Elastic Container Service
AWS Fargate
run serverless containers
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Fargate
Managed by AWS
No EC2 Instances to provision, scale or manage
Elastic
Scale up & down seamlessly. Pay only for what you use
Your
containerized
applications
Integrated
with the AWS ecosystem: VPC Networking, Elastic Load
Balancing, IAM Permissions, CloudWatch and more
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
How EKS / ECS works on EC2
AWS Run a container on EC2 Customer Account
for me, please
VPC
Control Plane
ENI
Service Pod
VPC
Control Plane
ENI
Service Pod
Speed to market
Security
DevOps—CI / CD
Monitoring
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DEMO
ECS with Fargate
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Three Tier architecture
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Demo process
• Setup Cloud9
• Setup Infrastructure
• FrontEnd Rails App
• Node.js backend api
• Crystal backend api
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
We Give You The Power To Choose:
ECS EKS
1. Choose your
orchestration tool
2. Choose your
launch type
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What is Kubernetes?
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
But where you run K8s matters
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
57% of Kubernetes workloads
run on AWS today
—CNCF survey
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Kubernetes master
API Controller Cloud
server manager controller
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Master Master Master
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Master Master Master
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
EKS - reduce the complexity of self manage K8s
Kubectl mycluster.eks.amazonaws.com
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
EKS is Kubernetes Certified
1. Guaranteed Portability
2. Interoperability
3. Timely Updates
4. Confirmability
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
"Action": "eks:Describe*”
"Resource":
IAM Authentication + Kubectl "arn:aws:eks:region-
code:123456789012:cluster/d
ev"
mapUsers: | - userarn:
arn:aws:iam::${ACCOUNT_ID}:user/rbac-user
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved. username: rbac-user
Pod networking
{…}
https://github.com/aws/amazon-vpc-cni-k8s
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ec2.associateaddress()
ENI
Secondary IPs:
10.0.0.20
10.0.0.22 Nginx Pod
Nginx Pod
Veth IP: 10.0.0.20
Veth IP: 10.0.0.1
Secondary IPs:
Java Pod 10.0.0.1
10.0.0.2 Java Pod
Veth IP: 10.0.0.2 Veth IP: 10.0.0.22
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Kubernetes Network Calico is the leading Open source, active
Commercial support
Policies enforce network implementation of the development (>100
available from Tigera
security rules network policy API contributors)
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
S TA G E “TENANT” FINE-GRAINED
COMPLIANCE
S E PA R AT I O N S E PA R AT I O N FIREWALLS
Isolate dev, test, and prod E.g., typically use namespaces Reduce attack surface within E.g., PCI, HIPAA
for different teams within microservice-based applications
a company—but without
network policy, they are
not network isolated
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Kubernetes Upgrades
Version Version
1.10 1.9.2 1.9.1 1.9
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Auto Scaling – Cluster
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Auto Scaling - Application
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Load Balancing
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Load Balancing
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Customers Reference - EKS
HSBC is an investment bank and financial services holding
company. One of the world’s largest banking and financial
services organizations, serving more than 40 million
customers through their global businesses: Wealth and
Personal Banking, Commercial Banking, and Global
Banking and Markets.
We explore solutions with the real-life example of how HSBC's cloud services team built a
secure multi-tenant platform for the company's application teams to run mission-critical
containerized applications on Amazon EKS.
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Summary
• New customer expectations are rapidly driving new capabilities.
• Containers, as part of a larger DevOps strategy, helps realize these goals.
• AWS provides the best experience with the broadest offerings in the
journey to modern Cloud Native Applications.
Next Steps:
• Immersion Day – Get you started
• Topic Specific Deep Dive Workshops
• Proof of Concept
• Stay on top of the latest Containers news:
• https://aws.amazon.com/containers/new/
• https://aws.amazon.com/new/#compute-services
© 2020, Amazon Web Services, Inc. or its Affiliates. All rights reserved.