Giter Site home page Giter Site logo

simplek8s's Introduction

In order to create the config files to the k8s master we do:

kubectl apply -f client-pod.yml
kubectl apply -f client-node-port.yml

Note that the 'apply' command is how we make any changes to the configuration to our k8s cluster.

To get detailed information about an object in our cluster we can use the 'describe' command:

kubectl describe <object type> <object name>

Note! We can omit and then we will be getting all the information about all the different objects with the specified object type

Kubernetes object

  • Pods Run one or more closely related containers
  • Services Sets up networking in a Kubernetes Cluster
  • Deployment Maintains a set of identical pods, ensuring that they have the correct config and that the right number exists. So, basically a "Deployment" object maintains a set of identical pods (it can be 1 Pod, 2 Pods or more...) and the deployment is going to constantly work to make sure that every single Pod in its 'set' that is supposed to manage is always running the correct configuration and is always in a runnable state. A Deployment is kinda similar to the Pod object. Even though a Deployment contains a set of Pods, in the end of the day it is essentially used to run containers for our application.

Differences between Pod and Deployment

Pod

- Runs a single set of containers
- Good for one-off development purposes. Usually when we have a very signle container or a very small group of containers that we want to run. 
- Rarely used directly in production because of the limitation around being able to update its configuration.

Deployment

- Runs a set of identical Pods(one or more).
- Monitors the state of each Pod, updating as necessary. Deployments is going to watch the configuration of each Pod, it is going to make sure that every Pod is running the container successfully inside of it. If any Pod happens to crash for any reason, the Deployment is going to automatically going to restart that Pod or completely recreate it in a fresh new state. 
- Good for development purposes.
- Good for production.

Deployment object creation:

When we create a Deployment object, it is going to have something thats called a Pod template.

Pod Template

A Pod Template is essentially a little configuration block, that instructs how Pod/Pods should look like created by the Deployment. Usually in the Pod template we specify as said above how a Pod should look like but also the number of containers, name, port and the image which the containers are goign to get created. Note! With deployment we can change any piece of configuration tied to a Pod even when the Pod is up and running.

Delete an existing kubernetes object

kubectl delete -f <config-file>

simplek8s's People

Contributors

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