k8s basic concept

k8s
is a complex cluster management system
kubernetes is Google's open source software, also known as K8S
K8s is mainly used for automated deployment, expansion and management of container applications, providing a complete set of functions such as resource scheduling, deployment management, service discovery, expansion and contraction, monitoring, etc.
The goal of Kubernetes is to make container deployment of containerized applications simple and efficient.

Introduce the
main functions:
Data volumes
are shared between containers in pods, and data volumes can be used
to check application health
. Services in containers may be blocked by processes and cannot process requests. You can set monitoring and check policies to ensure application robustness
. Replication application instance
controllers maintain this pod . The number of replicas ensures that the number of a pod or a group of pods can always be
elastically
scaled Automatically scale the number of pod replicas according to the set indicator (CPU utilization)
Service discovery
Use environment variables or DNS service plug-ins to ensure that programs in the container discover Pod entry access addresses
Load balance
A set of Pod replicas is configured with a private cluster IP address, and load balancing forwards requests to backend containers. In the cluster, other Pods can access the application
rolling update through this ClusterIP. The
update service is not interrupted, and one Pod is updated at a time instead of deleting the entire service at the same time.

Service Orchestration
Deploying servers through file descriptions makes application deployment more efficient.
Resource monitoring
Node node components integrate cAdvisor resource collection tools, which can aggregate the entire cluster node resource data through Heapster. Then store the InfluxDB database, as shown by Grafana

Provide authentication and authorization
Support policies such as role access control (RBAC) authentication and authorization

 

Basic Object Concept
Basic Object
Pod
Pod is the smallest unit. A Pod consists of one or more containers. Pod containers share storage and network and run on the same Docker host.

service
Service An application service abstraction that defines a logical set of Pods and a strategy for accessing this set of Pods. The
service proxy Pod set is externally represented as an access entry, assigning a cluster IP address, and requests from this IP will be load-balanced and forwarded to the back-end Pod container.
The service selects a set of Pods to provide services through the Lable Selector
Volume
data volume, and shares the data used by the containers in the Pod

The Namespace
namespace logically assigns objects to different Namaspaces, which can be managed differently by different projects, users, etc., and set control and management strategies to achieve multi-tenancy
. Namespaces are also called virtual clusters . Labels are used to distinguish objects (such as
Pods ).
, Service), key/value pairs exist; each object can have multiple tags, which are associated with objects through tags.

Based on the higher-level abstraction of basic objects , the next bag of Replication Controllers,
ReplicaSet
, ensures the number of Pod replicas at any given time, and provides functions such as declarations.
The difference between RC and RS is that the lable selector support is different, and RS supports a new set-based label. RC only supports equation-based tags.
Deployment
Deployment is a higher-level API object that manages ReplicaSets and Pods and provides features such as declarative updates.
The official recommendation is to use Deloyment to manage ReplicaSets, which means that you may never need to directly manipulate the Replicaset object
StatefulSet
StatefulSet is suitable for persistent applications, has a unique network identifier (IP), persistent storage, orderly deployment, expansion, deletion and Rolling update.
DaemonSet
DaemonSet ensures that all (or some) nodes run the same Pod. When a node joins the Kubernetes cluster, the Pod will be scheduled to run on the node. When the node is removed from the cluster
, the Pod of the DaemonSet will be deleted. Deleting a DaemonSet will clean up all its created Pod
Jop
one-time tasks. After the operation is completed, the Pod will be destroyed, and new containers will not be restarted. The task can also be run regularly.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326434607&siteId=291194637