Is Amazon Elastic Kubernetes Service can use fargate spot instance? - amazon-web-services

I'm using Is Amazon Elastic Kubernetes Service, I need to run fargate service on the Spot node.
Is it possible for EKS? Currently, I can find information about ECS only. So what steps I should follow to achieve this?

Fargate for EKS does not support spot instance yet. You can upvote here for the feature.

In the documentation it is mentioned
With AWS Fargate, there are no upfront costs and you pay only for the
resources you use. You pay for the amount of vCPU, memory, and storage
resources consumed by your containerized applications running on
Amazon Elastic Container Service (ECS) or Amazon Elastic Kubernetes
Service (EKS).
reference: https://aws.amazon.com/fargate/pricing/
This shows that Fargate Spot should work just fine for AWS EKS

Related

EKS and ECS Pricing confusion

I have one confusion, did we need to pay for ECS separately, if i had already EKS cluster with t3.medium EC2 instance as worker node. Because in documentation i found that there is no addition charge for ECS if we have EC2 instance.
EKS (Elastic Kubernetes Service) and ECS (Elastic Container Service) are two distinct services on AWS. Both are used for container orchestration. EKS, as the name suggests, is a managed Kubernetes cluster whereas ECS is an AWS-native solution.
Both EKS and ECS can be used on top of either EC2 instances or on Fargate. Fargate is a “serverless” solution in the sense that it manages the underlying servers and the autoscaling for you.
If you run ECS on EC2 instances instead of Fargate, you will only pay for the EC2 instances, just like normal. There is no additional cost for the fact that you run an ECS cluster on top of them. EKS however does charge you for the cluster itself, regardless of the underlying launch type.

Unable to understand AWS Fargate Pricing

We have a requirement of deploying Redis as an External Load Balancer Service on AWS-EKS (Elastic Kubernetes Service). As Redis will be a statefulset which of the following combination will be the best fit with EKS -
EKS with Self-managed nodes
EKS with Managed Node Groups
EKS with AWS Fargate
Although, I have studied that AWS Fargate should be used for deploying stateless applications.
Fargate, thus far, has been ideal for running stateless containerized workloads in a secure and cost-effective manner. Secure because Fargate runs each pod in a VM-isolated environment and patches nodes automatically. Cost-effective because, in Fargate, you only pay for the compute resources you have configured for your pod.
I didn't understand how stateless applications will be cost-effective. Kindly verify the below statement. It would be quite helpful.
In the stateless applications, the container will be in the running state, when there will be requests and otherwise no. of instances will be 0 just as in GCP Cloud Run.
Whereas in the stateful ones, the container will be running every time. And for this reason, we should use, EC2 instances for stateful applications

How can I use AWS EBS Volumes with bare metal Kubernetes

I am using a manually created Kubernetes Cluster (using kubeadm) deployed on AWS ec2 instances (manually created ec2 instances). I want to use AWS EBS volumes for Kubernetes persistent volume. How can I use AWS EBS volumes within Kubernetes cluster for persistent volumes?
Cluster details:
kubectl veresion: 1.19
kubeadm veresion: 1.19
Posted community wiki for better visibility with general solution as there are no further details / logs provided. Feel free to expand it.
The official supported way to mount Amazon Elastic Block Store as Kubernetes volume on the self-managed Kubernetes cluster running on AWS is to use awsElasticBlockStorevolume type.
To manage the lifecycle of Amazon EBS volumes on the self-managed Kubernetes cluster running on AWS please install Amazon Elastic Block Store Container Storage Interface Driver.

Choosing microservice using AWS EC2 and ECS

I am trying to develop a spring cloud micro services. And I planned to deploy into AWS cloud. When I reading AWS resources I found that ECS providing configuration less environment for deploying microservices other than EC2. My doubt is that
Can I choose ECS resource for my complete services deployment without configurations?
For creating ECS service, is EC2 instance mandatory? Can I use ECS only in my account without creating EC2 VM? I need to know about ECS is alternative for EC2?
ECS is a service which offers clustering of vm for docker container, manages container lifecycle.
1) Yes. You can use ECS for your service deployment and it needs some basic configuration which will be one time.
2) No. To run docker container you need EC2 instance without that its not possible to run. EC2 instance are managed by ECS so you only need to provide some config like region,security group etc.
For complete config and deployment refer below link.
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_GetStarted.html

Why do you want to use AWS ECS vs. ElasticBeanstalk for Docker?

I'm planning to use Docker, and associate 1 EC2 instance with 1 Microservice.
Why do I want to deploy Docker in AWS ECS vs. ElasticBeanstalk?
It is said that AWS ECS has a native support to Docker. Is that it?
It would be great if you could be elaborate the pros and cons of running docker on AWS ECS vs. ElasticBeanstalk.
Elastic Beanstalk (multi-container) is an abstraction layer on top of ECS (Elastic Container Service) with some bootstrapped features and some limitations:
Automatically interacts with ECS and ELB
Cluster health and metrics are readily available and displayed without any extra effort
Load balancer must terminate HTTPS and all backend connections are HTTP
Easily adjustable autoscaling and instance sizing
Container logs are all collected in one place, but still segmented by instance – so in a cluster environment finding which instance served a request that logged some important data is a challenge.
Can only set hard memory limits in container definitions
All cluster instances must run the same set of containers
As of ECS IT is Amazon’s answer to container orchestration. It’s a bit rough around the edges and definitely a leap from Elastic Beanstalk, but it does have the advantage of significantly more flexibility including the ability to even define a custom scheduler.
All of the limitations imposed by Elastic Beanstalk are lifted.
Refer these for more info :
Elastic Beanstalk vs. ECS vs. Kubernetes
Amazon EC2 Container Serivce
Amazon Elasticbeanstalk