Problems in Rolling updates in Lagom with Kubernetes

while deploying lagom microservices we ran into one problem , we were using rolling update of a Service A (with PersitentEntity User) - now there are two version running v1 and v2,

what happens is Service A v2 version has a new command for User updateAddressCommand - but PersistentEntityActor was active on v1 version of Service A , now when the command reached this v1 code as it dosent understand this command it gives an Error . Whether we should only use Blue Green kind of deployments or are there any other workarounds

The way to go here is to update v1 to support the new command.

First you need to have v1.1 supporting that new command, but make sure that none of the services impl will be sending that kind of command.

You update your cluster to use v1.1 and then you make a new rolling update to v2 in which the command is effectively used. During that second rolling update, you will have a mix of v1.1 and v2 in your cluster. Nodes already v2 may eventually send the said command to a not yet updated v1.1 node, but that’s fine, because v1.1 nodes understand it.

Cheers,

Renato