Hi @Mohd_Rashid and welcome to MongoDB community forums!!
Based on the above statement, if you are looking to install MongoDB in master slave concept, the feature has been shut down since MongoDB version 4.0.
Hence the recommendation would be to use the latest version for new features and bug fixes.
In order to install MongoDB in a kubernetes environment, you can perform the same using help charts and kubectl function.
If you have install Google Kubernetes environment, you use the access link to access the environment and create the deployment, service and other yaml files.
You can follow the steps present in one of my posts as part of 100DaysOfCode challenge.
However, in saying so, if you wish to use MongoDB on a kubernetes production environment, I would recommend to use MongoDB Kubernetes Operator for its improved management and operational support.
You can follow the blog posts on Deploying the MongoDB Enterprise Kubernetes Operator on Google Cloud for further understanding.
Best Regards
Aasawari