Git Product home page Git Product logo

complex's Introduction

Kubernetes

Object types:

  • Pod : Runs one or more closely related containers(such as Docker containers). Pods are the smallest deployable units of computing that can be created and managed in Kubernetes.

  • Service : Sets up networking in k8s cluster.

    Sub types:

    1. ClusterIp : Exposes a set of pods to the other objects in the cluster.
    2. NodePort : Exposes a container to the 'outside world'. (Only good for dev purposes)
    3. LoadBalancer : Legacy way of getting traffic into a cluster
    4. Ingress : Exposes a set of services to the outside world
  • Deployment: Maintains a set of identical pods, ensuring that they have the correct config and that the right number exists.

  • Secret: Securely stores a piece of info in the cluster, such as db password. Secret types- generic, docker-registry and tls.

kubectl create secret generic <secret name> --from-literal key=value

kubectl create secret generic pgpassword --from-literal PGPASSWORD=password

Useful Commands:

Command to update image:

kubectl set image <object_type>/<object_name> <container_name> = <new image to use>

kubectl set image deployment/client-deployment client=stephengrider/multi-client:v5

Connect local docker-client with docker-server inside the virtual machine(minikube) (for current terminal window only)

eval $(minikube docker-env)

Delete an object:

kubectl delete deployment postgres-deployment

Redeploy/Restart Deployments: (shortcut)

kubectl scale deployment client-deployment --replicas=0

Helm:

Helm is a program to administer 3rd party softwares inside k8s cluster. (3rd party softwares like ingress-nginx)

[command we issue] ---> [helm client] ---> [tiller server]

Sidenotes:

Minikube start with virtualbox (working with Virtual VM - not with hyperkit.):

minikube start --driver=virtualbox

Use -A option to list the requested object(s) across all namespaces:

Eg. kubectl get -A deployments

complex's People

Contributors

siddharth1001 avatar siddharthr-qubole avatar

Stargazers

Abhiroj Panwar avatar

Watchers

James Cloos avatar  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.