In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Main functions of Kubernetes 1. Data Volume
Data is shared between containers in Pod, and data volumes can be used.
2. Application health check
The service in the container may be blocked and unable to process requests. You can set a monitoring and checking policy to ensure application robustness.
3. Copy the application instance
The controller maintains the number of Pod copies, ensuring that a Pod or a set of similar Pod quantities are always available.
4. Elastic expansion
automatically scales the number of Pod copies according to the set indicator (CPU utilization).
5. Service discovery
uses environment variables or DNS service plug-ins to ensure that the program in the container discovers the Pod entry access address.
6. Load balancing
A group of Pod replicas of are assigned a private ClusterIP address, and the cloud load balancer forwards the request to the backend container. Other Pod within the cluster can access the application through this ClusterIP.
7. Rolling updates
The update service is uninterrupted, updating one Pod at a time, rather than deleting the entire service at the same time.
8. Service arrangement
makes application deployment more efficient by describing deployment services in a file.
9. Resource monitoring
The Node node component integrates the cAdvisor resource collection tool, which can summarize the resource data of the entire cluster node through Heapster, then store it in the InfluxDB timing database, and then display it by Grafana.
10. Provide authentication and authorization
supports attribute access control (ABAC) and role access control (RBAC) authentication and authorization policies.
2. Kubernetes basic object concept (resource object) 1. Basic object: 1. Pod
Pod is the smallest deployment unit. A Pod consists of one or more containers that share storage and network in Pod and run on the same Docker host.
2 、 Service
Service is an application service abstraction that defines the Pod logical collection and the policy to access the Pod collection.
The Service proxy Pod collection is externally represented as an access entry, assigning a cluster IP address, and the request from this IP forwards the load balancer to the container in the backend Pod.
Service selects a set of Pod to provide services through LableSelector.
, one pod with multiple tags.
can call multiple pod with one tag.
3 、 Volume
data volumes that share the data used by containers in Pod.
4 、 Namespace
namespaces logically assign objects to different Namespace, which can be managed differently by different projects, users, etc., and set control policies to achieve multi-tenancy.
The namespace is also known as a virtual cluster.
5 、 Lable
tags are used to distinguish between objects (such as Pod, Service), key / value pairs exist; each object can have multiple tags, associated with objects through tags.
2. Kubernetes is abstracted at a higher level based on basic objects. 1. ReplicaSet
next generation ReplicationController. Ensures the number of Pod copies specified at any given time and provides features such as declarative updates.
The only difference between RC and RS is that lableselector supports new set-based tags, RS supports new set-based tags, and RC only supports equality-based tags.
2 、 Deployment
Deployment is a higher-level API object that manages ReplicaSets and Pod and provides features such as declarative updates.
officially recommends using Deployment to manage ReplicaSets instead of using ReplicaSets directly, which means that you may never need to manipulate ReplicaSet objects directly.
3 、 StatefulSet
StatefulSet is suitable for persistent applications, with unique network identifiers (IP), persistent storage, and orderly deployment, extension, deletion, and rolling updates.
4 、 DaemonSet
demonSet ensures that all (or some) nodes are running the same Pod. When a node joins the Kubernetes cluster, the Pod is scheduled to run on the node, and when the node is removed from the cluster, the Pod of the DaemonSet is deleted. Deleting a DaemonSet cleans up all the Pod it creates.
5 、 Job
one-time task. After the completion of the run, the Pod is destroyed and the new container is not restarted. Tasks can also be run regularly.
3. Understanding and definition of Kubernetes resource objects 1. Pod
Kubernetes assigns a unique IP address to each Pod, called Pod IP, and multiple containers in a Pod share Pod IP addresses. Kubernetes requires the underlying network to support direct TCP/IP communication between any two Pod in the cluster, which is usually realized by virtual layer 2 network technology, such as Flannel, Open vSwitch and so on. Therefore, in Kubernetes, a container in one Pod can communicate directly with a Pod container on another host.
There are two types of Pod: normal Pod and static Pod (Static Pod). Static Pod is not stored in etcd storage, but in a specific file on a specific Node, and only starts running on this Node. Once a normal Pod is created, it is stored in etcd, and then dispatched by Kubernetes Master to a specific Node and Binding, the kubelet process on that Node instantiates it into a set of related Docker containers and starts it. When a container in the Pod stops, Kubernetes automatically detects the problem and restarts the Pod (restart all containers in the Pod); if the Node where the Pod is located is down, all Pod on this Node will be rescheduled to run on other nodes.
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.