Git Product home page Git Product logo

kubernetes_java_deployment's Introduction

docker-Java-kubernetes-project

INSTALL MINIKUBE


KUBECTL curl -o kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.20.4/2021-04-12/bin/linux/amd64/kubectl chmod +x ./kubectl mkdir -p $HOME/bin cp ./kubectl $HOME/bin/kubectl export PATH=$HOME/bin:$PATH echo 'export PATH=$HOME/bin:$PATH' >> ~/.bashrc source $HOME/.bashrc kubectl version --short --client

DOCKER yum install docker -y systemctl start docker systemctl enable docker

https://minikube.sigs.k8s.io/docs/start/


INSTALL EKS SETUP ############################################################# Step1: Take EC2 Instance with t2.MEDIUM instance type Step2: Create IAM Role with Admin policy for eks-cluster and attach to ec2-instance Step3: Install kubectl

curl -o kubectl https://amazon-eks.s3-us-west-2.amazonaws.com/1.14.6/2019-08-22/bin/linux/amd64/kubectl chmod +x ./kubectl mkdir -p $HOME/bin cp ./kubectl $HOME/bin/kubectl export PATH=$HOME/bin:$PATH echo 'export PATH=$HOME/bin:$PATH' >> ~/.bashrc source $HOME/.bashrc kubectl version --short --client

Step4: Install eksctl: curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp sudo mv /tmp/eksctl /usr/bin eksctl version

Step5: MASTER Cluster creation: eksctl create cluster --name=eksdemo
--region=us-west-1
--zones=us-west-1b,us-west-1c
--without-nodegroup

Step6: Add Iam-Oidc-Providers: eksctl utils associate-iam-oidc-provider
--region us-west-1
--cluster eksdemo
--approve

Allowing the service to connect with EKS

Step7: WORKER NODE Create node-group: eksctl create nodegroup --cluster=eksdemo
--region=us-west-1
--name=eksdemo-ng-public
--node-type=t2.medium
--nodes=2
--nodes-min=2
--nodes-max=4
--node-volume-size=10
--ssh-access
--ssh-public-key=Praveen-test
--managed
--asg-access
--external-dns-access
--full-ecr-access
--appmesh-access
--alb-ingress-access

//eksctl delete nodegroup --cluster=eksdemo --region=us-east-1 --name=eksdemo-ng-public

//eksctl delete cluster --name=eksdemo --region=us-west-1

#############################################################

HANDSON

Deploying Java Applications with Docker and Kubernetes

  1. Build each project ->> mvn clean install -DskipTests

  2. Create docker hub account

  3. Build the image in local -> docker build -t praveensingam1994/shopfront:latest .

docker build -t praveensingam1994/productcatalogue:latest .

docker build -t praveensingam1994/stockmanager:latest .

  1. Push the image to your docker hub -> docker push praveensingam1994/shopfront:latest

docker push praveensingam1994/productcatalogue:latest

docker push praveensingam1994/stockmanager:latest

  1. Go to kubernetes folder and create the pods ->

kubectl apply -f shopfront-service.yaml

kubectl apply -f productcatalogue-service.yaml

kubectl apply -f stockmanager-service.yaml

  1. minikube service servicename ->

minikube service shopfront minikube service productcatalogue minikube service stockmanager

  1. Hit the url in browser ->

ORDER TO BUILD AND DEPLOY

shopfront -> productcatalogue -> stockmanager

Endpoint for product --> /products Endpoint for stock --> /stocks

kubernetes_java_deployment's People

Contributors

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