Skip to content

Latest commit

 

History

History
127 lines (83 loc) · 2.59 KB

README.md

File metadata and controls

127 lines (83 loc) · 2.59 KB

DevOpsJumpstart

This guide will walk you through the steps to build and deploy MyApp using Maven, Docker, and Kubernetes.

Prerequisites

Before you begin, make sure to have the following tools and utilities installed on your system:

Building the Application

  1. Clone the project from the repository:

    git clone https://github.com/dorbanianas/devops-presentation
  2. Navigate to the project directory:

    cd devops-presentation
  3. Clean the project to remove any previous build artifacts:

    mvn clean
  4. Build the application package:

    mvn package

Building and Pushing Docker Image

  1. Log in to your Docker Hub account or your preferred container registry:

    docker login
  2. Build a Docker image for MyApp, giving it a name and version tag (e.g., devopspresentation/myapp:latest):

    docker build -t devopspresentation/myapp:latest .
  3. Push the Docker image to Docker Hub:

    docker push devopspresentation/myapp:latest
  4. Verify that the Docker image has been successfully built:

    docker images

Deploying to Kubernetes

  1. Apply the Kubernetes deployment configuration to deploy MyApp using minikube:

    minikube start
  2. Apply the Kubernetes deployment configuration to deploy MyApp:

    kubectl apply -f deployment.yaml
  3. Check the nodes in your Kubernetes cluster:

    kubectl get nodes -o wide
  4. View the deployments in your cluster:

    kubectl get deployments
  5. Check the pods created by the deployment:

    kubectl get pods
  6. Access the logs of all the pods if needed using the following script:

    ./get_pods_logs.sh
  7. Apply the Kubernetes service configuration to expose the application:

    kubectl apply -f service.yaml
  8. Check the services available in your cluster:

    kubectl get service
  9. Verify the nodes and their details:

    kubectl get nodes -o wide
  10. Access your application by obtaining the external IP of the service using the following script:

    ./get_app_url.sh