Git Product home page Git Product logo

k8s-deployment-service's Introduction

Microservice

Devops

  • The developed service image is created. In my example I created this image by dockerfile.
docker image build -t example-task .
  • This image is tagged/versioned and pushed to an image hub. I used docker hub.
docker tag example-task:v1.0.0 thiyya/example-task:latest
docker push thiyya/example-task:latest
minikube start
  • A yml file is created for the deployment. In this yml, there are many definitions such as the name of the service, number of replicas, access, network, from which image it will be generated, how it will be exposed.
  • You can see the deployment.yaml I created for this example.
kubectl apply -f deployment.yaml
  • I created the greetings service on Minikube and made it ready for use.
kubectl get pods -o=wide
NAME                               READY   STATUS    RESTARTS   AGE     IP           NODE       NOMINATED NODE   READINESS GATES
firstdeployment-7d5b676748-lqdjn   1/1     Running   0          4m36s   172.17.0.3   minikube   <none>           <none>
  • I created a service.yaml to create network to the greeting service. You can see the service.yaml I created for this example
kubectl get service
NAME         TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)          AGE
backend      NodePort    10.96.148.165   <none>        8080:32250/TCP   9s
  • Minikube provides a service to open a tunnel to nodeport. To do this :
minikube service --url backend
http://127.0.0.1:65066
โ—  Because you are using a Docker driver on darwin, the terminal needs to be open to run it.
  • Now you can use this url to access the greeting service img.png

k8s-deployment-service's People

Contributors

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