Skip to content

moodybugzz/webdeploy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Steps to Re-produce stateless application deployment and rolling updates.

Create a Dockerfile to add the frontend assets and build the image from root directory

docker build .

Create a docker private or local registry to push the image updates

Login to docker registry to authenticate yourself

docker login (prompts for username and password)

Tag and push the image to the registry

docker tag $IMAGEID repo/image:tag docker push repo/image:tag sadxacacaddc

To run a kubernetes cluster with the container pushed to local or private registry

kubectl run $container --image=repo/image:tag --port=80

To Expose as a service

kubectl expose deployment $container --type=NodePort

To open the exposed endpoint in the browser

minikube service $container (This will open the html page on the browser)

View the kubernetes dashboard via

minikube dashboard

For any rolling updates, Update the image to latest version and push it to registry again

kubectl set image deployment/$container $container =repo/image:tag (Leveraging rolling updates will benefit in Zero downtime)

To achieve a multi instance pod, we can scale the deployment to the number desired.

alt text

About

Code to be used for technical screen

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 57.5%
  • Dockerfile 30.1%
  • CSS 12.4%