Is it mandatory to have same code version on the MM and MD controllers which has 8.x code?
It's NOT mandatory to have same code version running on MM and MD controllers.
However the MM should have higher code (220.127.116.11) and all other MDs can have (18.104.22.168) code. But the controllers which are in Cluster members should have the same code version. Only then Cluster hitless failover will happen smoothly.