CN117667310A - K8S cluster management method, equipment and storage medium - Google Patents
K8S cluster management method, equipment and storage medium Download PDFInfo
- Publication number
- CN117667310A CN117667310A CN202311688694.8A CN202311688694A CN117667310A CN 117667310 A CN117667310 A CN 117667310A CN 202311688694 A CN202311688694 A CN 202311688694A CN 117667310 A CN117667310 A CN 117667310A
- Authority
- CN
- China
- Prior art keywords
- cluster
- control manager
- management
- user
- user cluster
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000007726 management method Methods 0.000 title claims abstract description 76
- 238000004891 communication Methods 0.000 claims abstract description 31
- 238000000034 method Methods 0.000 claims abstract description 26
- 238000012545 processing Methods 0.000 claims description 11
- 230000001172 regenerating effect Effects 0.000 claims description 5
- 238000013461 design Methods 0.000 description 17
- 238000010586 diagram Methods 0.000 description 7
- 230000003993 interaction Effects 0.000 description 6
- 238000012423 maintenance Methods 0.000 description 5
- 230000000694 effects Effects 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000013475 authorization Methods 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 230000008030 elimination Effects 0.000 description 1
- 238000003379 elimination reaction Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/505—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
- G06F9/5077—Logical partitioning of resources; Management or configuration of virtualized resources
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45595—Network integration; Enabling network access in virtual machine instances
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application provides a K8S cluster management method, equipment and a storage medium. The method comprises the following steps: generating a control manager in a K8S management cluster, wherein the control manager is used for accessing an external network; transmitting an access instruction to a K8S user cluster by adopting the control manager, and establishing communication connection between the K8S user cluster and the K8S management cluster; receiving a service instruction sent by the external network; and based on the service instruction, adopting the control manager to control and manage the K8S user cluster. The method increases the applicability of the control manager in the K8S cluster and improves the user experience.
Description
Technical Field
The present disclosure relates to the field of data processing technologies, and in particular, to a K8S cluster management method, device, and storage medium.
Background
The cloud controller manager (Cloud Controller Manager, ccm) component in the K8S cluster is basically deployed inside the tenant K8S in the current use manner in the industry, and when interaction with an external load balancer is required, each tenant K8S cluster needs to be opened to an external network.
However, in the prior art, cloud controller managers are all deployed in the K8S cluster of the tenant, so that operations such as upgrading and maintenance are difficult, coexistence of versions of the cloud controller managers is easy to occur, the problem that related service components are incompatible with old versions possibly occurs, the management efficiency of the K8S cluster is affected, and user experience is reduced.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The application provides a K8S cluster management method, equipment and a storage medium, which are used for solving the technical problem of difficult maintenance caused by inconsistent versions of control managers in a K8S cluster in the prior art.
In a first aspect, the present application provides a K8S cluster management method, including: generating a control manager in a K8S management cluster, wherein the control manager is used for accessing an external network;
adopting the control manager to send an access instruction to a K8S user cluster, and establishing communication connection between the K8S user cluster and the K8S management cluster;
receiving a service instruction sent by the external network;
and based on the service instruction, adopting the control manager to control and manage the K8S user cluster.
In one possible design, before the K8S management cluster generates the control manager, the method further includes:
creating the K8S user cluster at a user end, and determining the resource service type of the K8S user cluster;
and determining identification information of the K8S user cluster based on the resource service type, wherein the identification information is used for determining the corresponding relation between the K8S user cluster and the control manager.
In one possible design, the method for sending an access instruction to a K8S user cluster by using the control manager, and establishing a communication connection between the K8S user cluster and the K8S management cluster includes:
acquiring the load condition of the control manager;
determining a target control manager based on the load condition;
and sending an access instruction to the K8S user cluster by adopting the target control manager, and establishing communication connection between the K8S user cluster and the K8S management cluster through the target control manager.
In one possible design, determining a target control manager based on the load condition includes:
judging whether the load condition reaches a preset load threshold value or not;
and if the control manager with the load condition not reaching the preset load threshold exists, determining the control manager to be the target control manager.
In one possible design, the method further comprises:
and if the control manager which does not reach the preset load threshold value under the load condition does not exist, regenerating a control manager in the K8S management cluster, and determining the regenerated control manager as the target control manager.
In one possible design, based on the service instruction, the controlling manager is used to control and manage the K8S user cluster, including:
determining the service content of the service instruction;
the business content is issued to the K8S user cluster through the control manager;
and the K8S user cluster performs control management based on the service content.
In one possible design, the control manager is deployed with a stateful services controller.
In a second aspect, the present application provides a K8S cluster management device, including:
the generation module is used for generating a control manager in the K8S management cluster, wherein the control manager is used for accessing an external network;
the communication module is used for sending an access instruction to the K8S user cluster by adopting the control manager and establishing communication connection between the K8S user cluster and the K8S management cluster;
the receiving module is used for receiving the service instruction sent by the external network;
and the processing module is used for controlling and managing the K8S user cluster by adopting the control manager based on the service instruction.
In one possible design, the generating module is specifically configured to:
creating the K8S user cluster at a user end, and determining the resource service type of the K8S user cluster;
and determining identification information of the K8S user cluster based on the resource service type, wherein the identification information is used for determining the corresponding relation between the K8S user cluster and the control manager.
In one possible design, the communication module is specifically configured to:
acquiring the load condition of the control manager;
determining a target control manager based on the load condition;
and sending an access instruction to the K8S user cluster by adopting the target control manager, and establishing communication connection between the K8S user cluster and the K8S management cluster through the target control manager.
In one possible design, the communication module is further specifically configured to:
judging whether the load condition reaches a preset load threshold value or not;
and if the control manager with the load condition not reaching the preset load threshold exists, determining the control manager to be the target control manager.
In one possible design, the communication module is further specifically configured to:
and if the control manager which does not reach the preset load threshold value under the load condition does not exist, regenerating a control manager in the K8S management cluster, and determining the regenerated control manager as the target control manager.
In one possible design, the processing module is specifically configured to:
determining the service content of the service instruction;
the business content is issued to the K8S user cluster through the control manager;
and the K8S user cluster performs control management based on the service content.
In one possible design, the control manager is deployed with a stateful services controller.
In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes the computer-executable instructions stored by the memory to implement the K8S cluster management method of any one of the above.
In a fourth aspect, the present application provides a computer-readable storage medium having stored therein computer-executable instructions for implementing the K8S cluster management method of any one of the above when executed by a processor.
The K8S cluster management method, the K8S cluster management device and the storage medium are used for generating a control manager in the K8S cluster management, wherein the control manager is used for accessing an external network; adopting the control manager to send an access instruction to a K8S user cluster, and establishing communication connection between the K8S user cluster and the K8S management cluster; receiving a service instruction sent by the external network; based on the business instruction, the control manager is adopted to control and manage the K8S user cluster, so that the applicability of the control manager in the K8S cluster is improved, and the technical effect of user experience is further improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic flow chart of a K8S cluster management method provided by the present invention;
fig. 2 is a schematic structural diagram of a K8S cluster management system according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of an interaction flow between a control manager and a K8S user cluster according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a K8S cluster management device according to an embodiment of the present invention;
fig. 5 is a hardware schematic diagram of a K8S cluster management device according to an embodiment of the present invention.
Specific embodiments thereof have been shown by way of example in the drawings and will herein be described in more detail. These drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
The terms referred to in this application are explained first:
kubernetes: the abbreviation K8S is an abbreviation obtained by replacing 8 characters in the middle of the name by 8. Is an open source for managing containerized applications on multiple hosts in a cloud platform, and the goal of Kubernetes is to make deploying containerized applications simple and efficient (powerful), which provides a mechanism for application deployment, planning, updating, and maintenance.
Statefulset controller: stateful is one type of pod controller. StatefulSet is designed for stateless applications to solve the problem of stateful applications.
Kubeconfig: kubeconfig file is used to organize information about clusters, users, namespaces, and authentication mechanisms.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or fully authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards, and provide corresponding operation entries for the user to select authorization or rejection.
In the prior art, a cloud controller manager ccm (Cloud Controller Manager) component in a K8S cluster is basically deployed inside a tenant K8S cluster in a current use manner in industry, and when interaction with an external load balancer is required, each tenant K8S cluster needs to be connected to an external network, so that interaction with the load balancer is realized.
However, many disadvantages exist in the use process of the cloud controller manager ccm in the existing K8S cluster, ccm needs to be linked with an external load balancer, and the tenant K8S cluster needs to actively consider to be communicated with an external network so as to realize interaction; moreover, the ccm component is deployed in the tenant K8S cluster, the upgrade maintenance is difficult, the situation that a plurality of ccm versions coexist is likely to occur, and related services interacted with ccm may not be compatible with the old version ccm.
The specific application scene is a process of managing and upgrading the K8S clusters of multiple tenants at the same time, the K8S clusters of multiple tenants are managed by deploying unified ccm on the K8S management clusters, business operation is realized after kubeconfig files of the K8S clusters are connected, management and upgrading are convenient, the old clusters are actively incompatible through ccm, and compatibility of related business components is not relied on.
The K8S cluster management method provided by the application aims to solve the technical problems in the prior art.
The following describes the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 1 is a flow chart of a K8S cluster management method provided in the present application, which specifically includes the following steps:
s101: and generating a control manager in the K8S management cluster, wherein the control manager is used for accessing an external network.
In this embodiment, first, the K8S user cluster is created at the user end, and the resource service type of the K8S user cluster is determined; and determining the identification information of the K8S user cluster based on the resource service type.
Optionally, the resource service type of the K8S user cluster is recorded in a kubeconfig file, and the kubeconfig file is named, in this embodiment, a cr (cr name: tenantK8Stoken is taken as an example, and TenantK8Stoken is taken as the identification information of the K8S user cluster.
The identification information is used to determine a correspondence between the K8S user cluster and the control manager.
In this embodiment, as shown in the schematic structural diagram of the K8S cluster management system shown in fig. 2, the K8S cluster management system includes a K8S management cluster (i.e. managing K8S in fig. 2), a K8S user cluster (i.e. tenant K8S in fig. 2), and an external load balancer.
Optionally, the control manager component is generated at K8S management cluster, for example: ccm-pod1 and ccm-pod2, and may be communicatively connected with the K8S user cluster through ccm-pod1 and ccm-pod 2.
Specifically, the control manager is deployed by adopting a stateful service controller (statefulset controller), so that the ccm-pod-name is ensured to be unchanged, and the corresponding relation between the ccm-pod and the tenant K8S cluster can be recorded more conveniently; each tenant K8S cluster will only be associated with one ccm-pod in the K8S cluster management system.
It should be noted that, each thread of the tenant K8S processed in the ccm-pod has a unique identifier of the tenant K8S, so that the corresponding relationship between the ccm-pod and the tenant K8S cluster can be conveniently confirmed, and the fault elimination in the subsequent use process is facilitated. The ccm-pod monitoring tenant K8S cluster service is recorded in kubeconfig-cr of the management K8S cluster, and the tenant K8S cluster can be actively connected through a newly built thread, so that communication is realized.
Specifically, the number of the K8S clusters of each tenant linked with each ccm-pod is limited, and after all ccm-pods reach the upper limit, the ccm-pod can be re-created or generated to bear the new K8S clusters of the tenant. And each ccm-pod processes a plurality of tenant K8S clusters, monitors the increase of service event services established in the tenant K8S, all service events can be carried through a message channel, and service events are processed one by one in a queue by adopting a first-in first-out principle, so that the loss of the service events can be effectively prevented.
S102: and sending an access instruction to the K8S user cluster by adopting the control manager, and establishing communication connection between the K8S user cluster and the K8S management cluster.
In this embodiment, the load condition of the control manager is obtained; determining a target control manager based on the load condition; and sending an access instruction to the K8S user cluster by adopting the target control manager, and establishing communication connection between the K8S user cluster and the K8S management cluster through the target control manager.
Specifically, judging whether the load condition reaches a preset load threshold value or not; and if the control manager which does not reach the preset load threshold value under the load condition exists, determining the control manager to be the target control manager.
Optionally, as shown in the schematic flow chart of interaction between the control manager and the K8S user cluster shown in fig. 3, all ccm pod are used to monitor and manage the flag information of the K8S user cluster, and the ccm pod reaching the upper limit of connection does not process the service of the current K8S user cluster, and the ccm pod not reaching the upper limit establishes communication connection with the current tenant K8S.
Specifically, if the control manager which does not reach the preset load threshold value under the load condition does not exist, regenerating a control manager in the K8S management cluster, and determining that the regenerated control manager is the target control manager.
Optionally, if all ccm pod reach the upper limit, automatically expanding one ccm pod to establish communication connection with the current tenant K8S.
It should be noted that, if the kubeconfig file of the tenant K8S will expire, the ccm pod may update the corresponding TenantK8SToken, so as to ensure the communication connection between the tenant K8S and the ccm pod.
S103: and receiving the service instruction sent by the external network.
In this embodiment, ccm-pod is used to receive and call the service instruction sent by the external load balancer, including but not limited to: management, update, upgrade, etc.
S104: and based on the service instruction, adopting the control manager to control and manage the K8S user cluster.
In this embodiment, determining the service content of the service instruction; through the control manager ccm
The pod issues the service content to the K8S user cluster; and the K8S user cluster performs control management based on the service content.
In this embodiment, a plurality of tenant K8S clusters are managed by deploying a unified ccm on the K8S management cluster, service operation is implemented after kubeconfig files of the tenant K8S clusters are connected, management and upgrade are convenient, and the ccm is used for actively removing the old clusters and is not dependent on the compatibility of related service components.
According to the embodiment of the application, the control manager is uniformly deployed on the K8S management cluster, so that the upgrade and maintenance are convenient. The old version cluster compatibility problem can also be actively compatible by using the ccm, is completely autonomous and controllable, and does not require related services interacted with the ccm for compatibility. And the number of ccm pod can be dynamically expanded according to the number of the tenant K8S clusters, and one ccm pod only maintains the tenant K8S clusters with specific number, so that the ccm processing performance is compatible, and the resource utilization rate of ccm is ensured.
Fig. 4 is a schematic structural diagram of a K8S cluster management device according to an embodiment of the present invention. As shown in fig. 4, the K8S cluster management device 40 includes: a generating module 401, a communication module 402, a receiving module 403, and a processing module 404.
A generating module 401, configured to generate a control manager in a K8S management cluster, where the control manager is used to access an external network;
the communication module 402 is configured to send an access instruction to a K8S user cluster by using the control manager, and establish a communication connection between the K8S user cluster and the K8S management cluster;
a receiving module 403, configured to receive a service instruction sent by the external network;
and the processing module 404 is configured to control and manage the K8S user cluster by using the control manager based on the service instruction.
In one possible design, the generating module 401 is specifically configured to:
creating the K8S user cluster at a user end, and determining the resource service type of the K8S user cluster;
and determining identification information of the K8S user cluster based on the resource service type, wherein the identification information is used for determining the corresponding relation between the K8S user cluster and the control manager.
In one possible design, the communication module 402 is specifically configured to:
acquiring the load condition of the control manager;
determining a target control manager based on the load condition;
and sending an access instruction to the K8S user cluster by adopting the target control manager, and establishing communication connection between the K8S user cluster and the K8S management cluster through the target control manager.
In one possible design, the communication module 402 is further specifically configured to:
judging whether the load condition reaches a preset load threshold value or not;
and if the control manager which does not reach the preset load threshold value under the load condition exists, determining the control manager to be the target control manager.
In one possible design, the communication module 402 is further specifically configured to:
and if the control manager which does not reach the preset load threshold value under the load condition does not exist, regenerating a control manager in the K8S management cluster, and determining the regenerated control manager as the target control manager.
In one possible design, the processing module 404 is specifically configured to:
determining the service content of the service instruction;
the business content is issued to the K8S user cluster through the control manager;
and the K8S user cluster performs control management based on the service content.
Fig. 5 is a hardware schematic diagram of a K8S cluster management device according to an embodiment of the present invention. As shown in fig. 5, the K8S cluster management device 50 provided in this embodiment includes: at least one processor 501 and a memory 502. The device 50 further comprises a communication component 503. The processor 501, the memory 502, and the communication unit 503 are connected via a bus 504.
In a specific implementation, at least one processor 501 executes the computer-executable instructions stored in the memory 502, so that at least one processor 501 performs the K8S cluster management method as described above.
The specific implementation process of the processor 501 may refer to the above-mentioned method embodiment, and its implementation principle and technical effects are similar, and this embodiment will not be described herein again.
In the embodiment shown in fig. 5, it should be understood that the processor may be a central processing unit (english: central Processing Unit, abbreviated as CPU), or may be other general purpose processors, digital signal processors (english: digital Signal Processor, abbreviated as DSP), application specific integrated circuits (english: application Specific Integrated Circuit, abbreviated as ASIC), or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
The memory may comprise high speed RAM memory or may further comprise non-volatile storage NVM, such as at least one disk memory.
The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (Peripheral Component, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of the present application are not limited to only one bus or one type of bus.
The application also provides an electronic device comprising: a processor and a memory communicatively coupled to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement any one of the K8S cluster management methods described above.
The application also provides a computer readable storage medium, in which computer executable instructions are stored, and when a processor executes the computer executable instructions, the above K8S cluster management method is implemented.
The computer readable storage medium described above may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk. A readable storage medium can be any available medium that can be accessed by a general purpose or special purpose computer.
An exemplary readable storage medium is coupled to the processor such the processor can read information from, and write information to, the readable storage medium. In the alternative, the readable storage medium may be integral to the processor. The processor and the readable storage medium may reside in an application specific integrated circuit (Application Specific Integrated Circuits, ASIC for short). It is also possible that the processor and the readable storage medium are present as discrete components in the device X0.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.
Claims (10)
1. A method for K8S cluster management, comprising:
generating a control manager in a K8S management cluster, wherein the control manager is used for accessing an external network;
adopting the control manager to send an access instruction to a K8S user cluster, and establishing communication connection between the K8S user cluster and the K8S management cluster;
receiving a service instruction sent by the external network;
and based on the service instruction, adopting the control manager to control and manage the K8S user cluster.
2. The method of claim 1, wherein prior to the K8S management cluster generating the control manager, the method further comprises:
creating the K8S user cluster at a user end, and determining the resource service type of the K8S user cluster;
and determining identification information of the K8S user cluster based on the resource service type, wherein the identification information is used for determining the corresponding relation between the K8S user cluster and the control manager.
3. The method of claim 1, wherein using the control manager to send an access instruction to a K8S user cluster and establishing a communication connection between the K8S user cluster and the K8S management cluster comprises:
acquiring the load condition of the control manager;
determining a target control manager based on the load condition;
and sending an access instruction to the K8S user cluster by adopting the target control manager, and establishing communication connection between the K8S user cluster and the K8S management cluster through the target control manager.
4. A method according to claim 3, wherein determining a target control manager based on the load condition comprises:
judging whether the load condition reaches a preset load threshold value or not;
and if the control manager with the load condition not reaching the preset load threshold exists, determining the control manager to be the target control manager.
5. The method according to claim 4, wherein the method further comprises:
and if the control manager which does not reach the preset load threshold value under the load condition does not exist, regenerating a control manager in the K8S management cluster, and determining the regenerated control manager as the target control manager.
6. The method according to any one of claims 1 to 5, wherein employing the control manager to control and manage the K8S user cluster based on the service instruction comprises:
determining the service content of the service instruction;
the business content is issued to the K8S user cluster through the control manager;
and the K8S user cluster performs control management based on the service content.
7. The method of claim 1, wherein the control manager is deployed with a stateful services controller.
8. A K8S cluster management device, comprising:
the generation module is used for generating a control manager in the K8S management cluster, wherein the control manager is used for accessing an external network;
the communication module is used for sending an access instruction to the K8S user cluster by adopting the control manager and establishing communication connection between the K8S user cluster and the K8S management cluster;
the receiving module is used for receiving the service instruction sent by the external network;
and the processing module is used for controlling and managing the K8S user cluster by adopting the control manager based on the service instruction.
9. An electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored by the memory to implement the K8S cluster management method of any one of claims 1 to 7.
10. A computer readable storage medium, wherein computer executable instructions are stored in the computer readable storage medium, which when executed by a processor is configured to implement the K8S cluster management method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311688694.8A CN117667310A (en) | 2023-12-08 | 2023-12-08 | K8S cluster management method, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311688694.8A CN117667310A (en) | 2023-12-08 | 2023-12-08 | K8S cluster management method, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117667310A true CN117667310A (en) | 2024-03-08 |
Family
ID=90078588
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311688694.8A Pending CN117667310A (en) | 2023-12-08 | 2023-12-08 | K8S cluster management method, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117667310A (en) |
-
2023
- 2023-12-08 CN CN202311688694.8A patent/CN117667310A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109271265B (en) | Request processing method, device, equipment and storage medium based on message queue | |
US10541869B2 (en) | Upgrading of controller cluster | |
US8307417B2 (en) | Port enablement | |
CN107729176B (en) | Disaster recovery method and disaster recovery system for configuration file management system | |
CN113595788B (en) | API gateway management method and device based on plug-in | |
CN110245031B (en) | AI service opening middle platform and method | |
CN111314212B (en) | API gateway based on Netty and plug-in mechanism and control method | |
CN105981332A (en) | Broadcasting management information using fountain codes | |
CN108874825B (en) | Abnormal data verification method and device | |
CN109672553A (en) | Gateway Dynamic Configuration, system, computer equipment and storage medium | |
CN110855746A (en) | Middleware management method, electronic device and storage medium | |
US20080183878A1 (en) | System And Method For Dynamic Patching Of Network Applications | |
CN113391959B (en) | Method, device, equipment and medium for preventing error in upgrading rollback of power monitoring system container | |
CN111124593B (en) | Information processing method and device, network element and storage medium | |
CN113765871B (en) | Method and device for managing fort machine | |
CN112910987A (en) | Message pushing method, system, device, equipment and storage medium | |
CN117667310A (en) | K8S cluster management method, equipment and storage medium | |
EP3843361A1 (en) | Resource configuration method and apparatus, and storage medium | |
CN114422358B (en) | API gateway configuration updating method and equipment | |
CN116489024A (en) | Method, device, equipment and medium for improving application performance of K8S cluster container | |
CN112148324B (en) | Method, apparatus and computer readable storage medium for upgrading electronic apparatus | |
CN115396430A (en) | Cloud mobile phone management method and system | |
CN111124428A (en) | Application automatic publishing method based on middleware creating and related device | |
CN110399138A (en) | A kind of method, apparatus, equipment and the storage medium of software unloading | |
CN112445503A (en) | Upgrading method, communication equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |