Skip to content
Snippets Groups Projects

Resolve "Run the application on Kubernetes locally using “minikube”"

All threads resolved!

Closes #19 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • requested review from @strokh24

  • added 1 commit

    • 92a9d51e - feat(kubernetes): complete Kubernetes setup for todo-app with Minikube

    Compare with previous version

  • Jesus Galaz Reyes marked this merge request as ready

    marked this merge request as ready

  • Setup Guide to Use the Project

    Prerequisites:

    1. Install Minikube: Follow the official Minikube installation guide.

    2. Install kubectl: Ensure you have Kubernetes CLI (kubectl) installed and configured.

    Step-by-Step Instructions

    1. Start Minikube
      • Run Minikube with your preferred driver/docker engine (e.g., Docker):
    minikube start --driver=docker
    1. Build Docker Images
    • Point your terminal to Minikube’s Docker environment:
    eval $(minikube docker-env)
    • Build the todo-app image:
    docker build -t todo-app:latest .
    1. Deploy MongoDB
    • Apply the MongoDB deployment and service configuration:
    kubectl apply -f mongodb-deployment.yml
    kubectl apply -f mongodb-service.yml
    1. Deploy Todo App
    • Apply the todo-app deployment and service configuration:
    kubectl apply -f todo-app-deployment.yml
    kubectl apply -f todo-app-service.yml
    1. Access the Application
    • Use Minikube’s service command to expose the app:
    minikube service todo-app --url
    • Open the URL provided by the command in your browser.
    1. Verify Functionality
    • Test creating, viewing, and deleting tasks via the ToDo app UI.
    • Verify MongoDB connectivity by checking app logs:
    kubectl logs -l app=todo-app

    Debugging and Troubleshooting

    • Check Pod Status:
    kubectl get pods

    Ensure all pods are in the Running state

    • Inspect Logs:
    kubectl logs <pod-name>
    • Delete Pods to Restart:
    kubectl delete pod -l app=todo-app
    • Reset Minikube if Issues Persist:
    minikube delete
    minikube start

    Cleanup

    • To remove all Kubernetes resources:
    kubectl delete -f mongodb-deployment.yml
    kubectl delete -f mongodb-service.yml
    kubectl delete -f todo-app-deployment.yml
    kubectl delete -f todo-app-service.yml
    • To remove minikube and its data:
    minikube stop
    minikube delete --all
    rm -rf ~/.minikube
    rm -rf ~/.kube
    brew uninstall minikube
  • Jesus Galaz Reyes resolved all threads

    resolved all threads

  • Rokas Stankunas enabled an automatic merge when all merge checks for 92a9d51e pass

    enabled an automatic merge when all merge checks for 92a9d51e pass

  • Rokas Stankunas approved this merge request

    approved this merge request

  • mentioned in commit 8a82de38

Please register or sign in to reply
Loading