hazelcast-kubernetes dns lookup failed issue

6/26/2017

I'm running my project in wildfly in a container in openshift. And I'm trying to add hazelcast-kubernetes plugin( from https://github.com/hazelcast/hazelcast-kubernetes) to my project for DNS lookup. It seems the plugin's DNS lookup doesn't work at all.

Inside the Openshift's logs, it shows the Kubernetes Discovery SPI activated and wildfly starts successfully.

I've already set my hazelcast following the instruction:

        this.config.setProperty("hazelcast.discovery.enabled", "true");
        this.config.setProperty("hazelcast.rest.enabled","true");
        final JoinConfig joinConfig = networkConfig.getJoin();
        joinConfig.getMulticastConfig().setEnabled(false);
        joinConfig.getTcpIpConfig().setEnabled(false);

        final HazelcastKubernetesDiscoveryStrategyFactory factory = new HazelcastKubernetesDiscoveryStrategyFactory();

        final DiscoveryStrategyConfig strategyConfig = new DiscoveryStrategyConfig(factory);
        strategyConfig.addProperty("service-dns", "kubernetes.default.svc.cluster.local"); 
        strategyConfig.addProperty("service-dns-timeout", "10");

Did I miss something? Any advice would be appreciate.

-- Peter
hazelcast
kubernetes
openshift

0 Answers