I'm using Docker I have implemented a system to deploy environments (on a single server) based on Git branches using Traefik (*.dev.domain.com) and Docker Compose templates.
I like Kubernetes and I've never switched to it since I'm limited to one single server for my infrastructure. I've only used it using local installations (Docker for Windows).
So, my question is: does it make sense to run a Kubernetes "cluster" (master and nodes) on a single server to orchestrate and route containers (in place of Traefik/Rancher/Docker Compose)?
This use is for development and staging only for the moment, so high availability is not a prerequisite.
Thanks.
Kubernetes can also be installed as a single host and with Docker containers. In doing so, the host could be on your laptop, a virtual machine or a physical server.
Kubernetes requirements First you will need more than 2 or 3 servers to run your applications. If you don't, Kubernetes will just suck resources with very little profit (since you probably don't have that much stuff to manage on 3 servers that you can't already handle with some well configured docker).
They can either be virtual machines or physical computers, all operating as part of one system. There must be a minimum of one master node and one worker node for a Kubernetes cluster to be operational.
AFAIU,
I do not see a requirement for kubernetes unless we are doing below at least for single host using native docker run
or docker-compose
or docker engine swarm mode
-
jwilder nginx proxy
).docker engine swarm mode
or kubernetes single master
or minikube
. This will automatically take care of all the above scenarios out of the box and will also allow you to further scale up anytime by adding more nodes without changing much in your YML files for docker swarm or kubernetes. Ref -
https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/
https://docs.docker.com/engine/swarm/
If it is not a production environment, it doesn't matter how many nodes you are using. So yes, it should be just fine in this case. But make sure all the k8s features you will need in production are available in test/dev, to keep things similar and portable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With