Data reading and writing method, device, system and equipment based on Kubernetes

By using storage plug-ins and virtual layered file systems in Kubernetes clusters, combined with SSD cache disks, the network pressure problem caused by container read and write operations is solved, cache optimization and management are realized, and network transmission and resource contention are avoided.

CN112632011BActive Publication Date: 2024-09-13SHANGHAI ZHONGTONGJI NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011610556.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-30
Publication Date
2024-09-13
Estimated Expiration
2040-12-30

AI Technical Summary

Technical Problem

The network pressure problem caused by the read and write operations of containers on storage volumes in the Kubernetes cluster. The existing caching solution cannot effectively reduce the network pressure, and the memory cache is limited. When the memory demand of the container increases, the cache capacity decreases.

Method used

Adopt a Kubernetes-based data reading and writing system, create container storage volumes through storage plug-in CSP and virtual hierarchical file system CFS, use SSD cache disks on the host to replace memory cache, reduce network transmission, and use hierarchical virtual file systems Optimize cache management.

Benefits of technology

It reduces network pressure, avoids network transmission, allocates cache space to each container, avoids resource contention, and improves cache optimization and management capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112632011B
    Figure CN112632011B
Patent Text Reader

Abstract

The present invention relates to a data reading and writing method, device, system and equipment based on Kubernetes, belonging to the field of communication technology. The method, device, system and equipment, by setting an SSD high-speed cache disk on a host, no longer use memory resources as cache, thereby avoiding network transmission and reducing network pressure; and the cache data is retained locally on the host and does not need to be accessed through the network; a certain cache space is divided for each container, and there is no competition for resources; the cache optimization and management capabilities of the container are solved through a layered virtual file system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of communication technology, and specifically relates to a data reading and writing method, device, system and equipment based on Kubernetes. Background Art

[0002] Kubernetes is a popular and widely adopted backend distributed service cluster solution that can run a large number of containers on a large number of hosts to accept concurrent access from a large number of clients. A large number of containers will run on the Kubernetes cluster, and these containers require storage resources to save persistent data, such as transaction records and operation logs generated during runtime. Storage resources mainly come from the backend storage cluster, which divides the storage resources into storage volumes and mounts them on the required containers. All storage reads and writes must be completed through network transmission. The reading and writing of storage volumes by a large number of containers has put tremendous pressure on the backend storage cluster.

[0003] To ensure availability, Kubernetes has released the CSI specification. All backend solutions that support Kubernetes container storage must support CSI to be connected to the Kubernetes cluster. The implementation of each solution is called a CSI plugin (CSIPlugin). In order to alleviate the access pressure of a large number of containers to the storage cluster, the commonly used solution in the prior art is to use cache to reduce the frequency of access to storage. There are currently two cache solutions: the first is to use cache disks or memory caches in the backend storage cluster to reduce the pressure on the disk; the second is to use memory as cache on the host where the container runs.

[0004] However, using cache disks on the backend storage cluster cannot solve the pressure on the network. Even if data is read from the cache, it still needs to be sent to the frontend host through the network. The memory-based cache on the host is limited by the memory size and the capacity is not large enough. When the memory demand of the container increases, the operating system will automatically reduce the cache in the memory and provide it to the container, making the cache capacity smaller. Summary of the invention

[0005] In order to at least solve the above-mentioned problems existing in the prior art, the present invention provides a data reading and writing method, device, system and equipment based on Kubernetes.

[0006] The technical solution provided by the present invention is as follows:

[0007] On the one hand, a Kubernetes-based data reading and writing system includes: a storage plug-in CSP and a virtual hierarchical file system CFS; the storage plug-in CSP is used to trigger the virtual hierarchical file system CFS to simulate the creation of a storage volume of a container;

[0008] The storage volume includes an upper layer and a bottom layer; the upper layer of the storage volume includes a file system created on the container host; the bottom layer of the storage volume includes a regional storage volume created by a background storage cluster;

[0009] The storage plug-in CSP is used to receive the CSI call instruction of Kubernetes; according to the CSI call instruction, create the regional storage volume, and connect and mount the regional storage volume to the corresponding container host; create the virtual hierarchical file system CFS on the container host, and provide the connection mounting information of the regional storage volume and the file system information to the virtual hierarchical file system CFS; mount the virtual hierarchical file system CFS on the container host, and provide the virtual hierarchical file system CFS to the container as a storage volume, so that the container reads and writes data to the storage volume.

[0010] Optionally, the storage plug-in CSP is used to allocate a directory on the file system on the container host to provide a location for storing the cache for the container; or, based on self-managed disks, complete the storage of the cache.

[0011] On the other hand, a Kubernetes-based data reading and writing method is provided, which applies any of the above-mentioned Kubernetes-based data reading and writing systems, and the method includes:

[0012] Receive a read request, and determine whether there is content in the storage area corresponding to the file system according to the read / write request; if there is content, read the relevant content corresponding to the read / write request from the content of the storage area, and return the relevant content to the container; if there is content, read the relevant content of the file in the storage area corresponding to the regional storage volume, and return the relevant content to the container;

[0013] Receive a write request and write corresponding write information according to preset write rules.

[0014] Optionally, writing corresponding writing information according to a preset writing rule includes:

[0015] Write the written content to the storage area corresponding to the file system and return the write success information;

[0016] Periodically write the write content of the storage area corresponding to the file system to the storage area corresponding to the regional storage volume.

[0017] Optionally, writing corresponding writing information according to a preset writing rule includes:

[0018] Writing the written content into the storage area corresponding to the regional storage volume;

[0019] Access statistics for write operations.

[0020] Optionally, writing corresponding writing information according to a preset writing rule includes:

[0021] A writing mode is selected, and corresponding writing information is written according to the writing mode and corresponding writing rules.

[0022] Optionally, it also includes: obtaining the read and write frequency of the read and write content, storing the file content whose read and write frequency is within the frequency threshold range, or whose read and write frequency ranking is within a preset range, in the storage area corresponding to the file system; when the space in the storage area corresponding to the file system is filled up, clearing the file content whose read and write frequency is not within the frequency threshold range, or whose read and write frequency ranking is not within the preset range.

[0023] In another aspect, a Kubernetes-based data reading and writing device is provided, applying any of the above-mentioned Kubernetes-based data reading and writing systems, the device comprising: a receiving module and a processing module;

[0024] The receiving module is used to receive a read request and a write request;

[0025] The processing module is used to determine whether there is content in the storage area corresponding to the file system according to the read / write request after receiving a read request; if so, read the relevant content corresponding to the read / write request from the content of the storage area and return the relevant content to the container; if not, read the relevant content of the file in the storage area corresponding to the regional storage volume and return the relevant content to the container; and, after receiving a write request, write the corresponding write information according to a preset write rule.

[0026] Optionally, the processing module is used to write the write content to the storage area corresponding to the file system and return a write success message; and periodically write the write content of the storage area corresponding to the file system to the storage area corresponding to the regional storage volume.

[0027] In another aspect, a Kubernetes-based data reading and writing device includes: a processor, and a memory connected to the processor;

[0028] The memory is used to store a computer program, and the computer program is at least used to execute any one of the above-mentioned Kubernetes-based data reading and writing methods;

[0029] The processor is used to call and execute the computer program in the memory.

[0030] The beneficial effects of the present invention are:

[0031] The Kubernetes-based data reading and writing method, device, system and equipment provided by the embodiments of the present invention, by setting an SSD cache disk on the host, no longer using memory resources as cache, thereby avoiding network transmission and reducing network pressure; and the cache data is retained locally on the host and does not need to be accessed through the network; a certain cache space is allocated for each container, and there is no competition for resources with each other; the ability to optimize and manage the cache of containers is solved through a layered virtual file system. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0033] Figure 1 A schematic diagram of the structure of a data reading and writing system based on Kubernetes provided in an embodiment of the present invention;

[0034] Figure 2 A schematic diagram of a creation process in a data reading and writing system based on Kubernetes provided in an embodiment of the present invention;

[0035] Figure 3 A schematic diagram of a data reading and writing method based on Kubernetes provided in an embodiment of the present invention;

[0036] Figure 4 A schematic diagram of the structure of a data reading and writing device based on Kubernetes provided in an embodiment of the present invention;

[0037] Figure 5 A schematic diagram of the structure of a data reading and writing device based on Kubernetes provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0038] To make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described in detail below. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other implementation methods obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.

[0039] A typical cluster may contain thousands of containers, each of which runs actual service programs. According to business needs, containers need a storage device to save their business data. Since containers run on different hosts and can be migrated at any time, a dedicated storage cluster is generally used in the background to meet the storage needs of containers. The storage cluster divides its storage resources into smaller storage volumes, connects to the host where the container is located through the network, and mounts them into the container for use. All data read and write operations need to be sent to the storage cluster through the network to complete.

[0040] In the existing technology, cache technology is not optimized for containers. All containers share the cache, and it is possible that a container with a large load occupies most of the cache. There are various backend storage clusters on the market, some of which provide cache capabilities and some do not. There is no unified cache mechanism. Cache is a post-relational database that provides three ways to access data: object access, SQL access, and direct access to multidimensional data arrays. Moreover, the three access methods can access the same data concurrently.

[0041] In order to at least solve the technical problem proposed in the present invention, an embodiment of the present invention provides a data reading and writing system based on Kubernetes.

[0042] Figure 1 A schematic diagram of the structure of a data reading and writing system based on Kubernetes provided in an embodiment of the present invention; Figure 2 A schematic diagram of a creation process in a Kubernetes-based data reading and writing system provided in an embodiment of the present invention.

[0043] See also Figure 1 , Figure 2 In the data reading and writing system based on Kubernetes provided by an embodiment of the present invention, a storage plug-in CSP and a virtual hierarchical file system CFS; the storage plug-in CSP is used to trigger the virtual hierarchical file system CFS to simulate the creation of a storage volume V1 of a container; the storage volume V1 includes an upper layer and a lower layer; the upper layer of the storage volume includes a file system C1 created on a container host; the lower layer of the storage volume includes a regional storage volume B1 created by a background storage cluster; the storage plug-in CSP is used to receive a CSI call instruction of Kubernetes; according to the CSI call instruction, the regional storage volume B1 is created, and the regional storage volume B1 is connected and mounted to the corresponding container host; a virtual hierarchical file system CFS is created on the container host, and the connection mounting information and file system information of the regional storage volume B1 are provided to the virtual hierarchical file system CFS; the virtual hierarchical file system CFS is mounted on the container host, and the virtual hierarchical file system CFS is provided to the container as the storage volume V1, so that the container reads and writes data to the storage volume V1.

[0044] In some embodiments, optionally, the storage plug-in CSP is used to allocate a directory C1 on the file system C1 on the container host to provide a location for storing the cache for the container; or, based on self-managed disks, complete the storage of the cache.

[0045] For example, in a specific Kubernetes-based data reading and writing system, you need to create a storage plug-in CSP that complies with the Kubernetes CSI interface and a virtual layered file system CFS. The storage plug-in CSP is registered as a storage provider for the Kubernetes cluster. When Kubernetes needs to create a storage volume for a container, the Kubernetes cluster controller uses this registered CSP to create the container's storage volume V1.

[0046] For example, the storage volume V1 is simulated by the layered virtual file system CFS. It is divided into two layers, the bottom layer is the storage volume B1 created by the background storage cluster, and the upper layer is the file system C1 created on the SSD on the host to which the container belongs.

[0047] The creation of storage volume V1 is completed by the storage plug-in CSP, which is divided into four steps. The specific steps are described as follows: Step 1. After receiving the CSI call from Kubernetes, CSP forwards this call to the background storage cluster CSI interface to complete the creation of the actual storage volume B1 and connect and mount it to the container host. This step is called CSI Relay. The CSI Relay mechanism ensures that any background storage cluster that supports CSI can be supported by this solution without any adjustment. Step 2. Allocate a directory C1 on the SSD disk file system on the host where the container is running, which is specifically provided to this container as a cache storage location. Step 3. Create a virtual file system CFS on the host where the container is running, and provide the connection mounting information of B1 and the C1 information on the SSD to CFS. Step 4. Finally, mount the CFS virtual file system on the host and provide it to the container as storage volume V1.

[0048] The Kubernetes-based data reading and writing system provided by the embodiment of the present invention, by setting an SSD cache disk on the host, no longer uses memory resources as cache, thereby avoiding network transmission and reducing network pressure; and the cache data is retained locally on the host and does not need to be accessed through the network; a certain cache space is allocated for each container, and there is no competition for resources with each other; the cache optimization and management capabilities of the container are solved through a layered virtual file system.

[0049] Based on a general inventive concept, an embodiment of the present invention also provides a data reading and writing method based on Kubernetes.

[0050] Figure 3 For a flow chart of a data reading and writing method based on Kubernetes provided in an embodiment of the present invention, please refer to Figure 3 The method provided in the embodiment of the present invention, using the Kubernetes-based data reading and writing system recorded in any of the above embodiments, may include the following steps:

[0051] S31. Receive a read request, and determine whether there is content in the storage area corresponding to the file system according to the read / write request. If there is content, read the relevant content corresponding to the read / write request from the content of the storage area, and return the relevant content to the container; if there is content, read the relevant content of the file in the storage area corresponding to the regional storage volume B1, and return the relevant content to the container.

[0052] For example, when CFS receives a file read request, it will first check whether there is any existing content in cache area C1. If there is, it will directly read the content from C1 and return it to the container. If there is no content in C1, it will try to read the content of the file in the background B1 and return the result to the container. At the same time, access statistics are performed.

[0053] S32: receiving a write request, and writing corresponding write information according to a preset write rule.

[0054] In some embodiments, optionally, according to preset write rules, corresponding write information is written, including: writing the write content to the storage area corresponding to the file system C1, and returning write success information; periodically writing the write content of the storage area corresponding to the file system C1 to the storage area corresponding to the regional storage volume.

[0055] In some embodiments, optionally, writing corresponding write information according to a preset write rule includes: writing the write content to a storage area corresponding to the regional storage volume; and performing access statistics on the write operation.

[0056] In some embodiments, optionally, writing corresponding write information according to preset write rules includes: selecting a write mode, and writing corresponding write information according to the write mode and the corresponding write rules.

[0057] For example, after CFS receives a write request for a file, there are two options depending on the specific configuration. You can choose one of the options or directly set the corresponding option based on the specific configuration. The two options are: write-back and write-through. In write-back mode, the written content will only be written to the C1 cache area, and then the container will be immediately returned to indicate that the write is successful. CFS will periodically write the written content to the background storage volume B1 again; in write-through mode, the written content will not be placed in the C1 cache area, but will be written directly to the background storage volume B1. CFS will also perform access statistics on all write operations.

[0058] In some embodiments, optionally, it also includes: obtaining the read and write frequency of the read and write content, storing the file content whose read and write frequency is within the frequency threshold range, or whose read and write frequency ranking is within a preset range, in the storage area corresponding to the file system C1; when the space in the storage area corresponding to the file system C1 is filled up, clearing the file content whose read and write frequency is not within the frequency threshold range, or whose read and write frequency ranking is not within the preset range.

[0059] For example, CFS counts all read and write requests and always stores the contents of files that are read and written more frequently in the C1 cache. When C1 is full, it prioritizes swapping out less frequently accessed data to store new data or data with a higher access rate.

[0060] In the embodiment of the present invention, the local SSD disk can be replaced by a common hard disk, Intel Optane disk, or other existing high-speed storage media. The SSD disk may not use a file system, that is, C1 does not use a directory, but completes the cache storage based on self-management of the disk.

[0061] The data reading and writing method based on Kubernetes provided by the embodiment of the present invention sets an SSD cache disk on the host and no longer uses memory resources as cache, thereby avoiding network transmission and reducing network pressure; and the cache data is retained locally on the host and does not need to be accessed through the network; a certain cache space is allocated for each container, and there is no competition for resources with each other; the cache optimization and management capabilities of the container are solved through a layered virtual file system.

[0062] Based on a general inventive concept, an embodiment of the present invention further provides a data reading and writing device based on Kubernetes.

[0063] Figure 4 For a structural diagram of a data reading and writing device based on Kubernetes provided in an embodiment of the present invention, please refer to Figure 4, the device provided by the embodiment of the present invention may include the following structures: a receiving module 41 and a processing module 42;

[0064] A receiving module 41, used for receiving a read request and a write request;

[0065] The processing module 42 is used to determine whether there is content in the storage area corresponding to the file system according to the read / write request after receiving the read request. If so, read the relevant content corresponding to the read / write request from the content of the storage area and return the relevant content to the container; if not, read the relevant content of the file in the storage area corresponding to the regional storage volume B1 and return the relevant content to the container; and, after receiving the write request, write the corresponding write information according to the preset write rule.

[0066] In some embodiments, optionally, the processing module 42 is used to write the write content to the storage area corresponding to the file system C1 and return a write success message; and periodically write the write content of the storage area corresponding to the file system C1 to the storage area corresponding to the regional storage volume.

[0067] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0068] The data reading and writing device based on Kubernetes provided by the embodiment of the present invention, by setting an SSD cache disk on the host, no longer uses memory resources as cache, thereby avoiding network transmission and reducing network pressure; and the cache data is retained locally on the host and does not need to be accessed through the network; a certain cache space is allocated for each container, and there is no competition for resources with each other; the ability to optimize and manage the cache of containers is solved through a layered virtual file system.

[0069] Based on a general inventive concept, an embodiment of the present invention further provides a data reading and writing device based on Kubernetes.

[0070] Figure 5 For a schematic diagram of a data reading and writing device structure based on Kubernetes provided in an embodiment of the present invention, please refer to Figure 5 A data reading and writing device based on Kubernetes provided in an embodiment of the present invention includes: a processor 51, and a memory 52 connected to the processor.

[0071] The memory 52 is used to store a computer program, and the computer program is at least used for the Kubernetes-based data reading and writing method recorded in any one of the above embodiments;

[0072] The processor 51 is used to call and execute the computer program in the memory.

[0073] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0074] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.

[0075] It should be noted that, in the description of the present invention, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "plurality" refers to at least two.

[0076] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

[0077] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0078] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0079] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0080] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0081] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0082] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A data reading and writing system based on Kubernetes, It is characterized in that include: A storage plug-in CSP and a virtual hierarchical file system CFS; the storage plug-in CSP is used to trigger the virtual hierarchical file system CFS to simulate the creation of a storage volume of a container; The storage volume includes an upper layer and a bottom layer; the upper layer of the storage volume includes a file system created on the container host; the bottom layer of the storage volume includes a regional storage volume created by a background storage cluster; The storage plug-in CSP is used to receive the CSI call instruction of Kubernetes; according to the CSI call instruction, create the regional storage volume, and connect and mount the regional storage volume to the corresponding container host; create the virtual hierarchical file system CFS on the container host, and provide the connection mounting information of the regional storage volume and the file system information to the virtual hierarchical file system CFS; mount the virtual hierarchical file system CFS on the container host, and provide the virtual hierarchical file system CFS to the container as a storage volume, so that the container reads and writes data to the storage volume; The storage plug-in CSP is used to allocate a directory on the file system on the container host to provide a cache storage location for the container; or, based on self-managed disks, complete cache storage.

2. A data reading and writing method based on Kubernetes, It is characterized in that Applying the Kubernetes-based data reading and writing system described in claim 1 above, the method includes: Receive a read request, and determine whether there is content in the storage area corresponding to the file system according to the read request; if there is content, read the relevant content corresponding to the read request from the content of the storage area, and return the relevant content to the container; if there is content, read the relevant content of the file in the storage area corresponding to the regional storage volume, and return the relevant content to the container; Receive a write request and write corresponding write information according to preset write rules.

3. The method according to claim 2, It is characterized in that The step of writing corresponding writing information according to a preset writing rule includes: Write the written content to the storage area corresponding to the file system and return the write success information; Periodically write the write content of the storage area corresponding to the file system to the storage area corresponding to the regional storage volume.

4. The method according to claim 2, It is characterized in that The step of writing corresponding writing information according to a preset writing rule includes: Writing the written content into the storage area corresponding to the regional storage volume; Access statistics for write operations.

5. The method according to claim 2, It is characterized in that The step of writing corresponding writing information according to a preset writing rule includes: A writing mode is selected, and corresponding writing information is written according to the writing mode and corresponding writing rules.

6. The method according to claim 2, It is characterized in that Also includes: Obtain the read and write frequency of the read and write content, and store the file content whose read and write frequency is within the frequency threshold range, or whose read and write frequency ranking is within the preset range, in the storage area corresponding to the file system; when the space of the storage area corresponding to the file system is filled up, clean up the file content whose read and write frequency is not within the frequency threshold range, or whose read and write frequency ranking is not within the preset range.

7. A data reading and writing device based on Kubernetes, It is characterized in that The Kubernetes-based data reading and writing system described in claim 1 is applied, wherein the device comprises: a receiving module and a processing module; The receiving module is used to receive a read request and a write request; The processing module is used to determine whether there is content in the storage area corresponding to the file system according to the read request after receiving a read request; if so, read the relevant content corresponding to the read request from the content of the storage area and return the relevant content to the container; if not, read the relevant content of the file in the storage area corresponding to the regional storage volume and return the relevant content to the container; and, after receiving a write request, write the corresponding write information according to a preset write rule.

8. The device according to claim 7, It is characterized in that The processing module is used to write the written content into the storage area corresponding to the file system and return the write success information; and periodically write the written content of the storage area corresponding to the file system into the storage area corresponding to the regional storage volume.

9. A data reading and writing device based on Kubernetes, It is characterized in that include: A processor, and a memory connected to the processor; The memory is used to store a computer program, and the computer program is used at least to execute the Kubernetes-based data reading and writing method according to any one of claims 2 to 6; The processor is used to call and execute the computer program in the memory.