Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
- name: "cc"
      port: 8080
      expose: true
      patch:
      - '[{"op":"add","path":"/spec/sessionAffinity","value":"ClientIP"}]'
  1. If you have created a service to expose the control center port, please add the following line to your service spec: sessionAffinity: "ClientIP". You can refer to the example below for guidance:

Code Block
kind: Service
apiVersion: v1
metadata:
  name: hivemq-service
  labels:
    app: hivemq
    hivemq-cluster: hivemq-cluster1
spec:
  sessionAffinity: "ClientIP"
  selector:
    hivemq-cluster: hivemq-cluster1
  ports:
    - name: cc
      protocol: TCP
      port: 8080
      targetPort: 8080
  type: LoadBalancer

...