Whenever a developer pushes code to GitHub, it automatically triggers a GitHub Actions workflow. The workflow checks out the latest source code, sets up the Java and Maven environment, downloads the required dependencies, and executes unit tests using JUnit and Mockito.
If the tests pass, the pipeline performs static code analysis using SonarQube or Checkstyle to identify code quality issues. The application is then built using Maven, which generates a JAR file.
Next, a Docker image is created from the JAR file. Before publishing it, we perform a security vulnerability scan using Trivy. If no critical vulnerabilities are found, the Docker image is pushed to AWS Elastic Container Registry (ECR).
After the image is available in ECR, the pipeline updates the Kubernetes deployment manifest with the new Docker image tag and commits the change to the Git repository.
Argo CD continuously monitors the Git repository. When it detects the updated manifest, it automatically synchronizes the changes with the Amazon EKS Kubernetes cluster.
Kubernetes performs a rolling deployment by creating new pods with the updated image while the old pods continue serving requests. Once the new pods pass their readiness and liveness health checks, traffic is routed to them, and the old pods are terminated. This ensures zero or minimal downtime during deployment.
Finally, Prometheus collects application and infrastructure metrics, while Grafana displays dashboards and sends alerts if any thresholds are exceeded.

Top comments (0)