So, if Kubernetes is doing orchestration, is it also an alternative to docker composing?
Short answer: NO
This is not just orchestration, essentially Kubernetes - it is a mechanism for orchestrating and planning production planning. It is much more advanced than docker-compose . I would say that docker swarm , Kubernetes and amazon ecs belong to the same category.
Or can you compose and use kubernets together?
In the next version of the docker engine, you can use docker-compose to create Kubernetes objects. But now you canβt.
I have a file containing dockers containing several microservices, but they work as a separate application on the same machine. Can (or should it be replaced by Kubernet?
Well, in the context of launching it in production, I would say that absolutely , you definitely need to place your applications in the Kubernetes cluster, since it provides
- sustainability (re-planning of containers if they die)
- scaling (scale modules based on the processor or any other indicators)
- load balancing (provides VIP service and attaches all containers to it)
- secrets and configuration management
- namespaces (logical grouping of objects of the kubernetes)
- network policies (custom policies to control traffic flow between containers)
and many other features. And when you declare Kubernetes state, you are always trying to reach and maintain that state.
I have a file for creating docker with several services configured in swarm (runs on multiple machines). Which part should be replaced by Kubernet? The whole essay file? Or is it somehow possible to determine the basic configuration (env_var, volumes, command, ...) in a compound file and use Kubernetes only for clustering?
I would replace the entire swarm cluster and compile file constructions with a Kubernetes cluster and a yaml s object yaml . Having said that in my experience, those yamls can get a verbose bit, so if you want to take a look at Helm . This is a package manager for Kubernetes that you are not using. but I think this is one of the best tools in the Kubernetes ecosystem at the moment, and there are many open source graphics available.
I would highly recommend playing with Kubernetes using minikube on your local system to familiarize yourself with the general concepts. And then you can answer the above questions for yourself.