Containerization and orchestration, which instruments to use and why

Information disclosure:

  • I have few questions for containerization and orchestration tools available on the market today.
  • I worked on a docker swarm, kubernets and the elastic Bean Stalk.

Problem : I want to automate scaling without having to access ec2 instances, where I don't have to worry about scaling instances. I know GKE provides this, but I want to stick with AWS. A system in which I can define scaling triggers based on queries, memory, a processor on the toolbar (just like an elastic beanstalk, but I will need to run several services, all services will have different scaling triggers). From what I read, one thing is kubernetes, and ECS is that I have to write scripts based on cloud viewing events.


Q.1: For Rock Docker:

How can Docker Swarm better balance load and autoscale when I should already provide more than 1 virtual machines (created by docker-machine) as workers for my manager?

My view:

  • This is expensive because I have to pay 2 copies for it.
  • This virtual machine will still be present at low load.
  • I do not think that apart from manually running the script, there will not be any automatic scaling possible here.
  • I will manage one docker-compose.yml here.

Q.2: for kubernets:

Does Kubernetes Increase at Instance Level?

My view:

  • Kubernetes provides options for auto-scanning (for example, horizontal scaling, etc.), but all this happens at the service level, in the end there are several containers and containers.
  • As I know, everything will happen in Kubernetes Cluster running Kops in production, so if it scales to instance level, how does it do it? since it does not have any concept of a virtual machine, such as SWARM in docker.
  • I will manage several YAML files here based on my services.

Q.3 For Elastic Bean Stem:

If Elastic Bean Stalk can manage my full Containerization along with AutoScaling and load balancing, then how is above 2 so much in demand and better to use?

My view:

  • Stretch Bean Stalk is currently moving more toward Fargate, which is not currently available in all areas.
  • I saw in the process that it gives full control by providing a complete configuration toolbar based on my services.
  • It will create a new instance according to my loading and autoscaling.

<i> I got confused and could not convince people who say “No” to Kubernet and “Docker Swarm”, If anyone can, please provide me with a detailed overview of what and why to use in production on AWS? as I am not responsible for most AutoScaling and LoadBalancing on Production, even knowing these tools above.

The questions listed above consider AWS as a cloud deployment platform, I would also like to inform you that docker-compose.yml is working successfully on Docker Swarm and 4 different YAML files for Kubernetes, which also work fine on Minikube.

+5
source share
1 answer

I am confused and cannot convince people who say “No” to Kubernet and “Docker Swarm”. If anyone can, please provide me with a detailed overview of what and why to use in AWS production?

Two of the three solutions you offer are platform agnostic, so we can talk about them without focusing on AWS.

I recommend you use Kubernetes and I will try to explain why below.

How can Docker Swarm better balance load and autoscale when I should already provide more than 1 virtual machines (created by docker-machine) as workers for my manager?

Docker Swarm is a relatively simple platform for orchestrating Docker applications with fairly simple logic. To implement node-based autoscaling, you must use some external tools (in AWS, for example, you can use the Autoscale group with some rules based on CPU utilization). And you will need to add some custom scripts to add and remove nodes from the Docker Swarm cluster. All this is possible, but you will need to develop it yourself.

Does Kubernetes Increase at Instance Level?

Yes Yes. Kubernetes can scale with cluster-autoscale daemon, which can run inside a cluster and automatically scale your instances up and down based on several metrics, including custom ones. You do not need to create any scripts, all the logic is already implemented, you just need to set the rules.

If Elastic Bean Stalk can manage my full Containerization along with AutoScaling and load balancing, then how is above 2 so much in demand and better to use?

Elastic Beanstalk is a solution for running applications inside AWS, but you will be limited by its functions. Yes, he can do so much for you, but if you need something ordinary, or you need to create a hybrid cloud solution - this is not an option.

Finally, I can tell you that with Kubernet you will receive:

  • Tons of documentation and community experience.
  • Auto-magic for almost everything from auto-scaling to A / B testing and auto-signing. Allows you to encrypt certificates for your services. You will spend a lot of time implementing all these functions in Docker Swarm or Elastic Beanstalk, and some of them may be almost impossible in other orchestras.
  • Agnostics platform. You can go to any platform (even local) with minimal changes to your application configurations. Docker Swarm also works almost everywhere, but it is less functional.
  • Many other things for planning, tasks, distribution of applications, different types of volumes and many others.

In addition, I can recommend some Kubernetes modules and applications that may be useful to you (and not only) AWS.

  • Kube2iam is a tool that provides you the AWS IAM role by assigning it directly to your containers, not your instances.
  • Autoscaling module .
  • Cert-manager for generating LetsEncrypt SSL keys. It has Route53 integration for DNS calling.
  • Nginx-ingress as an input controller that provides you with many features and the best Nginx experience.
  • Kops . But you already know that.
+4
source

Source: https://habr.com/ru/post/1276262/


All Articles