Amazon Elastic Container Service

Neil HaddleySeptember 20, 2021

Deploying to Amazon ECS

Amazon Elastic Kubernetes Service (Amazon EKS) makes it possible to deploy, manage, and scale containerized applications using Kubernetes on AWS.

https://logz.io/blog/aws-eks-vs-ecs-vs-fargate-understand-differences/

Notice that Amazon also offer Amazon Elastic Container Service (Amazon ECS) and Amazon Fargate.

Since Amazon EKS is based on the open-source tool Kubernetes, all applications managed by Amazon EKS are fully compatible with applications managed by any standard Kubernetes environment.

Login to aws.amazon.com

Login to aws.amazon.com

AWS Management Console

AWS Management Console

Docker desktop

To demonstrate that it is possible to use the same kubectl client to deploy containers to a laptop or the AWS cloud consider this Docker desktop example.

No containers running

No containers running

kutectl apply -f ./blog.yaml

kutectl apply -f ./blog.yaml

The cluster is running

The cluster is running

Accessing the Docker desktop cluster

Accessing the Docker desktop cluster

aws cli

The aws command line tool is used to manage the Amazon Web Services cloud.

Creating a New AWS Access Key

Creating a New AWS Access Key

Access Key Created

Access Key Created

aws configure

aws configure is used to set credentials

BASH
1% aws configure

AWS Access Key ID [None]: AKIAYLZDACM7MNDENQV4

AWS Secret Access Key [None]: iBXYnPPUTp+enyaVU2xvXXXXXXXXXXXXXXXXXXXX

Default region name [None]:

Default output format [None]:

eksctl

eksctl is a simple CLI tool for creating clusters on EKS - Amazon's managed Kubernetes service for EC2.

https://github.com/weaveworks/eksctl

eksctl documentation on the AWS site

eksctl documentation on the AWS site

ekctl project on github

ekctl project on github

installing eksctl

installing eksctl

No clusters

No clusters

eksctl create cluster

BASH
1% eksctl create cluster \

--name blog-cluster \

--node-type t2.nano \

--nodes 2

using eskctl to create a cluster (node type t2.nano)

using eskctl to create a cluster (node type t2.nano)

blog-cluster is being created

blog-cluster is being created

blog-cluster active

blog-cluster active

blog-cluster Elastic Cloud Compute (EC2) nodes created

blog-cluster Elastic Cloud Compute (EC2) nodes created

eksctl command finished

eksctl command finished

kubectl apply

Using kubectl apply command to deploy containers

Using kubectl apply command to deploy containers

eksctl delete cluster

using ekctl delete to remove the cluster

BASH
1% eksctl delete cluster \

--name blog-cluster

eksctl delete cluster

eksctl delete cluster

The cluster has been deleted

The cluster has been deleted

Deleting an AWS Access Key

Publishing AWS Access Keys is not a great idea.

This is how Keys are deleted.

Select the Delete link

Select the Delete link

Click the Deactivate button

Click the Deactivate button

Confirm the access key name and click the Delete button

Confirm the access key name and click the Delete button

The Access key has been deleted

The Access key has been deleted