Coder Social home page Coder Social logo

kaiburr-task2's Introduction

Kaiburr Task 2 : API Deployment with Kubernetes on Minikube

This repository contains the Kubernetes manifests and Dockerfile for deploying the Spring Boot API application connected to MongoDB (created in Task 1) on a Minikube cluster.

Prerequisites

1. Build and Push Docker Image

docker build . -t arunodhai/kaiburrapi
docker push arunodhai/kaiburrapi
Docker image build and push

Testing the Docker Image by running it

Running docker image

2. Start Minikube Cluster

minikube start
minikube setup

3. Deploying the manifests

kubectl create -f mongo-deployment.yml
kubectl create -f mongo-service.yml
kubectl create -f mongo-pvc.yml
kubectl create -f deployment.yml
kubectl create -f service.yml
deployments and services creations

4. Verify Deployment

kubectl get all
Status

5. Accessing the Kaiburr API Service

minikube service kaiburr-api-service

Checking the PUT Method

PUT method

Checking the GET Method

GET method

Checking in browser

Browser view GET method

Checking API endpoints using curl

CURL methods

6. Checking MongoDB Data Inside the Running Pod

kubectl exec -it mongo-deployment-df7b8b9c-sf8nh -- /bin/bash 

To open the mongo shell inside the MongoDB running Pod

mongosh
Viewing data inside mongodb pod

7. Checking Persistent Volume Claim (PVC) by deleting mongoDB pod

To view PVC

kubectl get pvc

Deleting mongoDB pod

kubectl delete pod mongo-deployment-df7b8b9c-kp7t6  
Checking PVC

8. Verifying Data Persistence in MongoDB

Viewing persisted data inside mongodb

kaiburr-task2's People

Contributors

arunodhai avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.