Search code examples
dockerkubernetesapache-camelapache-karafkaraf

Migrating karaf from Legacy deployment to cloud with active-standby deployment


Currently we have karaf deployment like following

  • Its active-standby
  • Standby is there with startlevel as 50 so failover would be fast as system bundles are at start status and user bundles are at install status
  • As soon as active goes down standby takeover.

Now we planned to migrate to kubernetes, as per current research

Kubernetes will create 1 pod for us and we declare happy state as 1 which mean if POD goes down it will automatically launch new, but my concern is launching of new POD will take more time as in legacy deployment, standby was in semi active state.

How we can achieve such active-standby in kubernetes?


Solution

  • Answer provided by Tomislav Mikulin in comments:

    That depends on if you app is stateless or not...if its stateless that just use more then one pod (like 2 or 3) for your app, and you should be all set...

    If you don't want (or can't) have multiple pods of you app already running, you could make two different deployments of the same app, and just switch them through the Service object. That way you could have an extra pod running that you can switch on at any moment.