This repository contains all the necessary files to deploy a backend for a vlog website on a Kubernetes cluster (specifically Minikube). The backend is composed of three main microservices: auth-service
, users-service
, and posts-service
. These services are managed using ArgoCD to ensure continuous deployment. The backend handles user authentication, user information management, and the entire business logic for posts.
To run the cluster with the backend infrastructure, ensure you have the following installed:
- Minikube
- Helm
First, clone this repository:
git clone https://github.com/MiguelCastilloSanchez/helm-chart-app-services.git
Start Minikube:
minikube start
Navigate to the repository directory and execute the following commands to set up the namespace and internal services:
sudo chmod +x /internal-services/create-services.sh
./internal-services/create-services.sh
These commands will create services such as:
- MongoDB (database)
- RabbitMQ (message broker)
- Redis (in-memory storage)
Install the latest stable version of ArgoCD:
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
Check available services in the argocd
namespace and forward the necessary port:
kubectl get services -n argocd
kubectl port-forward service/argocd-server -n argocd 8085:443
Obtain the default admin password for ArgoCD:
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
You can now access ArgoCD through your browser at https://localhost:8085
using the retrieved credentials.
In the ArgoCD dashboard, create applications for the microservices:
- Name the applications:
auth-service
,users-service
, andposts-service
. - Select automatic deployment (recommended).
- Specify the namespace as
app-test
. - Use the appropriate
values.yaml
file for each service.
cd /ingress-controller
Enable the NGINX Ingress add-on in the cluster:
minikube addons enable ingress
Apply the ingress configuration:
kubectl apply -f app-ingress.yaml
Monitor the ingress to get the assigned IP address:
kubectl get ingress -n app-test --watch
Add the IP address to your local DNS configuration:
sudo vi /etc/hosts
At the end of the file, add the following line:
{IP_ADDRESS} my-app.com
Your Kubernetes cluster with the backend is now fully deployed. ArgoCD ensures that any changes pushed to the repository will automatically propagate to the configured environment.
For a better understanding of the architecture and deployed services (including their endpoints), you can visit their respective repositories: