Amazon Elastic Kubernetes Service
Neil Haddley • August 12, 2021
Deploying to Amazon EKS
Amazon Elastic Kubernetes Service (Amazon EKS) makes it possible to deploy, manage, and scale containerized applications using Kubernetes on AWS.
Since Amazon EKS is based on the open-source tool Kubernetes, applications managed by Amazon EKS are compatible with applications managed by other Kubernetes environments.
Notice that Amazon also offer the Amazon Elastic Container Service (Amazon ECS).
Docker desktop
To demonstrate that it is possible to use the same kubectl client to deploy containers to a laptop or Amazon EKS consider this Docker desktop example.

No containers running

kutectl apply -f ./blog.yaml

The cluster is running

Accessing the Docker desktop cluster

Login to aws.amazon.com

AWS Management Console
aws cli
The aws command line tool is used to manage the Amazon Web Services cloud.

My Security Credentials

Creating a New AWS Access Key

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 Amazon EKS.
https://github.com/weaveworks/eksctl

eksctl documentation on the AWS site

ekctl project on github

installing eksctl

No clusters
eksctl create cluster
BASH
1% eksctl create cluster \ 2--name blog-cluster
optional arguments:
--node-type t2.nano \
--nodes 2

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

blog-cluster is being created

blog-cluster active

blog-cluster Elastic Cloud Compute (EC2) nodes created

~/neilhaddley/.kube/config file has been updated
kubectl apply

Using kubectl apply command to deploy containers

cluster workloads
kubectl get
Get information about blog-service
kubectl get service/blog-service | awk {'print $1" " $2 " " $4 " " $5'} | column -t

load balancer url

Accessing the Amazon EKS cluster
eksctl delete cluster
using ekctl delete to remove the cluster
BASH
1% eksctl delete cluster \
--name blog-cluster

eksctl delete cluster

The cluster has been deleted
kubectl config use-context
To switch back to using Docker Desktop
BASH
1% kubectl config use-context docker-desktop

switch back to docker-desktop
Deleting an AWS Access Key
Publishing AWS Access Keys is not a great idea.
This is how Keys are deleted.

Select the Delete link

Click the Deactivate button

Confirm the access key name and click the Delete button

The Access key has been deleted