Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no way to provide other port than 5701 in the kubernetes example #278

Open
ksv510 opened this issue Dec 3, 2018 · 0 comments
Open

Comments

@ksv510
Copy link

ksv510 commented Dec 3, 2018

If I use an example from https://github.com/hazelcast/hazelcast-code-samples/tree/master/hazelcast-integration/kubernetes as is it works fine.
But if I change the port to some other for example 5800 then nodes start but they are not in cluster.

here it is my hazelcast.yaml:

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: hazelcast
  labels:
    app: hazelcast
spec:
  replicas: 3
  serviceName: hazelcast-service
  selector:
    matchLabels:
      app: hazelcast
  template:
    metadata:
      labels:
        app: hazelcast
    spec:
      containers:
      - name: hazelcast
        image: hazelcast/hazelcast:3.10.3
        ports:
        - name: hazelcast
          containerPort: 5800
        livenessProbe:
          httpGet:
            path: /hazelcast/health/node-state
            port: 5800
          initialDelaySeconds: 30
          periodSeconds: 10
          timeoutSeconds: 5
          successThreshold: 1
          failureThreshold: 3
        readinessProbe:
          httpGet:
            path: /hazelcast/health/node-state
            port: 5800
          initialDelaySeconds: 30
          periodSeconds: 10
          timeoutSeconds: 1
          successThreshold: 1
          failureThreshold: 1
        volumeMounts:
        - name: hazelcast-storage
          mountPath: /data/hazelcast
        env:
        - name: JAVA_OPTS
          value: "-Dhazelcast.rest.enabled=true -Dhazelcast.config=/data/hazelcast/hazelcast.xml"
      volumes:
      - name: hazelcast-storage
        configMap:
          name: hazelcast-configuration

---

apiVersion: v1
kind: Service
metadata:
  name: hazelcast-service
spec:
  type: LoadBalancer
  selector:
    app: hazelcast
  ports:
  - protocol: TCP
    port: 5800

and config.yaml:

apiVersion: v1
kind: ConfigMap
metadata:
  name: hazelcast-configuration
data:
  hazelcast.xml: |-
    <?xml version="1.0" encoding="UTF-8"?>
    <hazelcast xsi:schemaLocation="http://www.hazelcast.com/schema/config hazelcast-config-3.10.xsd"
                   xmlns="http://www.hazelcast.com/schema/config"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <properties>
        <property name="hazelcast.discovery.enabled">true</property>
      </properties>

      <network>
        <port>5800</port>
        <join>
          <multicast enabled="false"/>
          <tcp-ip enabled="false" />
          <discovery-strategies>
            <discovery-strategy enabled="true" class="com.hazelcast.kubernetes.HazelcastKubernetesDiscoveryStrategy">
            </discovery-strategy>
          </discovery-strategies>
        </join>
      </network>
    </hazelcast>
@ksv510 ksv510 changed the title There is no way to provide other port than 5701 There is no way to provide other port than 5701 in the kubernetes example Dec 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant