Skip to content

Latest commit

 

History

History

k8s

📝 Table of Contents

🏁 Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Folder Structure

Currently no file structure

Prerequisites

What things you need to install and run the application

  • docker -> https://docs.docker.com/get-docker/
  • kubectl -> https://kubernetes.io/docs/tasks/tools/
  • minikube -> https://minikube.sigs.k8s.io/docs/start/
  • ingress -> https://kubernetes.github.io/ingress-nginx/deploy/#minikube

Installation

A step by step series of examples that tell you how to get a development environment running.

  1. Check out the latest code on the main branch
  2. From the root directory, cd into willow_api 2.1. docker build -t DOCKER_USERNAME/willowapi . 2.2. docker push DOCKER_USERNAME/willowapi
  3. From the root directory, cd into willow 3.1. docker build -t DOCKER_USERNAME/willow . 3.2. docker push DOCKER_USERNAME/willow
  4. From the root directory, minikube start or minikube start --vm=true
  5. ingress -> https://kubernetes.github.io/ingress-nginx/deploy/#minikube

    To Fix ingress error

    5.1. minikube delete 5.2. rm -r -fo ~.minikube 5.3 minikube start 5.4. minikube addons enable ingress
  6. kubectl apply -f k8s

To check if everything is working

  1. kubectl get all
  2. minikube dashboard

Get ip of frontend {Testing}

  1. minikube service willow --url

Get ip of backend {Testing}

  1. minikube service willow_api --url

To check if everything is working

  1. Minikube ip

Use result ip address in search bar to view the frontend

To test the api type ip-address/api/PATH

🎈 Usage

  • If using only deployment file
    • Run kubectl port-forward deployment/willow 8080:80
    • Navigate to localhost:8080 on your favorite browser

Current Issues

  1. Add Jenkins and Ansible

Authors

  • Vaishvik Maisuria

Credit