Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does Kubernetes actually do? [closed]

People also ask

What exactly does Kubernetes do?

Kubernetes, often abbreviated as “K8s”, orchestrates containerized applications to run on a cluster of hosts. The K8s system automates the deployment and management of cloud native applications using on-premises infrastructure or public cloud platforms.

What is the biggest disadvantage of Kubernetes?

The transition to Kubernetes can become slow, complicated, and challenging to manage. Kubernetes has a steep learning curve. It is recommended to have an expert with a more in-depth knowledge of K8s on your team, and this could be expensive and hard to find.

What happens if a pod dies Kubernetes?

If a Node dies, the Pods scheduled to that node are scheduled for deletion after a timeout period. Pods do not, by themselves, self-heal. If a Pod is scheduled to a node that then fails, the Pod is deleted; likewise, a Pod won't survive an eviction due to a lack of resources or Node maintenance.

Is Kubernetes killing Docker?

There is a widespread panic all over the internet lately with regards to the last move of Kubernetes to shun Docker from its platform.


The purpose of Kubernetes is to make it easier to organize and schedule your application across a fleet of machines. At a high level it is an operating system for your cluster.

Basically, it allows you to not worry about what specific machine in your datacenter each application runs on. Additionally it provides generic primitives for health checking and replicating your application across these machines, as well as services for wiring your application into micro-services so that each layer in your application is decoupled from other layers so that you can scale/update/maintain them independently.

While it is possible to do many of these things in application layer, such solutions tend to be one-off and brittle, it's much better to have separation of concerns, where an orchestration system worries about how to run your application, and you worry about the code that makes up your application.


As you read from its Github page:

Kubernetes is an open source system for managing containerized applications across multiple hosts, providing basic mechanisms for deployment, maintenance, and scaling of applications.

Kubernetes is:

lean: lightweight, simple, accessible
portable: public, private, hybrid, multi cloud
extensible: modular, pluggable, hookable, composable
self-healing: auto-placement, auto-restart, auto-replication

Kubernetes builds upon a decade and a half of experience at Google running production workloads at scale, combined with best-of-breed ideas and practices from the community.

For me Kubernetes is a container orchestration tool from Google. Due to its design you can implement compatibility with any container engine, but I think now it's limited to Docker. There are some important concepts in its architecture:

Kubernetes works with the following concepts:

Clusters are the compute resources on top of which your containers are built. Kubernetes can run anywhere! See the Getting Started Guides for instructions for a variety of services.

Pods are a colocated group of Docker containers with shared volumes. They're the smallest deployable units that can be created, scheduled, and managed with Kubernetes. Pods can be created individually, but it's recommended that you use a replication controller even if creating a single pod. More about pods.

Replication controllers manage the lifecycle of pods. They ensure that a specified number of pods are running at any given time, by creating or killing pods as required. More about replication controllers.

Services provide a single, stable name and address for a set of pods. They act as basic load balancers. More about services.

Labels are used to organize and select groups of objects based on key:value pairs. More about labels.

So, you have a group of machines that forms a cluster where your containers are run. Yo can also define a group of containers that provide a service, in a similar way you do with other tools like fig (i.e.: webapp pod can be a rails server and a postgres database). You have also other tools to ensure a number of containers/pods of a service running at the same time, a key-value store, a kind of built-in load balancer...

If you know something about coreos, it's a very similar solution but from Google. Algo Kubernetes has a good integration with Google Cloud Engine.


Kubernetes provides much of the same functionality as Infrastructure as a Service APIs, but aimed at dynamically scheduled containers rather than virtual machines, and as Platform as a Service systems, but with greater flexibility, including:

  • mounting storage systems,
  • distributing secrets,
  • application health checking,
  • replicating application instances,
  • horizontal auto-scaling,
  • naming and discovery,
  • load balancing,
  • rolling updates,
  • resource monitoring,
  • log access and ingestion,
  • support for introspection and debugging, and
  • identity and authorization.

If you already use other mechanisms for service discovery, secret distribution, load balancing, monitoring, etc., of course you can continue to use them, but we aim to make it easy to transition to Kubernetes from existing IaaS and PaaS systems by providing this functionality.

https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/#why-do-i-need-kubernetes-and-what-can-it-do