Kubernetes

Kubernetes

Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications. Planet Scale. Never Outgrow. Run Anywhere. Homepage

  • Characteristics

    • Optimized for all applications

    • Known, Stable API

    • Unparalleled team and community

  • Architecture

    • Masters manage the cluster

    • Nodes are used to host the running applications

    • A Kubernetes cluster that handles production traffic should have a minimum of three nodes

    • Kubernetes API, the master exposes

      • End users interact with the cluster

        A Kubernetes cluster can be deployed on either physical or virtual machines

  • Platform As A Service

    • Heroku

      • Completely Propietary

    • Cloud Foundry

      • Optimized for 12 Factor Apps

    • Spinnaker

      • Public Cloud Infrastructure and Virtual Machines

Kubernetes :: Documentation

Kubernetes is an open source system for managing containerized applications across multiple hosts, providing basic mechanisms for deployment, maintenance, and scaling of applications. The open source project is hosted by the Cloud Native Computing Foundation (CNCF). Homepage

Application Developer__ a person that writes an Application that runs in a Kubernetes cluster _Cluster Operator a person that configures, controls and monitors clusters.

Kubernetes :: Methods

  • Minikube

    • It is a single node kubernetes cluster

  • Kops

    • Multi node kubernetes setup into AWS

  • Kubeadm

    • Multi Node Cluster in our own premises

Kubernetes :: Minikube

Lightweight Kubernetes implementation that creates a VM on your local machine and deploys a simple cluster containing only one node.

Kubernetes :: Minikube :: Create a Cluster

Kubernetes coordinates a highly available cluster of computers that are connected to work as a single unit. A Kubernetes cluster consists of two types of resources: The Master coordinates the cluster, Nodes are the workers that run applications.

  1. VT-x or AMD-v Virtualization

  2. Hypervisor

    • Linux. VirtualBox

    • Linux. KVM

  1. kubectl

  1. Minikube

Kubernetes :: Minikube :: Deploy An App

Kubernetes Deployments. Once you have a running Kubernetes cluster, you can deploy your containerized applications on top of it. To do so, you create a Kubernetes Deployment configuration. The Deployment instructs Kubernetes how to create and update instances of your application. Once you've created a Deployment, the Kubernetes master schedules mentioned application instances onto individual Nodes in the cluster.

In a first terminal

In a second terminal

In the first terminal

Kubernetes :: Minikube :: Explore Your App

A Pod is a Kubernetes abstraction that represents a group of one or more application containers (such as Docker or rkt), and some shared resources for those containers. Those resources include: Shared storage, as Volumes, Networking, as a unique cluster IP address, Information about how to run each container, such as the container image version or specific ports to use. Pods are the atomic unit on the Kubernetes platform. Deployment on Kubernetes creates Pods with containers inside them.

A Pod always runs on a Node. A Node is a worker machine in Kubernetes and may be either a virtual or a physical machine, depending on the cluster. Each Node is managed by the Master. A Node can have multiple pods.

Every Kubernetes Node runs at least: 1. Kubelet, a process responsible for communication between the Kubernetes Master and the Node; it manages the Pods and the containers running on a machine. 2. A container runtime (like Docker, rkt) responsible for pulling the container image from a registry, unpacking the container, and running the application. Containers should only be scheduled together in a single Pod if they are tightly coupled and need to share resources such as disk.

Executing commands in the Container

Kubernetes :: Minikube :: Expose Your App Publicly

Labels

Kubernetes :: Minikube :: Scaling Your App

Kubernetes :: Minikube :: Performing A Rolling Update

Rolling updates allow the following actions: Promote an application from one environment to another (via container image updates). Rollback to previous versions. Continuous Integration and Continuous Delivery of applications with zero downtime.

Kubernetes :: CentOS

Last updated