US 11,900,119 B2
System and method for automatically controlling operating state of an application
Kumar Rao Krishnagi, Powell, OH (US); Matthew J Porter, Mechanicsburg, OH (US); Laxman Dongisharapu, Hyderabad (IN); Vijay Kumar Perla, Westerville, OH (US); Nalini S Boda, Lewis Center, OH (US); Mark A Wells, Dublin, OH (US); Christopher Mathews, Wilmington, DE (US); and Kenneth S Brooks, New Castle, DE (US)
Assigned to JPMORGAN CHASE BANK, N.A., New York, NY (US)
Filed by JPMorgan Chase Bank, N.A., New York, NY (US)
Filed on Apr. 13, 2021, as Appl. No. 17/229,388.
Claims priority of application No. 202111008258 (IN), filed on Feb. 26, 2021.
Prior Publication US 2022/0276869 A1, Sep. 1, 2022
Int. Cl. G06F 9/54 (2006.01); G06F 8/61 (2018.01); G06F 9/48 (2006.01); G06F 9/50 (2006.01); G06F 9/38 (2018.01); G06F 9/30 (2018.01)
CPC G06F 9/3836 (2013.01) [G06F 8/61 (2013.01); G06F 9/3017 (2013.01); G06F 9/485 (2013.01); G06F 9/5022 (2013.01); G06F 9/5077 (2013.01); G06F 9/541 (2013.01)] 15 Claims
OG exemplary drawing
 
1. A method for automatically controlling operating state of one or more applications in a Kubernetes distributed operating system by utilizing one or more processors and one or more memories, the method comprising:
creating a Docker image that contains a command line binary and a script configured for interacting with a Kubernetes application programming interface (API);
integrating the Docker image with a scheduler module to create periodic and recurring tasks to be ran on a predefined schedule to allow for full automation of scheduled down and up times for the applications;
wherein each run of one of the periodic and recurring tasks comprises, in response to the predefined schedule of the task:
creating a container, using the Docker image, in the Kubernetes distributed operating system, the container having the script installed therein configured with a set of command options;
automatically performing an action to control the operating state of one or more of the applications by utilizing the installed script configured to apply a command in accordance with the set of command options, the command options specifying at least: the action to perform, namespace to perform the action on, desired application name to apply the action or default option, and list of applications to exclude when using the default option,
wherein the script runs on the container and delegates a call, based on the set of command options, to the command line binary which issues the commands via the Kubernetes API to perform the action; and
destroying the container created for the task after controlling the operating state of the one or more applications,
wherein the configurable values for the action to perform option include start and stop for turning one or more applications on or off respectively, and the default option is for applying the specified action to all applications in the specified namespace except for the applications specified in the list of applications to exclude, and
wherein the periodic and recurring tasks include at least a first task and a second task, wherein the command options of the first task specify the stop action, a first namespace, the default option, and a first list of applications to exclude, the method further comprising, in response to the predefined schedule of the first task:
obtaining, by utilizing the script, a list of all applications in the first namespace via the Kubernetes API;
automatically turning off all the applications in the obtained list, except for the applications in the first list of applications to exclude, by scaling corresponding replicas to zero (0); and
destroying the container created for the first task after turning off the applications, and
wherein the command options of the second task specify the start action, a first desired application, and the first namespace, the method further comprising, in response to the predefined schedule of the second task:
obtaining, by utilizing the script, the desired application in the namespace via the Kubernetes API;
automatically turning on the desired application by scaling corresponding replicas to one (1) or more; and
destroying the container created for the second task after turning on the desired application.