Question

Hello and happy new year 🙂

Im new in kubernetes world because docker swarm is somehow on eol. I want to ask something, because I cant find proper answers.

First: is kubernetes overkill for test environment? I read, that you need at least 2gb and 2 cores, which is 2x more resources then docker swarm. And also, 3 nodes (or 2) so whole thing costs at least 2x more.

Second thing: load balancer, now Im using treafik with docker swarm and it can be used also with kubernetes as reverse proxy thanks to ingress. But, can I use it as load balancer too? I read a lot of articles, but all the time there is Digitalocean load balancer (which costs too).

And finall thing: do you think that kubernetes is overkill for small - medium project? Im creating one with good potential, but as every project, its small at the beginning, but at the end it can be massive (not much, but bigger 😉)

Thank you for your answers

2 comments
  • @hejeroaz

    First: is kubernetes overkill for test environment? I read, that you need at least 2gb and 2
    cores, which is 2x more resources then docker swarm. And also, 3 nodes (or 2) so whole
    thing costs at least 2x more.

    It really depends on what you’re trying to do within your test environment here. If you’re testing Kubernetes setup for a production deployment, then you need to determine what resources are required for each service to do determine how many nodes you need for production.

    Otherwise, I would recommend setting up a local development Kubernetes cluster to determine how many nodes you need for production deployment. I would not use Digital Ocean for any type of long-term testing environment because these resources cost money. However, it’s OK for short-term testing where you standup a cluster, perform some testing, and tear it down.

    Second thing: load balancer, now Im using treafik with docker swarm and it can be used also
    with kubernetes as reverse proxy thanks to ingress. But, can I use it as load balancer too? I
    read a lot of articles, but all the time there is Digitalocean load balancer (which costs too).

    It’s overkill to use both Swarm and Kubernetes within the same production deployment. Just use Kubernetes with Treafik for your production deployment as this is the best container orchestrator out there. Furthermore, if you have multiple services, then using Traefik will save you money because you’ll only need a single load balancer. If you were not using an Ingress resource within your Kubernestes cluster for your services, then you would need a load-balancer for each service.

    And finall thing: do you think that kubernetes is overkill for small - medium project?

    Yes, Kubernetes probably overkill if your small/medium application isn’t broken up into many services, it’s a single monolithic application (i.e. 3 tier application), doesn’t have many users, and/or much traffic.

    Well, I wish that the above information is helpful and I wish you all the best.

    Think different and code well,

    -Conrad

  • @conradwt

    thank you for your reply. Yes I wanted to say kubernetes with traefik as load balancer, but I wrote it really badly :) (english is not my main language, sorry)

    But as I understand, its better to use Traefik / Nginx Ingress with DO load balancers, am I right?

    For application type:

    It is application with FE client (Vue), BE (NestJS), db (postgres) and admin (Vue). For users, really hard to say, for beginning we expect around thousand people, but with new features and growing community, it could be more than 30k. But its hard to say about daily peaks.

    So Im in position, that I dont know how to start this new project. I heard that docker swarm mode is still good, but its future is not that bright, but kubernetes for one man army (Im developing whole app on my own) is little bit overkill.

    So any advice is welcome :)

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers

Hello and happy new year 2021 too ;)

First: Docker Swarm and Kubernetes are very dissimile. Kubernetes, or k8s, is a Cloud Orchestrator and Swarm is more limited to a few pods. In k8s you need to have additional pods to get all systems working: disk, network, services, etc. k8s is ideal for test environments and not overkill. You can use Terraform to start up the infrastructure and Ansible to keep your cluster in sync in some minutes.

Second: DO Load Balancers are very stable and fastest. The problem is that you can’t have more than 10 of them in your account. You can also use Traefik as your LoadBalancer. The differences between both are that DOLB uses Nginx and has more features that Traefik doesn’t have: for example blacklist by URL. The final decision must be taken in the function of your project requirements. In our case, we have a mix of Traefik and DOLB.

best regards,

HR ;)

But as I understand, its better to use Traefik / Nginx Ingress with DO
load balancers, am I right?

It really depends on the requirements for your application. In general, you’ll get a DO load balancer when you create an K8s Ingress resource.

For application type:

It is application with FE client (Vue), BE (NestJS), db (postgres) and
admin (Vue). For users, really hard to say, for beginning we
expect around thousand people, but with new features and
growing community, it could be more than 30k. But its hard to
say about daily peaks.

I recommend getting a better understanding of your individual backend services in order to setup autoscalers for your K8s deployment resources.

So Im in position, that I dont know how to start this new project. I heard that docker swarm mode
is still good, but its future is not that bright, but kubernetes for one man army (Im developing
whole app on my own) is little bit overkill.

Just design your individual services using the techniques outlined here. Then you can use Docker to package these service. Next, you’ll implement Kubernetes deployment resources to autoscale your services based on their required resource utilization.

So any advice is welcome :)

Good luck and all the best.

Think different and code well,

-Conrad

Submit an Answer