CN116009888A - Kubernetes resource release method and device for blue-green release - Google Patents

Kubernetes resource release method and device for blue-green release Download PDF

Info

Publication number
CN116009888A
CN116009888A CN202310031640.8A CN202310031640A CN116009888A CN 116009888 A CN116009888 A CN 116009888A CN 202310031640 A CN202310031640 A CN 202310031640A CN 116009888 A CN116009888 A CN 116009888A
Authority
CN
China
Prior art keywords
application program
setting
new version
application
node
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
Application number
CN202310031640.8A
Other languages
Chinese (zh)
Inventor
刘岩
邹拓
李永
张伟
季春光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Travelsky Technology Co Ltd
Original Assignee
China Travelsky Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by China Travelsky Technology Co Ltd filed Critical China Travelsky Technology Co Ltd
Priority to CN202310031640.8A priority Critical patent/CN116009888A/en
Publication of CN116009888A publication Critical patent/CN116009888A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The utility model provides a kubernetes resource release method and device for blue-green release, which realizes that the kubernetes cluster is utilized to meet the double resource requirement in the blue-green release process by applying for the temporary node, and after release is completed, the temporary node can be removed, so that resources are saved. Before removing the temporary node, the new version of the application program can be stably scheduled from the temporary node to the fixed node through rolling update, and then the temporary node is removed, so that application load jitter caused by resource release is avoided, and application load jitter caused by resource release is avoided while resource saving is realized. And the formally released application can be finally kept on the fixed node purchased for a long time, so that the service can be maximally stabilized, and the temporary node is set to be in an invalid state, so that the cost is reduced.

Description

Kubernetes resource release method and device for blue-green release
Technical Field
The application relates to the technical field of computers, in particular to a kubernetes resource release method and device for blue-green release.
Background
In the application release process, the purpose of using the bluish green release process is generally to reduce the jitter of the application load in the release process, and to quickly roll back when a problem occurs in the release process, so as to reduce the influence on an online system as much as possible. However, the above method requires preparation of double resources, and the excessive resources are not used at ordinary times and are wasted.
It follows that saving resources and reducing jitter of the application load is not compatible.
Disclosure of Invention
In order to solve the above technical problems, the technical solution provided in the embodiments of the present application is as follows:
the kubernetes resource release method for blue-green release is characterized by comprising the following steps of:
if a current version of application program exists in the kubernetes cluster for executing the application blue-green release task, setting a flow scheduling strategy scheme to schedule a request of a user for accessing the application to the current version of application program;
applying for a temporary node, and adding the temporary node into the kubernetes cluster;
performing taint setting on the temporary node so that the temporary node does not accept application programs which are not subjected to taint tolerance setting;
setting an affinity identifier for the temporary node;
performing stain tolerance setting on the new version of application program and performing affinity setting on the affinity mark so that the new version of application program can be scheduled to the temporary node;
modifying the flow scheduling policy scheme to schedule a request of a user for accessing an application to the new version of application program;
judging whether the new version of the application program on the temporary node accords with expectations or not;
if not, the flow scheduling strategy scheme is revised to schedule the request of the user for accessing the application to the application program of the current version;
deleting the new version of the application program;
removing the temporary node from the kubernetes cluster;
if yes, deleting the application program of the current version, rolling and updating the application program of the new version to a fixed node in the kubernetes cluster, and canceling the stain tolerance setting and the affinity setting of the application program of the new version;
and removing the temporary node from the kubernetes cluster.
Optionally, after removing the temporary node from the kubernetes cluster, the method further includes:
and setting the temporary node as an invalid state.
Optionally, the scrolling updates the new version of the application program to a fixed node in the kubernetes cluster, including:
canceling stain tolerance setting and affinity setting in a poll object of the corresponding pod object of the application program for managing the new version, redeploying the poll object, and setting an update strategy of the redeployed poll object, so that the redeployed poll object scrolls and updates the pod object corresponding to the application program of the new version to a fixed node in the kubernetes cluster based on the update strategy.
Optionally, the scrolling updates the new version of the application program to a fixed node in the kubernetes cluster, including:
and deploying a new delete corresponding to the new version of the application program, deleting the pod object managed by the original delete corresponding to the new version of the application program based on an update strategy, expanding the new delete based on the deleted pod object so that the new delete obtains the pod object corresponding to the new version of the application program, and updating the pod object in a rolling way to a fixed node in the kubenetes cluster, wherein the new delete does not carry out stain tolerance setting and affinity setting.
A kubernetes resource release device for blue-green publication, comprising:
the first setting module is used for setting a flow scheduling strategy scheme to schedule a request of a user for accessing an application to the current version of application program if the current version of application program exists in the kubernetes cluster for executing the application bluish-green release task;
the application and addition module is used for applying for temporary node nodes and adding the temporary node nodes into the kubernetes cluster;
the second setting module is used for performing the stain setting on the temporary node so that the temporary node does not accept the use of an application program which is not subjected to the stain tolerance setting;
the third setting module is used for setting an affinity identifier for the temporary node;
the fourth setting module is used for carrying out stain tolerance setting on the new version of application program and carrying out affinity setting on the affinity identifier so that the new version of application program can be scheduled on the temporary node;
the first modification module is used for modifying the flow scheduling policy scheme to schedule the request of the user for accessing the application to the new version application program;
the judging module is used for judging whether the new version of the application program on the temporary node accords with the expectation;
the second modification module is used for modifying the flow scheduling strategy scheme again to schedule the request of the user for accessing the application to the application program of the current version if the application program of the new version does not accord with the expectations;
the first deleting module is used for deleting the new version of application program;
the removing module is used for removing the temporary node from the kubernetes cluster;
the second deleting module is used for deleting the application program of the current version if the application program of the new version accords with the expectation;
the updating module is used for rolling and updating the new version of application program to the fixed node in the kubernetes cluster;
and the cancellation module is used for canceling the stain tolerance setting and the affinity setting of the new version application program and triggering the execution of the removal module.
Optionally, the apparatus further includes:
and a fifth setting module, configured to set the temporary node to an invalid state.
Optionally, the updating module is specifically configured to:
canceling stain tolerance setting and affinity setting in a poll object of the corresponding pod object of the application program for managing the new version, redeploying the poll object, and setting an update strategy of the redeployed poll object, so that the redeployed poll object scrolls and updates the pod object corresponding to the application program of the new version to a fixed node in the kubernetes cluster based on the update strategy.
Optionally, the updating module is specifically configured to:
and deploying a new delete corresponding to the new version of the application program, deleting the pod object managed by the original delete corresponding to the new version of the application program based on an update strategy, expanding the new delete based on the deleted pod object so that the new delete obtains the pod object corresponding to the new version of the application program, and updating the pod object in a rolling way to a fixed node in the kubenetes cluster, wherein the new delete does not carry out stain tolerance setting and affinity setting.
A control node, comprising: a control component and a storage component;
a storage component for storing at least one set of instructions;
and the control component is used for calling and executing the instruction set in the first storage component, and executing the kubernetes resource release method for blue-green release according to any one of the above by executing the instruction set.
A storage medium storing a computer program implementing the kubernetes resource release method for blue-green publication according to any one of the above, the computer program being executed by a processor to implement the kubernetes resource release for blue-green publication according to any one of the above.
Compared with the prior art, the beneficial effects of this application are:
in the method, the double resource requirements in the blue-green release process are met by applying for the temporary node, the kubernetes cluster is utilized, and after release is completed, the temporary node can be removed, so that resources are saved. Before removing the temporary node, the new version of the application program can be stably scheduled from the temporary node to the fixed node through rolling update, and then the temporary node is removed, so that application load jitter caused by resource release is avoided, and application load jitter caused by resource release is avoided while resource saving is realized.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
Fig. 1 is a flowchart of a kubernetes resource release method for blue-green publishing provided in embodiment 1 of the present application;
FIG. 2 is a schematic diagram of a resource structure of a kubernetes cluster provided in the present application;
fig. 3 is a flowchart of a kubernetes resource release method for blue-green publishing provided in embodiment 2 of the present application;
fig. 4 is a schematic structural diagram of a kubernetes resource release device for blue-green release provided in the present application.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
Next, a description will be given of a kubernetes resource release method for blue-green publishing disclosed in the embodiments of the present application, as shown in fig. 1, which is a flowchart of a kubernetes resource release method for blue-green publishing provided in embodiment 1 of the present application, where the method may include, but is not limited to, the following steps:
and S11, if the current version of application program exists in the kubernetes cluster for executing the application bluish-green release task, setting a flow scheduling strategy scheme to schedule the request of the user for accessing the application to the current version of application program.
In this embodiment, whether a pod object of an application program of a current version that has been normally operated exists may be determined by looking at a depth in a kubernetes cluster for executing an application blue-green publishing task, and if a pod object of an application program of a current version that has been normally operated exists, it is determined that an application program of a current version exists in a kubernetes cluster for executing an application blue-green publishing task.
And confirming the version of the pod object, if the version of the pod object is the version of the discover, the service binding discover can be used for traffic scheduling; if the version of the pod object is the version of the application, gateway can be used to schedule traffic for the application version.
Traffic scheduling policy schemes may include, but are not limited to: traffic scheduling schemes using gateway or service.
And step S12, applying for a temporary node, and adding the temporary node into the kubernetes cluster.
In this embodiment, the temporary node may be applied according to the resource usage or the short-term ECS instance resource. And joining the temporary node into the kubernetes cluster using a kuboadm join command.
The kubernetes cluster added with the temporary node comprises a fixed cluster resource and a temporary cluster resource, the node included in the fixed cluster resource is the original node, and the temporary cluster resource includes the temporary node, as shown in fig. 2. It should be noted that fig. 2 is only one example, and is not intended to limit the number of original node nodes and temporary node nodes in the present application.
And S13, performing taint setting on the temporary node so that the temporary node does not accept application programs which are not subjected to taint tolerance setting.
In this embodiment, the temporary node may be set with, but not limited to, kubectl taint nodes node key=value: noExecute.
And step S14, setting an affinity identifier for the temporary node.
In this embodiment, kubectl label nodes node key =value may be used to set an affinity identifier for the temporary node.
And S15, performing stain tolerance setting on the new version of application program and performing affinity setting on the affinity identifier so that the new version of application program can be scheduled on the temporary node.
In the development, the stain tolerance setting and the affinity setting for the affinity identifier can be performed on the new version of the application program in various manners (such as kubectl, helm or using java client to call master api, etc.). The following is an example of settings for simplicity of illustration of setting stain tolerance and setting affinity for the affinity tag:
stain tolerance setting:
tolerations[0].key=key
tolerations[0].operator=Equal
tolerations[0].value=value
tolerations[0].effect=NoExecute
affinity setting:
affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[0].matchExpressions[0].key=key
affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[0].matchExpressions[0].operator=In
affinity.nodeAffinity.requiredDuringSchedulingIgnoredDuringExecution.nodeSelectorTerms[0].matchExpressions[0].values[0]=value
and S16, modifying the flow scheduling strategy scheme to schedule the request of the user for accessing the application to the new version application program.
Specifically, a traffic scheduling policy scheme using gateway, such as { weight:1, version: v0.1}, may be modified so that traffic is directed to all new versions of the application; or, modifying a traffic scheduling policy scheme using the service, for example, setting service spec selector version, v0.1, so that the service traffic is led to the pod object of the newly deployed discover corresponding to the temporary node.
And step S17, judging whether the new version of the application program on the temporary node accords with expectations.
If not, executing step S18; if so, step S111 is performed.
And step S18, the flow scheduling strategy scheme is modified again to schedule the request of the user for accessing the application to the application program of the current version.
In this embodiment, the flow scheduling policy scheme may be modified again in a modification manner in step S16 to schedule the request of the user for accessing the application to the application program of the current version, which is not described herein.
And step S19, deleting the new version of application program.
And step S110, removing the temporary node from the kubernetes cluster.
And step 111, deleting the application program of the current version, rolling and updating the application program of the new version to a fixed node in the kubernetes cluster, and canceling the stain tolerance setting and the affinity setting of the application program of the new version.
In this embodiment, the scrolling to update the new version of the application program to the fixed node in the kubernetes cluster may include, but is not limited to:
s1111, canceling stain tolerance setting and affinity setting in a poll object of the poll object corresponding to the application program for managing the new version, redeploying the poll object, and setting an update strategy of the redeployed poll object, so that the redeployed poll object scrolls and updates the pod object corresponding to the application program of the new version to a fixed node in the kuubernes cluster based on the update strategy.
Of course, the scrolling updates the new version of the application to the fixed node nodes in the kubernetes cluster, also includes but is not limited to:
s1112, deploying a new replyment corresponding to the new version of application program, deleting the pod object managed by the original replyment corresponding to the new version of application program based on an update strategy, expanding the new replyment based on the deleted pod object, so that the new replyment obtains the pod object corresponding to the new version of application program, and rolling and updating the pod object to a fixed node in the kuuberes cluster, wherein the new replyment does not perform stain tolerance setting and affinity setting.
After canceling the stain tolerance setting and the affinity setting of the new version of the application, step S110 is performed.
In this embodiment, by applying for the temporary node, the kubernetes cluster is used to meet the double resource requirement in the blue-green publishing process, and after the publishing is completed, the temporary node can be removed, so as to save resources. Before removing the temporary node, the new version of the application program can be stably scheduled from the temporary node to the fixed node through rolling update, and then the temporary node is removed, so that application load jitter caused by resource release is avoided, and application load jitter caused by resource release is avoided while resource saving is realized.
And the formally released application can be finally kept on the fixed node purchased for a long time, so that the service can be maximally stabilized.
As another optional embodiment of the present application, referring to fig. 3, a flowchart of embodiment 2 of a kubernetes resource release method for blue-green publication is provided, and this embodiment is mainly an extension of the kubernetes resource release method for blue-green publication described in embodiment 1, as shown in fig. 3, where the method may include, but is not limited to, the following steps:
and S21, if the current version of application program exists in the kubernetes cluster for executing the application bluish-green release task, setting a flow scheduling strategy scheme to schedule the request of the user for accessing the application to the current version of application program.
And S22, applying for a temporary node, and adding the temporary node into the kubernetes cluster.
And S23, performing taint setting on the temporary node so that the temporary node does not accept application programs which are not subjected to taint tolerance setting.
And step S24, setting an affinity identifier for the temporary node.
And S25, performing stain tolerance setting on the new version of application program and performing affinity setting on the affinity identifier so that the new version of application program can be scheduled on the temporary node.
And step S26, modifying the flow scheduling strategy scheme to schedule the request of the user for accessing the application to the new version application program.
And step S27, judging whether the new version of the application program on the temporary node accords with the expectations.
If not, executing step S28; if so, step S212 is performed.
And step S28, the flow scheduling strategy scheme is modified again to schedule the request of the user for accessing the application to the application program of the current version.
And step S29, deleting the new version of application program.
And S210, removing the temporary node from the kubernetes cluster.
The detailed procedure of steps S21-S210 can be referred to the related description of steps S11-S110 in embodiment 1, and will not be repeated here.
Step S211, setting the temporary node as an invalid state.
Setting the temporary node to an invalid state, namely returning the temporary node, reduces the cost.
And S212, deleting the application program of the current version, scrolling and updating the application program of the new version to a fixed node in the kubernetes cluster, and canceling the stain tolerance setting and the affinity setting of the application program of the new version.
The detailed process of step S212 can be referred to the related description of step S111 in embodiment 1, and will not be repeated here.
After canceling the stain tolerance setting and the affinity setting of the new version of the application, step S210 and step S211 are performed.
In this embodiment, by applying for the temporary node, the kubernetes cluster is used to meet the double resource requirement in the blue-green publishing process, and after the publishing is completed, the temporary node can be removed, so as to save resources. Before removing the temporary node, the new version of the application program can be stably scheduled from the temporary node to the fixed node through rolling update, and then the temporary node is removed, so that application load jitter caused by resource release is avoided, and application load jitter caused by resource release is avoided while resource saving is realized.
And the formally released application can be finally kept on the fixed node purchased for a long time, so that the service can be maximally stabilized, and the temporary node is set to be in an invalid state, so that the cost is reduced.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
Although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The kubernetes resource release device for blue-green release provided by the application is described next, and the kubernetes resource release device for blue-green release described below and the kubernetes resource release method for blue-green release described above can be referred to correspondingly.
Referring to fig. 4, a kubernetes resource release device for blue-green publication includes: the system comprises a first setting module 10, an application and addition module 20, a second setting module 30, a third setting module 40, a fourth setting module 50, a first modification module 60, a judgment module 70, a second modification module 80, a first deletion module 90, an extraction module 100, a second deletion module 110, an update module 120 and a cancellation module 130.
The first setting module 10 is configured to set a traffic scheduling policy scheme to schedule a request of a user to access an application to a current version of an application program if the current version of the application program exists in a kubernetes cluster for executing an application blue-green publishing task;
an application and joining module 20, configured to apply for a temporary node, and join the temporary node to the kubernetes cluster;
a second setting module 30, configured to perform a stain setting on the temporary node, so that the temporary node does not accept use of an application program that does not perform a stain tolerance setting;
a third setting module 40, configured to set an affinity identifier for the temporary node;
a fourth setting module 50, configured to perform stain tolerance setting on the new version of the application program and perform affinity setting on the affinity identifier, so that the new version of the application program can be scheduled on the temporary node;
a first modification module 60, configured to modify the traffic scheduling policy scheme to schedule a request of a user to access an application to the new version of the application program;
a judging module 70, configured to judge whether the new version of the application program on the temporary node accords with an expectation;
a second modification module 80, configured to, if the new version of the application program does not meet the expectations, re-modify the traffic scheduling policy scheme to schedule a request for accessing the application by the user to the current version of the application program;
a first deleting module 90, configured to delete the new version of the application program;
an removing module 100, configured to remove the temporary node from the kubernetes cluster;
a second deleting module 110, configured to delete the current version of the application program if the new version of the application program meets the expectations;
the updating module 120 is configured to scroll and update the new version of the application program to a fixed node in the kubernetes cluster;
and the cancellation module 130 is configured to cancel the stain tolerance setting and the affinity setting of the new version of the application program, and trigger the removal module to execute.
The apparatus may further include:
and a fifth setting module, configured to set the temporary node to an invalid state.
The update module 120 may specifically be configured to:
canceling stain tolerance setting and affinity setting in a poll object of the corresponding pod object of the application program for managing the new version, redeploying the poll object, and setting an update strategy of the redeployed poll object, so that the redeployed poll object scrolls and updates the pod object corresponding to the application program of the new version to a fixed node in the kubernetes cluster based on the update strategy.
The update module 120 may specifically be configured to:
and deploying a new delete corresponding to the new version of the application program, deleting the pod object managed by the original delete corresponding to the new version of the application program based on an update strategy, expanding the new delete based on the deleted pod object so that the new delete obtains the pod object corresponding to the new version of the application program, and updating the pod object in a rolling way to a fixed node in the kubenetes cluster, wherein the new delete does not carry out stain tolerance setting and affinity setting.
In another embodiment of the present application, there is provided a control node comprising: a control component and a storage component;
a storage component for storing at least one set of instructions;
a control component, configured to invoke and execute the instruction set in the first storage component, and execute the kubernetes resource release method for blue-green release according to the above embodiment 1 or 2 by executing the instruction set.
In another embodiment of the present application, there is provided a storage medium storing a computer program implementing the kubernetes resource release method for blue-green publication described in embodiment 1 or 2 above, the computer program being executed by a processor to implement the kubernetes resource release for blue-green publication described in embodiment 1 or 2 above.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.
While several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).

Claims (10)

1. The kubernetes resource release method for blue-green release is characterized by comprising the following steps of:
if a current version of application program exists in the kubernetes cluster for executing the application blue-green release task, setting a flow scheduling strategy scheme to schedule a request of a user for accessing the application to the current version of application program;
applying for a temporary node, and adding the temporary node into the kubernetes cluster;
performing taint setting on the temporary node so that the temporary node does not accept application programs which are not subjected to taint tolerance setting;
setting an affinity identifier for the temporary node;
performing stain tolerance setting on the new version of application program and performing affinity setting on the affinity mark so that the new version of application program can be scheduled to the temporary node;
modifying the flow scheduling policy scheme to schedule a request of a user for accessing an application to the new version of application program;
judging whether the new version of the application program on the temporary node accords with expectations or not;
if not, the flow scheduling strategy scheme is revised to schedule the request of the user for accessing the application to the application program of the current version;
deleting the new version of the application program;
removing the temporary node from the kubernetes cluster;
if yes, deleting the application program of the current version, rolling and updating the application program of the new version to a fixed node in the kubernetes cluster, and canceling the stain tolerance setting and the affinity setting of the application program of the new version;
and removing the temporary node from the kubernetes cluster.
2. The method of claim 1, further comprising, after removing the temporary node from the kubernetes cluster:
and setting the temporary node as an invalid state.
3. The method of claim 1, wherein the scrolling updates the new version of the application to a fixed node in the kubernetes cluster comprises:
canceling stain tolerance setting and affinity setting in a poll object of the corresponding pod object of the application program for managing the new version, redeploying the poll object, and setting an update strategy of the redeployed poll object, so that the redeployed poll object scrolls and updates the pod object corresponding to the application program of the new version to a fixed node in the kubernetes cluster based on the update strategy.
4. The method of claim 1, wherein the scrolling updates the new version of the application to a fixed node in the kubernetes cluster comprises:
and deploying a new delete corresponding to the new version of the application program, deleting the pod object managed by the original delete corresponding to the new version of the application program based on an update strategy, expanding the new delete based on the deleted pod object so that the new delete obtains the pod object corresponding to the new version of the application program, and updating the pod object in a rolling way to a fixed node in the kubenetes cluster, wherein the new delete does not carry out stain tolerance setting and affinity setting.
5. A kubernetes resource release device for blue-green publication, comprising:
the first setting module is used for setting a flow scheduling strategy scheme to schedule a request of a user for accessing an application to the current version of application program if the current version of application program exists in the kubernetes cluster for executing the application bluish-green release task;
the application and addition module is used for applying for temporary node nodes and adding the temporary node nodes into the kubernetes cluster;
the second setting module is used for performing the stain setting on the temporary node so that the temporary node does not accept the use of an application program which is not subjected to the stain tolerance setting;
the third setting module is used for setting an affinity identifier for the temporary node;
the fourth setting module is used for carrying out stain tolerance setting on the new version of application program and carrying out affinity setting on the affinity identifier so that the new version of application program can be scheduled on the temporary node;
the first modification module is used for modifying the flow scheduling policy scheme to schedule the request of the user for accessing the application to the new version application program;
the judging module is used for judging whether the new version of the application program on the temporary node accords with the expectation;
the second modification module is used for modifying the flow scheduling strategy scheme again to schedule the request of the user for accessing the application to the application program of the current version if the application program of the new version does not accord with the expectations;
the first deleting module is used for deleting the new version of application program;
the removing module is used for removing the temporary node from the kubernetes cluster;
the second deleting module is used for deleting the application program of the current version if the application program of the new version accords with the expectation;
the updating module is used for rolling and updating the new version of application program to the fixed node in the kubernetes cluster;
and the cancellation module is used for canceling the stain tolerance setting and the affinity setting of the new version application program and triggering the execution of the removal module.
6. The apparatus of claim 5, wherein the apparatus further comprises:
and a fifth setting module, configured to set the temporary node to an invalid state.
7. The apparatus of claim 5, wherein the updating module is specifically configured to:
canceling stain tolerance setting and affinity setting in a poll object of the corresponding pod object of the application program for managing the new version, redeploying the poll object, and setting an update strategy of the redeployed poll object, so that the redeployed poll object scrolls and updates the pod object corresponding to the application program of the new version to a fixed node in the kubernetes cluster based on the update strategy.
8. The apparatus of claim 5, wherein the updating module is specifically configured to:
and deploying a new delete corresponding to the new version of the application program, deleting the pod object managed by the original delete corresponding to the new version of the application program based on an update strategy, expanding the new delete based on the deleted pod object so that the new delete obtains the pod object corresponding to the new version of the application program, and updating the pod object in a rolling way to a fixed node in the kubenetes cluster, wherein the new delete does not carry out stain tolerance setting and affinity setting.
9. A control node, comprising: a control component and a storage component;
a storage component for storing at least one set of instructions;
a control component for invoking and executing the instruction set in the first storage component, by executing the instruction set, to perform the kubernetes resource release method for blue-green publishing according to any of claims 1-4.
10. A storage medium storing a computer program implementing the kubernetes resource release method for blue-green distribution according to any one of claims 1 to 4, the computer program being executed by a processor to implement the kubernetes resource release for blue-green distribution according to any one of claims 1 to 4.
CN202310031640.8A 2023-01-10 2023-01-10 Kubernetes resource release method and device for blue-green release Pending CN116009888A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310031640.8A CN116009888A (en) 2023-01-10 2023-01-10 Kubernetes resource release method and device for blue-green release

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310031640.8A CN116009888A (en) 2023-01-10 2023-01-10 Kubernetes resource release method and device for blue-green release

Publications (1)

Publication Number Publication Date
CN116009888A true CN116009888A (en) 2023-04-25

Family

ID=86019399

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310031640.8A Pending CN116009888A (en) 2023-01-10 2023-01-10 Kubernetes resource release method and device for blue-green release

Country Status (1)

Country Link
CN (1) CN116009888A (en)

Similar Documents

Publication Publication Date Title
US8769519B2 (en) Personal and pooled virtual machine update
US10033816B2 (en) Workflow service using state transfer
US9280336B2 (en) Virtual machine disk image installation
US10083199B1 (en) Data migration in active data store
US7089550B2 (en) Method and system for performing SW upgrade in a real-time system
CN106020976B (en) Memory is exhausted into the method and apparatus that process flow is unloaded to user's space
US20150100961A1 (en) Operating Programs on a Computer Cluster
US8769521B2 (en) Calendar aware adaptive patching of a computer program
US20120317039A1 (en) On-demand purchase of virtual image licenses in a cloud computing environment
CN111736809A (en) Distributed robot cluster network management framework and implementation method thereof
CN104111843A (en) Sandbox based script updating method and system
US9047159B2 (en) Software installation
CN116594717B (en) Class loading isolation method, device, equipment and medium
CN116009888A (en) Kubernetes resource release method and device for blue-green release
CN103677879B (en) Software installation method and corresponding software mounting device
CN108804197B (en) Dynamic componentization implementation method, device, equipment and storage medium
CN113485776B (en) Method and device for processing entity in multithreading rendering
CN113515458B (en) Method and system for reducing test environment resource consumption based on Envoy plug-in
CN113448493A (en) Method, electronic device and computer program product for backing up data
WO2011118048A1 (en) Program execution method, computing system, and program execution control program
CN108804236A (en) A kind of sharing method and system of AIDL files
CN116028544B (en) Timing task dynamic adding method based on OPENSTACK
CN112019385B (en) Cloud platform component deleting method, device, equipment and storage medium
US11233747B2 (en) Systems and methods for acquiring server resources at schedule time
CN111008035B (en) Software operation and maintenance method, electronic equipment and 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