How would you ensure consistent deployment with Docker Compose or Kubernetes?
Consistent deployment configurations are essential for environments running different application versions. How would you ensure this consistency using Docker Compose or Kubernetes? Provide any sample YAML files that demonstrate your approach.