GithubHelp home page GithubHelp logo

microservices-migration's Introduction

Microservices Migration

Deploying microservices applications with Kubernetes

Prerequisites

Before you get started, make sure you have the following prerequisites:

• A Google Cloud Platform account with billing enabled.

• The Google Cloud SDK installed on your local machine.

• Terraform CLI installed on your local machine.

• A domain name registered and accessible via DNS.

Steps

-Create a new Google Cloud project

-Create a new project in the Google Cloud Console, and enable the Kubernetes Engine API. This will allow you to deploy a Kubernetes cluster using Terraform.

-Create a service account for Terraform

-Create a new service account with the necessary permissions to manage your GCP resources. For example, you can grant the Kubernetes Engine Admin role to this service account. Download the JSON key file for this service account, as you will need it to authenticate with the GCP API.

Step 1: Set up the Google Kubernetes Engine

Add your credentials (project ID, region and .JSON keyy file) to the provider.tf and variables.tf files.

In a terminal running in the directory that contains the .tf files, run:

terraform init

After Terraform has initialized, run:

terraform plan

to see the infrastructure to be created. This particular config will create a GKE cluster with 2 node pools.

Next you run:

terraform apply

to build the cluster.

Clone the Sock Shop App

Clone the Sock Shop repository into the cluster and access the cloned repo by running the following code in the Google Cloud Console:
git clone https://github.com/microservices-demo/microservices-demo.git
cd microservices-demo
cd deploy/kubernetes

Deploy the Sock Shop Application

Now that you've cloned the repository, run the following code to deploy it:
kubectl create namespace sock-shop
kubectl apply -f complete-demo.yaml

Expose the Sock Shop service to get the external IP

kubectl expose service front-end --name=front-end-lb --port=80 --target-port=8079 --type=LoadBalancer --namespace=sock-shop

The ExternalIP is then revealed, and you can use this to view the Sock Shop app.

microservices-migration's People

Contributors

thehydratedpelicancoder 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.