Git Product home page Git Product logo

voting-app's Introduction

Voting-App

Kubernetes Demo: Commands and Pod/Service Creation

Kubernetes Commands

Get Information

  • List all pods:
    kubectl get pods
    
  • List all services:
    kubectl get services
    
  • List all replicasets:
    kubectl get replicasets
    
  • List pods and services together:
    kubectl get pods,svc
    
  • List all deployments:
    kubectl get deployments
    
  • Describe a specific resource (pod, service, deployment):
    kubectl describe <resource> <name>
    
  • Delete a specific pod, service, or deployment:
    kubectl delete <resource> <name>
    
  • Scale a deployment to a specific number of replicas:
    kubectl scale deploy <name> --replicas=<number>
    
  • Get the URL of a service (Minikube):
    minikube service <service-name> --url
    

Create Pods and Services

  • Create voting app pod and service:
    kubectl create -f voting-app-pod.yaml
    kubectl create -f voting-app-service.yaml
    
  • Create Redis pod and service:
    kubectl create -f redis-pod.yaml
    kubectl create -f redis-service.yaml
    
  • Create Postgres pod and service:
    kubectl create -f postgres-pod.yaml
    kubectl create -f postgres-service.yaml
    
  • Create result app pod and service:
    kubectl create -f result-pod.yaml
    kubectl create -f result-service.yaml
    
  • Create worker pod:
    kubectl create -f worker-pod.yaml
    

Create Deployments

Note

Note: If services are already terminated, they should be restarted before creating deployments.

  • Create worker app deployment:
    kubectl create -f worker-app-deploy.yaml
    
  • Create Postgres deployment:
    kubectl create -f postgres-deploy.yaml
    
  • Create voting app deployment:
    kubectl create -f voting-app-deploy.yaml
    
  • Create Redis deployment:
    kubectl create -f redis-deploy.yaml
    
  • Create result app deployment:
    kubectl create -f result-app-deploy.yaml
    
  • Resource Cleanup:
    kubectl delete -f .

voting-app's People

Contributors

it21229084 avatar

Stargazers

 avatar Rusith Fernando 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.