Practice with Docker and Kubernetes
This project demonstrates the use of Docker and Kubernetes to create, deploy, and manage a .NET application connected to a MongoDB database. It leverages container technology to solve compatibility issues across multiple platforms, optimize resource usage, and streamline deployment.
Three images were created: two for the .NET API and one for MongoDB.
- Definition and creation of Docker images.
- Execution of commands inside a container.
- Data persistence for the MongoDB database using volumes.
- Publishing images to a container registry.
- Creating new versions of an image.
Testing details can be found in this document (in Spanish): Docker and Kubernetes Tests
The deployment was carried out using Kubernetes, with YAML files defining the pods, services, persistent volumes, and secrets.
- Build the Docker images:
docker-compose build
- Start the services:
docker-compose up
-
Apply the Kubernetes manifests:
kubectl apply -f k8s/
-
Verify that the pods, services, persistent volumes, and secrets are correctly configured.
Docker, Docker Compose, Kubernetes, .NET, MongoDB, Volumes, Secrets