In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
The main purpose of this article is to share how Kubernetes manages pod resource objects. The article also introduces the Namespace in Kubernetes. I hope you can get something through this article.
First, the resource object of k8s
Deployment, Service and Pod are the three core resource objects of k8s.
Deployment: the most common controller for stateless applications, which supports expansion, rolling upgrade and other operations of applications.
Service: provides a fixed access interface for flexible and lifecycle Pod objects for service discovery and service access.
Pod: the smallest unit for running containers and scheduling. The same pod can run multiple containers at the same time, these containers share net, UTS, IPC, in addition to USER, PID, MOUNT.
ReplicationController: used to ensure that each Pod copy meets the target number at any time, simply put, it is used for every container or container group that is always running and accessible: the older generation of stateless Pod application controllers.
RwplicatSet: a new generation of stateless Pod application controller, which differs from RC in that it supports tag selectors. RC only supports equivalent selectors (key-value pairs), while RS also supports set-based selectors.
StatefulSet: used to manage stateful persistence applications, such as database service programs, it differs from Deployment in that it creates a unique persistence identifier for each pod and ensures sequence between each pod.
DaemonSet: used to ensure that each node runs a copy of a pod, the new node will also be added to this type of pod, and the pod will be recycled when the node is removed.
Job: used to manage applications that can be terminated after running, such as batch processing to do job tasks
The life cycle of 1.Pod is defined as the following phases. Pending:Pod has been created, but one or more containers have not been created, including the Pod scheduling phase and the download process of the container image. Running:Pod has been dispatched to Node, all containers have been created, and at least one container is running or restarting. All containers in Succeeded:Pod exit normally. All containers in Failed:Pod exit, at least one container exits at once. two。 Characteristics
Pod is the smallest unit that can be created, scheduled, and managed
Each Pod has a separate IP
A Pod consists of one or more containers and shares namespaces, shared storage, etc.; Pod all containers are on the same Node
Container life cycle management
Restrict the use of resources, resources (requests, limits)
Probe the container: livenessProbe
The Pod in the cluster can be accessed arbitrarily, which is usually achieved through a layer 2 network.
3.Pod and Container
In Docker, the container is the smallest processing unit. The object to be added, deleted, changed and checked is the container. The container is a virtualization technology. The containers are isolated and the isolation is based on Linux Namespace.
In K8S, Pod contains one or more related containers, Pod can be regarded as an extension of containers, a Pod is also an isolator, and a set of containers contained in Pod are shared (including PID, Network, IPC, UTS). In addition, containers in Pod can access common data volumes to share file systems.
4. Resource request and restriction
When creating a Pod, you can specify computing resources (currently supported resource types are CPU and memory), that is, specify the resource request (Request) and resource limit (Limit) for each container. The resource request is the minimum resource requirement required by the container, and the resource limit is the resource limit that cannot be exceeded by the container. The relationship is: 0
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.