Explain how you would automate the deployment of a containerized application using Kubernetes for MongoDB-based services.