Kubernetes Patterns-Distributed Primitives(k8s模式-分布式原语)
Posted Dreamer who
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Kubernetes Patterns-Distributed Primitives(k8s模式-分布式原语)相关的知识,希望对你有一定的参考价值。
To explain what we mean by new abstractions and primitives, here we compare them with the
well-known object-oriented programming (OOP), and Java specifically. In the OOP universe, we
have concepts such as class, object, package, inheritance, encapsulation, and polymorphism. Then
the Java runtime provides specific features and guarantees on how it manages the lifecycle of our
objects and the application as a whole.
The Java language and the Java Virtual Machine (JVM) provide local, in-process building blocks for
creating applications. Kubernetes adds an entirely new dimension to this well-known mindset by
offering a new set of distributed primitives and runtime for building distributed systems that
spread across multiple nodes and processes. With Kubernetes at hand, we don’t rely only on the
local primitives to implement the whole application behavior.
We still need to use the object-oriented building blocks to create the components of the distributed
application, but we can also use Kubernetes primitives for some of the application
behaviors. Table 1-1 shows how various development concepts are realized differently with local
and distributed primitives.
The in-process primitives and the distributed primitives have commonalities, but they are not
directly comparable and replaceable. They operate at different abstraction levels and have different
preconditions and guarantees. Some primitives are supposed to be used together. For example, we
still have to use classes to create objects and put them into container images. However, some other
primitives such as CronJob in Kubernetes can replace the ExecutorService behavior in Java
completely.
以上是关于Kubernetes Patterns-Distributed Primitives(k8s模式-分布式原语)的主要内容,如果未能解决你的问题,请参考以下文章
Kubernetes - Kubernetes部署Kubernetes Dashbaord
Kubernetes——Kubernetes的介绍和使用 kubeadm方式搭建Kubernetes集群
Kubernetes——Kubernetes资源管理+Kubernetes实战入门