SlideShare a Scribd company logo
1 of 34
Exploring
Kubernetes
Ramit Surana
@ramitsurana
/in/ramitsurana
Agenda
 Introduction to Kubernetes
 Kubernetes Features
 Some basic Concepts
 Understanding Kubernetes
Architecture
 Understanding Key Concepts
 Kubelet
 Kubernetes cluster
 etcd
 Services
 Namespaces
 Flannel
 Replication Controller
 Volumes
 Monitoring and much more
Who am I ?
 Open Source Tech Enthusiastic .
 Open Source Contributor.
 Foodie,Traveler.
 Join me Here :
 Email:ramitsurana@gmail.com
 Twitter: @ramitsurana
 Linkedin: /in/ramitsurana
 Github:ramitsurana
Docker
 Docker is a powerful build for
your Linux containers.
 Open platform for developers
and sysadmins to build, ship,
and run distributed
applications.
 Docker enables apps to be
quickly assembled from
components.
 It eliminates the friction
between development, QA,
and production
environments.
What is it ?
 Introduced and Built By
GoogleCloud Platform.
 Open Source andApache 2.0
Licensed.
 ContainerOrchestrator.
 Monitoring of Endpoints.
 Docker Containers across
multiple hosts.
 Inspired and informed by
Google’s experiences and
internal systems
Features
 Auto-restarting, re-
scheduling, and replicating
containers.
 Supports existing OSS apps.
 Manual/Auto Scaling.
 Manual/Auto Healing.
Basic
Terminologies
 Pods are the smallest deployable units that can be created, scheduled,
and managed. Its a logical collection of containers that belong to an
application.
 Master is the central control point that provides a unified view of the
cluster.There is a single master node that control multiple minions.
 Minion is a worker node that run tasks as delegated by the master.
Minions can run one or more pods. It provides an application-specific
“virtual host” in a containerized environment.
 Selector: A query against labels, producing a set result
 Controller: A reconciliation loop that drives current state towards desired
state.
 Service:A set of pods that work together.
Architecture
Kubelet
 The primary "node agent" that runs on each node.The kubelet
works in terms of a PodSpec.
 PodSpec is aYAML or JSON object that describes a pod
 Kubelet takes a set of PodSpecs that are provided through various
mechanisms and ensures that the containers described in those
PodSpecs are running and healthy.
 Other than from an PodSpec from the apiserver, there are three
ways that a container manifest can be provided to the Kubelet.
File: Path passed as a flag on the command line.This file is
rechecked every 20 seconds (configurable with a flag).
HTTP endpoint: HTTP endpoint passed as a parameter on the
command line.This endpoint is checked every 20 seconds
HTTP server:The kubelet can also listen for HTTP and respond to a
simple API (underspec'd currently) to submit a new manifest.
Kubernetes
Cluster
etcd
 Etcd is a distributed consistent
key-value store for shared
configuration and service
discovery.
 It is by default built in for
kubernetes.
 All cluster data is stored here.
Services
 It is abstraction which defines a logical set of Pods and a policy by
which to access them - sometimes called a micro-service.
 Each service is given its own IP address and port which remains
constant for the lifetime of the service. So to access the service
from inside your application or container you just bind to the IP
address and port number for the service.
 A service, through its label selector, can resolve to 0 or more pods.
Over the life of a service, the set of pods which comprise that
service can grow, shrink, or turn over completely.
Services
NameSpaces
 It enable you to manage different environments within the same
cluster.
 It is abstraction which defines a logical set of Pods and a policy by
which to access them - sometimes called a micro-service.
 You can also run different types of server, batch, or other jobs in
the same cluster without worrying about them affecting each
other.
NameSpaces
Flannel
 Formerly known as Rudder.
 Etcd backed network fabric for
containers.
 It uses etcd to store the
network configuration,
allocated subnets, and
auxiliary data (such as host's
IP).
 The simplest backend is udp
and uses a TUN device to
encapsulate every IP fragment
in a UDP packet.
Flannel - How
it works
Replication
Counter
 Ensures that a specified
number of pod "replicas" are
running at any one time.
 If there are too many, the
replication controller kills
some pods. If there are too
few, it starts more.
 PodTemplate - Creates new
pods from a template.
 Labels -To remove a pod
from a replication controller's
target set, change the pod's
label.
 Deleting a replication
controller does not affect the
pods it created.
Replication
Counter
Architecture
Volumes
 Volume is just a directory, possibly with some data in it, which is
accessible to the containers in a pod.
 Volumes can not mount onto other volumes or have hard links to
other volumes.
 Each container in the Pod must independently specify where to
mount each volume.
 Kubernetes supports several types ofVolumes:
 EmptyDir,hostPath,gcePersistentDisk,awsElasticBlockStore,nfs,is
csi,glusterfs,rbd,gitRepo,secret,persistentVolumeClaimetc.
Example:
Glusterfs
Volume
On
Kubernetes
Monitoring on
CAdvisor
 Optional add-on to
Kubernetes clusters.
 cAdvisor is an open source
container resource usage and
performance analysis agent.
 Heapster is a cluster-wide
aggregator of monitoring
and event data.
 Kubelet itself fetches the
data from cAdvisor.
 Kubelet manages the pods
and containers running on a
machine.
Monitoring
Architecture
Labels and
Selectors
 Labels are the key/value pairs that are attached to objects, such as
pods. Labels are intended to be used to specify identifying
attributes of objects that are meaningful and relevant to users.
 A label selector, the client/user can identify a set of objects.The
label selector is the core grouping primitive in Kubernetes.
Labels and
Selectors
Securing
Kubernetes
 Optional add-on Kubernetes.
 A secret contains a set of
named byte arrays.
 Pods consume secrets in
volumes.
Setup
 First ensure these
packages are installed:
$apt-get update
$ apt-get install ssh
$ apt-get install docker.io
$ apt-get install curl
 wget
https://github.com/GoogleC
loudPlatform/kubernetes/re
leases/download/v1.0.1/kub
ernetes.tar.gz
 tar -xvf kubernetes.tar.gz
Setup
 Build Binaries of Kubernetes,in our case we are building
binaries for Ubuntu,so:
Cd kubernetes/cluster/ubuntu
./build.sh
 This shell script will download and build the latest version of K8s, etcd and
flannel binaries.
 You can configure the cluster info at:
vi kubernetes/cluster/ubuntu/config-default.sh
export nodes="root@127.0.0.1"
export roles="ai"
export NUM_MINIONS=${NUM_MINIONS:-1}
 To start up the cluster:
cd kubernetes/cluster
$ KUBERNETES_PROVIDER=ubuntu ./kube-up.sh
 That's it enjoy kubernetes!!
Kubectl
commands
 kubectl works to control the Kubernetes cluster manager.
 kubectl api-versions - Print availableAPI versions.
 kubectl cluster-info - Display cluster info
 kubectl config - config modifies kubeconfig files
 kubectl create - Create a resource by filename or stdin
 kubectl delete - Delete a resource by filename, stdin, resource and name, or
by resources and label selector.
 kubectl describe - Show details of a specific resource or group of resources
 kubectl exec - Execute a command in a container.
 kubectl expose -Take a replicated application and expose it as Kubernetes
Service
 kubectl get - Display one or many resources
 kubectl label - Update the labels on a resource
 kubectl logs - Print the logs for a container in a pod.
 kubectl namespace - SUPERCEDED: Set and view the current Kubernetes
namespace
Kubectl
commands
 kubectl patch - Update field(s) of a resource by stdin.
 kubectl port-forward - Forward one or more local ports to a
pod.
 kubectl proxy - Run a proxy to the Kubernetes API server
 kubectl replace - Replace a resource by filename or stdin.
 kubectl rolling-update - Perform a rolling update of the given
Replication Controller.
 kubectl run - Run a particular image on the cluster.
 kubectl scale - Set a new size for a Replication Controller.
 kubectl stop - Gracefully shut down a resource by name or
filename.
 kubectl version - Print the client and server version
information.
Please
Contribute ! googlecloudplatform/kubernetes
Works on
Questions ?
Ramit Surana
ramitsurana@gmail.com
Twitter : @ramitsurana
LinkedIn : /in/ramitsurana

More Related Content

What's hot

K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingPiotr Perzyna
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Ryan Jarvinen
 
Kubernetes
KubernetesKubernetes
Kuberneteserialc_w
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetesMichal Cwienczek
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshoploodse
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes IntroductionPeng Xiao
 
Kubernetes architecture
Kubernetes architectureKubernetes architecture
Kubernetes architectureJanakiram MSV
 
Kubernetes - introduction
Kubernetes - introductionKubernetes - introduction
Kubernetes - introductionSparkbit
 
Docker introduction
Docker introductionDocker introduction
Docker introductionPhuc Nguyen
 
Kubernetes Interview Questions And Answers | Kubernetes Tutorial | Kubernetes...
Kubernetes Interview Questions And Answers | Kubernetes Tutorial | Kubernetes...Kubernetes Interview Questions And Answers | Kubernetes Tutorial | Kubernetes...
Kubernetes Interview Questions And Answers | Kubernetes Tutorial | Kubernetes...Edureka!
 
Kubernetes Deployment Tutorial | Kubernetes Tutorial For Beginners | Kubernet...
Kubernetes Deployment Tutorial | Kubernetes Tutorial For Beginners | Kubernet...Kubernetes Deployment Tutorial | Kubernetes Tutorial For Beginners | Kubernet...
Kubernetes Deployment Tutorial | Kubernetes Tutorial For Beginners | Kubernet...Edureka!
 
Architecture Overview: Kubernetes with Red Hat Enterprise Linux 7.1
Architecture Overview: Kubernetes with Red Hat Enterprise Linux 7.1Architecture Overview: Kubernetes with Red Hat Enterprise Linux 7.1
Architecture Overview: Kubernetes with Red Hat Enterprise Linux 7.1Etsuji Nakai
 
Getting Started with Kubernetes
Getting Started with Kubernetes Getting Started with Kubernetes
Getting Started with Kubernetes VMware Tanzu
 
Introduction of Kubernetes - Trang Nguyen
Introduction of Kubernetes - Trang NguyenIntroduction of Kubernetes - Trang Nguyen
Introduction of Kubernetes - Trang NguyenTrang Nguyen
 
Deploying your first application with Kubernetes
Deploying your first application with KubernetesDeploying your first application with Kubernetes
Deploying your first application with KubernetesOVHcloud
 

What's hot (20)

Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshop
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Kubernetes PPT.pptx
Kubernetes PPT.pptxKubernetes PPT.pptx
Kubernetes PPT.pptx
 
Kubernetes architecture
Kubernetes architectureKubernetes architecture
Kubernetes architecture
 
Kubernetes - introduction
Kubernetes - introductionKubernetes - introduction
Kubernetes - introduction
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Kubernetes Interview Questions And Answers | Kubernetes Tutorial | Kubernetes...
Kubernetes Interview Questions And Answers | Kubernetes Tutorial | Kubernetes...Kubernetes Interview Questions And Answers | Kubernetes Tutorial | Kubernetes...
Kubernetes Interview Questions And Answers | Kubernetes Tutorial | Kubernetes...
 
Kubernetes Deployment Tutorial | Kubernetes Tutorial For Beginners | Kubernet...
Kubernetes Deployment Tutorial | Kubernetes Tutorial For Beginners | Kubernet...Kubernetes Deployment Tutorial | Kubernetes Tutorial For Beginners | Kubernet...
Kubernetes Deployment Tutorial | Kubernetes Tutorial For Beginners | Kubernet...
 
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
 
Architecture Overview: Kubernetes with Red Hat Enterprise Linux 7.1
Architecture Overview: Kubernetes with Red Hat Enterprise Linux 7.1Architecture Overview: Kubernetes with Red Hat Enterprise Linux 7.1
Architecture Overview: Kubernetes with Red Hat Enterprise Linux 7.1
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Getting Started with Kubernetes
Getting Started with Kubernetes Getting Started with Kubernetes
Getting Started with Kubernetes
 
Introduction of Kubernetes - Trang Nguyen
Introduction of Kubernetes - Trang NguyenIntroduction of Kubernetes - Trang Nguyen
Introduction of Kubernetes - Trang Nguyen
 
Deploying your first application with Kubernetes
Deploying your first application with KubernetesDeploying your first application with Kubernetes
Deploying your first application with Kubernetes
 

Viewers also liked

Frontera: open source, large scale web crawling framework
Frontera: open source, large scale web crawling frameworkFrontera: open source, large scale web crawling framework
Frontera: open source, large scale web crawling frameworkScrapinghub
 
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...Brian Grant
 
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Ambassador Labs
 
Business use of Social Media and Impact on Enterprise Architecture
Business use of Social Media and Impact on Enterprise ArchitectureBusiness use of Social Media and Impact on Enterprise Architecture
Business use of Social Media and Impact on Enterprise ArchitectureNUS-ISS
 
Deep-dive into Microservice Outer Architecture
Deep-dive into Microservice Outer ArchitectureDeep-dive into Microservice Outer Architecture
Deep-dive into Microservice Outer ArchitectureWSO2
 
Detecting Events on the Web in Real Time with Java, Kafka and ZooKeeper - Jam...
Detecting Events on the Web in Real Time with Java, Kafka and ZooKeeper - Jam...Detecting Events on the Web in Real Time with Java, Kafka and ZooKeeper - Jam...
Detecting Events on the Web in Real Time with Java, Kafka and ZooKeeper - Jam...JAXLondon2014
 
Kubernetes and bluemix
Kubernetes  and  bluemixKubernetes  and  bluemix
Kubernetes and bluemixDuckDuckGo
 
StormCrawler in the wild
StormCrawler in the wildStormCrawler in the wild
StormCrawler in the wildJulien Nioche
 
Orchestrating Microservices with Kubernetes
Orchestrating Microservices with Kubernetes Orchestrating Microservices with Kubernetes
Orchestrating Microservices with Kubernetes Weaveworks
 
Kubernetes Colorado - Kubernetes metrics deep dive 10/25/2017
Kubernetes Colorado - Kubernetes metrics deep dive 10/25/2017Kubernetes Colorado - Kubernetes metrics deep dive 10/25/2017
Kubernetes Colorado - Kubernetes metrics deep dive 10/25/2017Bob Cotton
 

Viewers also liked (10)

Frontera: open source, large scale web crawling framework
Frontera: open source, large scale web crawling frameworkFrontera: open source, large scale web crawling framework
Frontera: open source, large scale web crawling framework
 
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
 
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
 
Business use of Social Media and Impact on Enterprise Architecture
Business use of Social Media and Impact on Enterprise ArchitectureBusiness use of Social Media and Impact on Enterprise Architecture
Business use of Social Media and Impact on Enterprise Architecture
 
Deep-dive into Microservice Outer Architecture
Deep-dive into Microservice Outer ArchitectureDeep-dive into Microservice Outer Architecture
Deep-dive into Microservice Outer Architecture
 
Detecting Events on the Web in Real Time with Java, Kafka and ZooKeeper - Jam...
Detecting Events on the Web in Real Time with Java, Kafka and ZooKeeper - Jam...Detecting Events on the Web in Real Time with Java, Kafka and ZooKeeper - Jam...
Detecting Events on the Web in Real Time with Java, Kafka and ZooKeeper - Jam...
 
Kubernetes and bluemix
Kubernetes  and  bluemixKubernetes  and  bluemix
Kubernetes and bluemix
 
StormCrawler in the wild
StormCrawler in the wildStormCrawler in the wild
StormCrawler in the wild
 
Orchestrating Microservices with Kubernetes
Orchestrating Microservices with Kubernetes Orchestrating Microservices with Kubernetes
Orchestrating Microservices with Kubernetes
 
Kubernetes Colorado - Kubernetes metrics deep dive 10/25/2017
Kubernetes Colorado - Kubernetes metrics deep dive 10/25/2017Kubernetes Colorado - Kubernetes metrics deep dive 10/25/2017
Kubernetes Colorado - Kubernetes metrics deep dive 10/25/2017
 

Similar to A brief study on Kubernetes and its components

Kubernetes From Scratch .pdf
Kubernetes From Scratch .pdfKubernetes From Scratch .pdf
Kubernetes From Scratch .pdfssuser9b44c7
 
Kubernetes basics information along with stateful session info
Kubernetes basics information along with stateful session infoKubernetes basics information along with stateful session info
Kubernetes basics information along with stateful session infoKapildev292285
 
(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive Overview(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive OverviewBob Killen
 
What is POD and Kubernetes details Like as
What is POD and Kubernetes details Like asWhat is POD and Kubernetes details Like as
What is POD and Kubernetes details Like asMdTarequlIslam17
 
Kubernetes acomprehensiveoverview
Kubernetes acomprehensiveoverviewKubernetes acomprehensiveoverview
Kubernetes acomprehensiveoverviewAnkit Shukla
 
Kubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewKubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewBob Killen
 
Kubernetes a comprehensive overview
Kubernetes   a comprehensive overviewKubernetes   a comprehensive overview
Kubernetes a comprehensive overviewGabriel Carro
 
Working with kubernetes
Working with kubernetesWorking with kubernetes
Working with kubernetesNagaraj Shenoy
 
Kubernetes Immersion
Kubernetes ImmersionKubernetes Immersion
Kubernetes ImmersionJuan Larriba
 
Kubernetes Architecture with Components
 Kubernetes Architecture with Components Kubernetes Architecture with Components
Kubernetes Architecture with ComponentsAjeet Singh
 
Kubernetes fundamentals
Kubernetes fundamentalsKubernetes fundamentals
Kubernetes fundamentalsVictor Morales
 
Data weekender deploying prod grade sql 2019 big data clusters
Data weekender deploying prod grade sql 2019 big data clustersData weekender deploying prod grade sql 2019 big data clusters
Data weekender deploying prod grade sql 2019 big data clustersChris Adkin
 
A DevOps guide to Kubernetes
A DevOps guide to KubernetesA DevOps guide to Kubernetes
A DevOps guide to KubernetesPaul Czarkowski
 
Kubernetes for Java developers
Kubernetes for Java developersKubernetes for Java developers
Kubernetes for Java developersRobert Barr
 
Kubernetes - Sailing a Sea of Containers
Kubernetes - Sailing a Sea of ContainersKubernetes - Sailing a Sea of Containers
Kubernetes - Sailing a Sea of ContainersKel Cecil
 

Similar to A brief study on Kubernetes and its components (20)

Kubernetes From Scratch .pdf
Kubernetes From Scratch .pdfKubernetes From Scratch .pdf
Kubernetes From Scratch .pdf
 
Intro to Kubernetes
Intro to KubernetesIntro to Kubernetes
Intro to Kubernetes
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
Kubernetes basics information along with stateful session info
Kubernetes basics information along with stateful session infoKubernetes basics information along with stateful session info
Kubernetes basics information along with stateful session info
 
(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive Overview(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive Overview
 
What is POD and Kubernetes details Like as
What is POD and Kubernetes details Like asWhat is POD and Kubernetes details Like as
What is POD and Kubernetes details Like as
 
Kubernetes acomprehensiveoverview
Kubernetes acomprehensiveoverviewKubernetes acomprehensiveoverview
Kubernetes acomprehensiveoverview
 
Kubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewKubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive Overview
 
Kubernetes a comprehensive overview
Kubernetes   a comprehensive overviewKubernetes   a comprehensive overview
Kubernetes a comprehensive overview
 
Container Orchestration using kubernetes
Container Orchestration using kubernetesContainer Orchestration using kubernetes
Container Orchestration using kubernetes
 
Working with kubernetes
Working with kubernetesWorking with kubernetes
Working with kubernetes
 
Kubernetes Immersion
Kubernetes ImmersionKubernetes Immersion
Kubernetes Immersion
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Kubernetes Architecture with Components
 Kubernetes Architecture with Components Kubernetes Architecture with Components
Kubernetes Architecture with Components
 
Kubernetes fundamentals
Kubernetes fundamentalsKubernetes fundamentals
Kubernetes fundamentals
 
Data weekender deploying prod grade sql 2019 big data clusters
Data weekender deploying prod grade sql 2019 big data clustersData weekender deploying prod grade sql 2019 big data clusters
Data weekender deploying prod grade sql 2019 big data clusters
 
A DevOps guide to Kubernetes
A DevOps guide to KubernetesA DevOps guide to Kubernetes
A DevOps guide to Kubernetes
 
Kubernetes for Java developers
Kubernetes for Java developersKubernetes for Java developers
Kubernetes for Java developers
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Kubernetes - Sailing a Sea of Containers
Kubernetes - Sailing a Sea of ContainersKubernetes - Sailing a Sea of Containers
Kubernetes - Sailing a Sea of Containers
 

More from Ramit Surana

Using Serverless Architectures to build and provision modern infrastructures​
Using Serverless Architectures to build and provision modern infrastructures​Using Serverless Architectures to build and provision modern infrastructures​
Using Serverless Architectures to build and provision modern infrastructures​Ramit Surana
 
DEPLOYING WORDPRESS BLOG USING DOCKER COMPOSE & ANSIBLE ON AWS​
DEPLOYING WORDPRESS BLOG USING DOCKER COMPOSE & ANSIBLE ON AWS​DEPLOYING WORDPRESS BLOG USING DOCKER COMPOSE & ANSIBLE ON AWS​
DEPLOYING WORDPRESS BLOG USING DOCKER COMPOSE & ANSIBLE ON AWS​Ramit Surana
 
Getting Started with Consul
Getting Started with ConsulGetting Started with Consul
Getting Started with ConsulRamit Surana
 
Building Digital Transaction Systems in the new Banking World
Building Digital Transaction Systems in the new Banking WorldBuilding Digital Transaction Systems in the new Banking World
Building Digital Transaction Systems in the new Banking WorldRamit Surana
 
Building Big Architectures XP Conference 2016
Building Big Architectures XP Conference 2016Building Big Architectures XP Conference 2016
Building Big Architectures XP Conference 2016Ramit Surana
 
Dependency management in golang
Dependency management in golangDependency management in golang
Dependency management in golangRamit Surana
 
Building Big Architectures
Building Big ArchitecturesBuilding Big Architectures
Building Big ArchitecturesRamit Surana
 
Achieving CI/CD with Kubernetes
Achieving CI/CD with KubernetesAchieving CI/CD with Kubernetes
Achieving CI/CD with KubernetesRamit Surana
 
Docker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and toolsDocker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and toolsRamit Surana
 
Hashicorp: Delivering the Tao of DevOps
Hashicorp: Delivering the Tao of DevOpsHashicorp: Delivering the Tao of DevOps
Hashicorp: Delivering the Tao of DevOpsRamit Surana
 
CoreOS: The Inside and Outside of Linux Containers
CoreOS: The Inside and Outside of Linux ContainersCoreOS: The Inside and Outside of Linux Containers
CoreOS: The Inside and Outside of Linux ContainersRamit Surana
 
Introducing Docker Swarm - the orchestration tool by Docker
Introducing Docker Swarm - the orchestration tool by DockerIntroducing Docker Swarm - the orchestration tool by Docker
Introducing Docker Swarm - the orchestration tool by DockerRamit Surana
 
Sysdig - Introducing a new definition of Monitoring
Sysdig - Introducing a new definition of MonitoringSysdig - Introducing a new definition of Monitoring
Sysdig - Introducing a new definition of MonitoringRamit Surana
 
Introducing Puppet - The faster speed of Automation
Introducing Puppet - The faster speed of AutomationIntroducing Puppet - The faster speed of Automation
Introducing Puppet - The faster speed of AutomationRamit Surana
 
Introducing Chef | An IT automation for speed and awesomeness
Introducing Chef | An IT automation for speed and awesomenessIntroducing Chef | An IT automation for speed and awesomeness
Introducing Chef | An IT automation for speed and awesomenessRamit Surana
 
Exploring Openstack Swift(Object Storage) and Swiftstack
Exploring Openstack Swift(Object Storage) and Swiftstack Exploring Openstack Swift(Object Storage) and Swiftstack
Exploring Openstack Swift(Object Storage) and Swiftstack Ramit Surana
 

More from Ramit Surana (18)

Using Serverless Architectures to build and provision modern infrastructures​
Using Serverless Architectures to build and provision modern infrastructures​Using Serverless Architectures to build and provision modern infrastructures​
Using Serverless Architectures to build and provision modern infrastructures​
 
DEPLOYING WORDPRESS BLOG USING DOCKER COMPOSE & ANSIBLE ON AWS​
DEPLOYING WORDPRESS BLOG USING DOCKER COMPOSE & ANSIBLE ON AWS​DEPLOYING WORDPRESS BLOG USING DOCKER COMPOSE & ANSIBLE ON AWS​
DEPLOYING WORDPRESS BLOG USING DOCKER COMPOSE & ANSIBLE ON AWS​
 
Introducing Vault
Introducing VaultIntroducing Vault
Introducing Vault
 
Getting Started with Consul
Getting Started with ConsulGetting Started with Consul
Getting Started with Consul
 
Building Digital Transaction Systems in the new Banking World
Building Digital Transaction Systems in the new Banking WorldBuilding Digital Transaction Systems in the new Banking World
Building Digital Transaction Systems in the new Banking World
 
Building Big Architectures XP Conference 2016
Building Big Architectures XP Conference 2016Building Big Architectures XP Conference 2016
Building Big Architectures XP Conference 2016
 
Dependency management in golang
Dependency management in golangDependency management in golang
Dependency management in golang
 
Building Big Architectures
Building Big ArchitecturesBuilding Big Architectures
Building Big Architectures
 
Achieving CI/CD with Kubernetes
Achieving CI/CD with KubernetesAchieving CI/CD with Kubernetes
Achieving CI/CD with Kubernetes
 
Docker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and toolsDocker for the new Era: Introducing Docker,its components and tools
Docker for the new Era: Introducing Docker,its components and tools
 
Hashicorp: Delivering the Tao of DevOps
Hashicorp: Delivering the Tao of DevOpsHashicorp: Delivering the Tao of DevOps
Hashicorp: Delivering the Tao of DevOps
 
CoreOS: The Inside and Outside of Linux Containers
CoreOS: The Inside and Outside of Linux ContainersCoreOS: The Inside and Outside of Linux Containers
CoreOS: The Inside and Outside of Linux Containers
 
Introducing Docker Swarm - the orchestration tool by Docker
Introducing Docker Swarm - the orchestration tool by DockerIntroducing Docker Swarm - the orchestration tool by Docker
Introducing Docker Swarm - the orchestration tool by Docker
 
Sysdig - Introducing a new definition of Monitoring
Sysdig - Introducing a new definition of MonitoringSysdig - Introducing a new definition of Monitoring
Sysdig - Introducing a new definition of Monitoring
 
Introducing Puppet - The faster speed of Automation
Introducing Puppet - The faster speed of AutomationIntroducing Puppet - The faster speed of Automation
Introducing Puppet - The faster speed of Automation
 
Introducing Chef | An IT automation for speed and awesomeness
Introducing Chef | An IT automation for speed and awesomenessIntroducing Chef | An IT automation for speed and awesomeness
Introducing Chef | An IT automation for speed and awesomeness
 
Canister
Canister Canister
Canister
 
Exploring Openstack Swift(Object Storage) and Swiftstack
Exploring Openstack Swift(Object Storage) and Swiftstack Exploring Openstack Swift(Object Storage) and Swiftstack
Exploring Openstack Swift(Object Storage) and Swiftstack
 

Recently uploaded

Solving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptSolving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptJasonTagapanGulla
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm Systemirfanmechengr
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
Internet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxInternet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxVelmuruganTECE
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating SystemRashmi Bhat
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncssuser2ae721
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
The SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teamsThe SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teamsDILIPKUMARMONDAL6
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionMebane Rash
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
Steel Structures - Building technology.pptx
Steel Structures - Building technology.pptxSteel Structures - Building technology.pptx
Steel Structures - Building technology.pptxNikhil Raut
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsSachinPawar510423
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 

Recently uploaded (20)

Solving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptSolving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.ppt
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm System
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Internet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxInternet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptx
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating System
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
The SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teamsThe SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teams
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of Action
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
Steel Structures - Building technology.pptx
Steel Structures - Building technology.pptxSteel Structures - Building technology.pptx
Steel Structures - Building technology.pptx
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documents
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 

A brief study on Kubernetes and its components

  • 2. Agenda  Introduction to Kubernetes  Kubernetes Features  Some basic Concepts  Understanding Kubernetes Architecture  Understanding Key Concepts  Kubelet  Kubernetes cluster  etcd  Services  Namespaces  Flannel  Replication Controller  Volumes  Monitoring and much more
  • 3. Who am I ?  Open Source Tech Enthusiastic .  Open Source Contributor.  Foodie,Traveler.  Join me Here :  Email:ramitsurana@gmail.com  Twitter: @ramitsurana  Linkedin: /in/ramitsurana  Github:ramitsurana
  • 4. Docker  Docker is a powerful build for your Linux containers.  Open platform for developers and sysadmins to build, ship, and run distributed applications.  Docker enables apps to be quickly assembled from components.  It eliminates the friction between development, QA, and production environments.
  • 5. What is it ?  Introduced and Built By GoogleCloud Platform.  Open Source andApache 2.0 Licensed.  ContainerOrchestrator.  Monitoring of Endpoints.  Docker Containers across multiple hosts.  Inspired and informed by Google’s experiences and internal systems
  • 6. Features  Auto-restarting, re- scheduling, and replicating containers.  Supports existing OSS apps.  Manual/Auto Scaling.  Manual/Auto Healing.
  • 7. Basic Terminologies  Pods are the smallest deployable units that can be created, scheduled, and managed. Its a logical collection of containers that belong to an application.  Master is the central control point that provides a unified view of the cluster.There is a single master node that control multiple minions.  Minion is a worker node that run tasks as delegated by the master. Minions can run one or more pods. It provides an application-specific “virtual host” in a containerized environment.  Selector: A query against labels, producing a set result  Controller: A reconciliation loop that drives current state towards desired state.  Service:A set of pods that work together.
  • 9. Kubelet  The primary "node agent" that runs on each node.The kubelet works in terms of a PodSpec.  PodSpec is aYAML or JSON object that describes a pod  Kubelet takes a set of PodSpecs that are provided through various mechanisms and ensures that the containers described in those PodSpecs are running and healthy.  Other than from an PodSpec from the apiserver, there are three ways that a container manifest can be provided to the Kubelet. File: Path passed as a flag on the command line.This file is rechecked every 20 seconds (configurable with a flag). HTTP endpoint: HTTP endpoint passed as a parameter on the command line.This endpoint is checked every 20 seconds HTTP server:The kubelet can also listen for HTTP and respond to a simple API (underspec'd currently) to submit a new manifest.
  • 11. etcd  Etcd is a distributed consistent key-value store for shared configuration and service discovery.  It is by default built in for kubernetes.  All cluster data is stored here.
  • 12. Services  It is abstraction which defines a logical set of Pods and a policy by which to access them - sometimes called a micro-service.  Each service is given its own IP address and port which remains constant for the lifetime of the service. So to access the service from inside your application or container you just bind to the IP address and port number for the service.  A service, through its label selector, can resolve to 0 or more pods. Over the life of a service, the set of pods which comprise that service can grow, shrink, or turn over completely.
  • 14. NameSpaces  It enable you to manage different environments within the same cluster.  It is abstraction which defines a logical set of Pods and a policy by which to access them - sometimes called a micro-service.  You can also run different types of server, batch, or other jobs in the same cluster without worrying about them affecting each other.
  • 16. Flannel  Formerly known as Rudder.  Etcd backed network fabric for containers.  It uses etcd to store the network configuration, allocated subnets, and auxiliary data (such as host's IP).  The simplest backend is udp and uses a TUN device to encapsulate every IP fragment in a UDP packet.
  • 18. Replication Counter  Ensures that a specified number of pod "replicas" are running at any one time.  If there are too many, the replication controller kills some pods. If there are too few, it starts more.  PodTemplate - Creates new pods from a template.  Labels -To remove a pod from a replication controller's target set, change the pod's label.  Deleting a replication controller does not affect the pods it created.
  • 20. Volumes  Volume is just a directory, possibly with some data in it, which is accessible to the containers in a pod.  Volumes can not mount onto other volumes or have hard links to other volumes.  Each container in the Pod must independently specify where to mount each volume.  Kubernetes supports several types ofVolumes:  EmptyDir,hostPath,gcePersistentDisk,awsElasticBlockStore,nfs,is csi,glusterfs,rbd,gitRepo,secret,persistentVolumeClaimetc.
  • 22. Monitoring on CAdvisor  Optional add-on to Kubernetes clusters.  cAdvisor is an open source container resource usage and performance analysis agent.  Heapster is a cluster-wide aggregator of monitoring and event data.  Kubelet itself fetches the data from cAdvisor.  Kubelet manages the pods and containers running on a machine.
  • 24. Labels and Selectors  Labels are the key/value pairs that are attached to objects, such as pods. Labels are intended to be used to specify identifying attributes of objects that are meaningful and relevant to users.  A label selector, the client/user can identify a set of objects.The label selector is the core grouping primitive in Kubernetes.
  • 26. Securing Kubernetes  Optional add-on Kubernetes.  A secret contains a set of named byte arrays.  Pods consume secrets in volumes.
  • 27. Setup  First ensure these packages are installed: $apt-get update $ apt-get install ssh $ apt-get install docker.io $ apt-get install curl  wget https://github.com/GoogleC loudPlatform/kubernetes/re leases/download/v1.0.1/kub ernetes.tar.gz  tar -xvf kubernetes.tar.gz
  • 28. Setup  Build Binaries of Kubernetes,in our case we are building binaries for Ubuntu,so: Cd kubernetes/cluster/ubuntu ./build.sh  This shell script will download and build the latest version of K8s, etcd and flannel binaries.  You can configure the cluster info at: vi kubernetes/cluster/ubuntu/config-default.sh export nodes="root@127.0.0.1" export roles="ai" export NUM_MINIONS=${NUM_MINIONS:-1}  To start up the cluster: cd kubernetes/cluster $ KUBERNETES_PROVIDER=ubuntu ./kube-up.sh  That's it enjoy kubernetes!!
  • 29. Kubectl commands  kubectl works to control the Kubernetes cluster manager.  kubectl api-versions - Print availableAPI versions.  kubectl cluster-info - Display cluster info  kubectl config - config modifies kubeconfig files  kubectl create - Create a resource by filename or stdin  kubectl delete - Delete a resource by filename, stdin, resource and name, or by resources and label selector.  kubectl describe - Show details of a specific resource or group of resources  kubectl exec - Execute a command in a container.  kubectl expose -Take a replicated application and expose it as Kubernetes Service  kubectl get - Display one or many resources  kubectl label - Update the labels on a resource  kubectl logs - Print the logs for a container in a pod.  kubectl namespace - SUPERCEDED: Set and view the current Kubernetes namespace
  • 30. Kubectl commands  kubectl patch - Update field(s) of a resource by stdin.  kubectl port-forward - Forward one or more local ports to a pod.  kubectl proxy - Run a proxy to the Kubernetes API server  kubectl replace - Replace a resource by filename or stdin.  kubectl rolling-update - Perform a rolling update of the given Replication Controller.  kubectl run - Run a particular image on the cluster.  kubectl scale - Set a new size for a Replication Controller.  kubectl stop - Gracefully shut down a resource by name or filename.  kubectl version - Print the client and server version information.
  • 34. Ramit Surana ramitsurana@gmail.com Twitter : @ramitsurana LinkedIn : /in/ramitsurana