<p>I'm trying to see how to configure <strong>Client-Server</strong> with my <strong>Spring Boot</strong> application using <strong>Hazelcast on Kubernete</strong>, since we want to have the capability of sharing the cache between different Spring Boot applications (I'm already able to setup the Embedded distributed cache with Kubernetes - which is not what we need).
In case of Spring Boot single application(not on Kubernetes), its kind of easy where i will spin up a Server lets say with 'localhost' and also spin up the client connecting to localhost. Also i can have multiple instances(members) of Server which will form a Hazelcast Cluster.</p>
<p>However in case of Kubernetes, I know we need to have 2 different Spring Boot applications, one will act as a Server and others will be client accessing the cache, but want to know how the client would connect to the Server. Because in case of Spring we Autowire the HazelcastInstance, so how would i connect to the Server which is running in its own Kubernetes Pod ( and container).</p>

getSantsoh
<p>Thanks Neil. As you indicated its the same way i currently configured in embedded caching on Kubernetes. I'am using the Service-Name and namespace to discover and connect to the Server members from HazelcastClient instance.</p>
<p>This is from Client Spring Boot application's HazelcastConfiguration:</p>
<pre><code>@Bean
public HazelcastInstance hazelcastInstance() {
    final ClientConfig config = new ClientConfig();
    config.setClusterName(&quot;cluster-name&quot;);
    if (enableOnK8s) {
        config.getNetworkConfig().getKubernetesConfig().setEnabled(true)
            .setProperty(&quot;namespace&quot;, namespaceValue)
            .setProperty(&quot;service-name&quot;, serviceName);
    }
        return HazelcastClient.newHazelcastClient(config);
}
</code></pre>
<p>And on Hazelcast Server Spring Boot application, configuration stays same as Embedded Hazelcast configuration.</p>
