The situation is like this, my friends, this time I also focused on learning about DevOps to optimize and operate the project better.
If you don’t know, specifically, DevOps stands for Development (Dev) and Operations (Ops). DevOps is a working culture combining software development engineer (dev) with operator to aim at shortening product development life cycle.
When learning about DevOps to apply to the project, the two platforms we need to care about and learn are Kubernetes and Docker.
Kubernetes and Docker Swarm
What is Kubernetes?
Kubernetes is an open source, scalable, scalable platform for managing packaged applications and services, facilitating configuration and application deployment automation.
If you have learned about docker and understand the concept of docker container. So Kubernetes is similar, it replicates and manages container applications.
Why use Kubernetes?
As I mentioned above, Kubernetes manages and operates the application on containers. And in order for applications to run on production without downtime, and if one container is turned off, another container needs to be booted up. In docker, you can use docker swarm for this case. And Kubernetes also solved the same problem.
Kubernetes provides you with a robust framework for running distributed systems. It takes care of scaling and failover for your application, providing deployment templates and more.
Kubernetes provides us with many typical features such as:
- Batch managing docket hosts
- Container Scheduling
- Rolling update
- Scaling / Auto Scaling
- Monitor life cycle and status of container life.
- Self-hearing in case of an error. (Ability to detect and correct errors by itself)
- Service discovery
- Load balancing
- Data management
- Work node management
- Log management
- Infrastructure as Code
- Interconnection and expansion with other systems
Kubernetes and Docker Swarm:
When researching and reading documents about Kubernetes, I always see people mention and compare between Kubernetes and Docker Swarm.I also wrote an article about learning docker swarm, you can read here: Docker Swarm
Docker Swarm: is a service that allows users to create, manage centrally for Docker nodes and schedules for containers.
“Each node of a Docker Swarm is a Docker daemon and all Docker daemons use the docker API”
“Services can be deployed and have access to the same nodes”
When using Docker Swarm the containers will be managed by a common Docker CLI.
Kubernetes: is the container coordination service. Developed by Google and donated to CNCF Cloud Computing Organization. Kubernetes is currently open source. The advantage is to take advantage of Google’s many years of container management experience. It is a comprehensive system to automate the deployment, scheduling and replication of packaged applications and support many containerization tools such as Docker.
Kubernetes master: it’s like our brain, it’s the control center. This is the place to manage, plan, schedule and track nodes.
Image Registry: The place to manage application images.
Node: Host Application as container (applications will be created in containers containing corresponding images)
API: UI or CLI will interact via API to coordinate the corresponding actions.
In Kubernetes need to understand two concepts:
Is a virtual machine or physical machine running Kubernetes. Nodes, also known as docker hosts.
Nodes create the collective computing power of the Kubernetes cluster. This is where the container is actually deployed to run. Nodes are the physical infrastructure on which your application runs, the server of the VM in your environment.
Pods are the lowest level resources in the Kubernetes cluster. A pod is made up of one or more containers, but the most common is a container. When defining a cluster, there are limits imposed on pods such as determining which resources, CPU, and memory to run. The scheduler uses this definition to decide which nodes to place groups. If there is more than one container in a group, it is difficult to estimate the required resources and the scheduler will not be able to place pods appropriately.
Kubernetes connects and coordinates computers in a cluster so they can act as a unified unit (unit). It allows you to deploy applications on the Container without having to worry about which particular computer will be launched on the cluster. To use the Kubernetes deployment model, applications need to be packaged in a flexible way and not depending on the specific computer (host): that is, containerized applications.
Make your application increasingly optimized with Kubernetes and DevOps. We hope to receive comments and exchanges from you.