Skip to content

ZoeLiao/python-Django-REST-framework-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django REST Framework Demo

Docker and K8s

1.Build image and tag it

  • docker build -t <your docker hub>/django-rest-framework-demo .

2.Test image

  • docker run -p 8001:8001 <your docker hub>/django-rest-framework-demo:latest

3.Push to your Docker Hub

  • docker login
  • docker push <your docker hub>/django-rest-framework-demo:latest

4.Set up by K8s

4a.Create deployment and check it

  • kubectl create -f deployment.yaml
  • kubectl get deployments

4b.Create service and check it

  • kubectl create -f service.yaml
  • kubectl get services

4c.Create ingress and modify /etc/host

  • minikube addons enable ingress
  • kubectl create -f ingress.yaml
  • minikube ip
  • copy ip and story in /etc/host

4d.Start minikube dashboard

  • minikube dashboard

Reference

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published