Optimize when running on two Pods in Kubernates

@Helene I have a problem when I run 2 Pods on Kubernates for Optimize I have Websocket Problem and I cannot login with my users when I switch off 1 of the Pods the Optimize works without any problems why this happens like that do you have any idea?

Hey @hahi,

From what I’m understanding I think this page in our docs will be useful here, you might need to adjust your configuration again to allow Optimize to work properly in a cluster.

1 Like

@Helene
How can I configure both in the same optimize yaml correctly?

I have just one config yaml file how to make it so that it works in Kubernates I am not sure… Do you have any idea. I have only one instance so one environment-config.yaml for Optimize.

engines: [
 'camunda-bpm':
    name: default
    rest: 'http://localhost:8080/engine-rest'
    importEnabled: true,

'camunda-bpm':
    name: default
    rest: 'http://localhost:8080/engine-rest'
    importEnabled: false
]
*KUBERNATES BELOW:*
data:
  environment-config.yaml: |
    security:
      auth:
        superUserIds: ['test_user']
      importEnabled: **true**
    es:
      settings:
        index:
          prefix: 't-optimize',

environment-config.yaml: |
    security:
      auth:
        superUserIds: ['test_user']
     importEnabled: **false**
    es:
      settings:
        index:
          prefix: 't1-optimize'

My original config file below:

apiVersion: v1
kind: ConfigMap
metadata:
  name: sasasa-dadada-optimize-config-map
  labels:
    app: sasasa-dadada-optimize
    appl: sasasa-dadada-optimize-t1
    env: t1
data:
  environment-config.yaml: |
    security:
      auth:
        superUserIds: ['test_user']
    es:
      settings:
        index:
          prefix: 't1-optimize'

Hi @hahi,

I believe in this case it would be best to have two deployments: one with import enabled and one without. The importing one can have a scale of 1, the other deployment you can scale as needed and setup as described in the second subsection so end users can access Optimize without issues.
Let me know if that helps, I can’t really give you specific Kubernetes help on how to implement the above as that’s not my expertise, though if you require more hands on assistance further down the line and have a license you can also reach out to Camunda for support :slight_smile: