Embodiments of the present disclosure provide a
Java agent version control method and
system, an electronic device, a storage medium, and a program product. In application deployment scenarios such as application creation or application
upgrade, a master node in a container
orchestration platform updates, by means of an interface
server, a download address of a target-version
Java agent
package corresponding to instances into resource configuration information of the instances, so as to ensure that a correct
Java agent version can be loaded on the basis of the download address of the Java agent
package when each instance is created. An
admission controller in a worker node cluster dynamically determines, on the basis of a
grayscale release ratio of a new-version Java agent, a download address of a target-version Java agent
package required for an instance to be created, wherein the target version can be a new version or an old version; and then, some instances of an application are controlled to load the new-version Java agent, rather than enabling all the instances of the application to load the new-version Java agent simultaneously. Thus, instance-level precise control over Java agent versions is provided, thereby improving the stability of Java agents during version
upgrade.