I am using the Fabric8 Java library to access the Kubernetes API within an actor system. I am concerned about connection leaks and want to understand how the client connections are closed underneath after a REST call is made
Here is the code that initializes the client:
config = new ConfigBuilder()
.withMasterUrl(apiServer)
.withOauthToken(token)
.withTrustCerts(true)
.build();
client = new DefaultKubernetesClient(config);
This client is then passed on to various actors, how should I be closing these connections in the actors so that connections don't leak or are abandoned hen a certain actor dies?