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

Aperta
#278 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
java, kubernetes

Direzione di ricerca

Esamina hazelcast-integration/kubernetes, confrontando lo StatefulSet in hazelcast.yaml con l'hazelcast.xml di config.yaml quando 5701 viene cambiato in 5800. Segui la porta di rete configurata insieme alle porte del servizio e delle probe Kubernetes, quindi verifica che tre nodi formino un cluster sulla porta 5800. Il lavoro è completato quando l'esempio funziona con una porta non predefinita.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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>
Lingua principale
Java
Stelle
558
Fork
599
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di hazelcast/hazelcast-code-samples

Tutte le issue di hazelcast/hazelcast-code-samples

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.