SlideShare una empresa de Scribd logo
1 de 34
Descargar para leer sin conexión
 Open Source
Data:7/12/2018
non-commercial use
Kubernetes
1
Jason(李孟澤)
Experience
Speaker-CNTUG
Graduate Student
Fields
Android
GoLang
Kubernetes
OpenStack
Who am I
2
Aganda
We will talk about
3
How to install Kubernetes
Ansible
Kubespray
Kubeadm
What is Kubernetes
Architecture
API Server
Controller Manager
Scheduler
How to run an App in Kubernetes
Write yams file
Expose your service
Kubernetes
& Ansible
Building a Kubernetes production ready environment
is quite complicated, so we use automated
subordinate tools to help us implement it.
What is Anisble
Ansible is an IT automation tool. It can configure systems,
deploy software, and orchestrate more advanced IT tasks such
as continuous deployments or zero downtime rolling updates.
4
Kubespray
Kubernetes-incubator
Kubespray is a composition of Ansible playbooks, inventory, provisioning
tools, and domain knowledge for generic OS/Kubernetes clusters
configuration management tasks. Kubespray provides:
a highly available cluster
composable attributes
support for most popular Linux distributions (CoreOS, Debian Jessie,
Ubuntu 16.04, CentOS/RHEL 7, Fedora/CentOS Atomic)
continuous integration tests
5
Kubeadm
Kubernetes-official
kubeadm’s simplicity means it can serve a wide range of use cases:
New users can start with kubeadm to try Kubernetes out for the
first time.
Users familiar with Kubernetes can spin up clusters with kubeadm
and test their applications.
Larger projects can include kubeadm as a building block in a more
complex system that can also include other installer tools.
6
Install guide
Kubeadm
Before you begin
7
One or more machines running one of:
	 Ubuntu 16.04+
	 Debian 9
	 CentOS 7
Or other…
2 GB or more of RAM per machine
2 CPUs or more
Swap disabled. You MUST disable.
Full network connectivity between all machines
Ref:
https://kubernetes.io/docs/tasks/
tools/install-kubeadm/
Install guide
Kubeadm
STEP #1
8
Installing Docker
sudo apt-get update
sudo apt-get install -y docker.io
or install Docker CE 17.03
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl
software-properties-common
sudo curl -fsSL https://download.docker.com/linux/ubuntu/
gpg | apt-key add -
sudo add-apt-repository "deb https://download.docker.com/
linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable"
sudo apt-get update && apt-get install -y docker-ce=$(apt-cache
madison docker-ce | grep 17.03 | head -1 | awk '{print $3}')
Is Guide is only for Ubuntu or Debian
Install guide
Kubeadm
STEP #2
9
Installing kubeadm , kubelet and kubectl
sudo apt-get update && sudo apt-get install -y
apt-transport-https curl
sudo curl -s https://
packages.cloud.google.com/apt/doc/apt-
key.gpg | sudo apt-key add -
sudo cat <<EOF >/etc/apt/sources.list.d/
kubernetes.list deb http://apt.kubernetes.io/
kubernetes-xenial main EOF
sudo apt-get update
sudo apt-get install -y kubelet kubeadm kubectl
Is Guide is only for Ubuntu or Debian
Install guide
Kubeadm
STEP #3
10
Disable swap
sudo swapoff -a
sudo sysctl -w vm.swappiness=0
sudo sed '/swap.img/d' -i /etc/fstab
Set the following system parameters
cat <<EOF | tee /etc/sysctl.d/k8s.conf
net.ipv4.ip_forward = 1

net.bridge.bridge-nf-call-ip6tables =1

net.bridge.bridge-nf-call-iptables = 1

EOF
sudo sysctl -p /etc/sysctl.d/k8s.conf
Is Guide is only for Ubuntu or Debian
Install guide
Kubeadm
STEP #4
11
Confirm Docker information
CGROUP_DRIVER=$(sudo docker info | grep
"Cgroup Driver" | awk '{print $3}')
sudo sed -i "s|KUBELET_KUBECONFIG_ARGS=|
KUBELET_KUBECONFIG_ARGS=--cgroup-
driver=$CGROUP_DRIVER |g" /etc/systemd/
system/kubelet.service.d/10-kubeadm.conf
Restart the Docker Daemon
sudo systemctl daemon-reload
sudo systemctl enable docker &&sudo systemctl start
docker
sudo systemctl status docker
Is Guide is only for Ubuntu or Debian
Install guide
Kubeadm
STEP #5
12
Restart the kubelet Daemon
sudo systemctl daemon-reload
sudo systemctl enable kubelet &&sudo systemctl start kublet
sudo systemctl status kublet
Using kubeadm to Create a Cluster
sudo kubeadm init --pod-network-cidr=192.168.0.0/16
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/
config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
kubectl get node
Is Guide is only for Ubuntu or Debian
Install guide
Kubeadm
STEP #6
13
Using kubeadm join to the existing Cluster
(on other node)
kubeadm join --token <token> <master-ip>:<master-port>
--discovery-token-ca-cert-hash sha256:<hash>
Check Node is joined
(on the master node)
kubectl apply -f https://docs.projectcalico.org/v3.1/
getting-started/kubernetes/installation/hosted/rbac-
kdd.yaml
kubectl apply -f https://docs.projectcalico.org/v3.1/
getting-started/kubernetes/installation/hosted/kubernetes-
datastore/calico-networking/1.7/calico.yaml
kubectl get node
Is Guide is only for Ubuntu or Debian
Kubernetes
&
Architecture
A node is a worker machine in Kubernetes, previously
known as a minion. A node may be a VM or physical
machine, depending on the cluster.
14
What is

CNCF 
▪ The Cloud Native Computing Foundation
builds sustainable ecosystems and fosters
a community around a constellation of high-
quality projects that orchestrate containers
as part of a microservices architecture.
CNCF
CNCF serves as the vendor-neutral home for many of the fastest-growing projects on
GitHub
15
What is

Kubernetes 
▪ Kubernetes is an open-source system for
automating deployment, scaling, and
management of containerized applications.
Kubernetes
Planet Scale Run Anywhere Never Outgrow
17
Kubernetes
&
Architecture
A node is a worker machine in Kubernetes, previously
known as a minion. A node may be a VM or physical
machine, depending on the cluster.
19
Kubernetes
&
Master node
Master components provide the cluster’s control plane.
Master components make global decisions about the
cluster (for example, scheduling), and detecting and
responding to cluster events (starting up a new pod
when a replication controller’s ‘replicas’ field is
unsatisfied).
20
Kubernetes
&
Worker node
Node components run on every node, maintaining
running pods and providing the Kubernetes runtime
environment.
21
Kubernetes
&
Worker node
Addons are pods and services that implement cluster
features. The pods may be managed by Deployments,
ReplicationControllers, and so on. Namespaced addon
objects are created in the kube-system namespace.
22
Kubernetes
CNI
 A Cloud Native Computing Foundation project, consists
of a specification and libraries for writing plugins to
configure network interfaces in Linux containers
Flannel
Calico
Weave
Kuryr
Canal
Cilium
Contiv
CNI (Container Network Interface)
23
Kubernetes
CRI
Consists of a protobuf API, specifications/requirements,
and libraries for container runtimes to integrate with
kubelet on a node. 
Docker
rkt
frakti
cri-containerd
CRI (Container Runtime Interface)
24
Kubernetes
CSI
Enable storage vendors (SP) to develop a plugin once
and have it work across a number of container
orchestration (CO) systems.
ceph
Glusterfs
CSI (Container Storage Interface)
25
Kubernetes
Computing
A Kubernetes pod runs on a given node,
it means a single pod cannot be
stretched across multiple nodes.
26
Kubernetes
Networking
From network point of view a routable IP
address is assign to a given pod.
Containers within a pod share an IP
address and port space, and can find
each other via localhost.
27
Kubernetes
Storage
The storage claimed by a pod is shared
with all the containers within that pod.
Once a persistent volume is claimed by
a pod, it cannot be claimed/attached by
another pod. Volumes enable data to
survive container restarts and to be
shared among the applications within the
pod.
28
Kubernetes
Scheduling
By default the kube-
scheduler service ensures that pods are
only placed on nodes that have sufficient
free resources. Also, it tries to balance
out the resource utilisation of nodes.
29
Kubernetes
Pod
Pods are the smallest deployable units
of computing that can be created and
managed in Kubernetes.
30
Kubernetes
Deployment
Deployment controller changes the
actual state to the desired state at a
controlled rate. 
31
Kubernetes
WokerShop
Q&A
TIME
Kubernetes

Más contenido relacionado

La actualidad más candente

Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Megan O'Keefe
 
Kubernetes architecture
Kubernetes architectureKubernetes architecture
Kubernetes architectureJanakiram MSV
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes IntroductionEric Gustafson
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideBytemark
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes IntroductionPeng Xiao
 
An overview of the Kubernetes architecture
An overview of the Kubernetes architectureAn overview of the Kubernetes architecture
An overview of the Kubernetes architectureIgor Sfiligoi
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to KubernetesImesh Gunaratne
 
Kubernetes Architecture
 Kubernetes Architecture Kubernetes Architecture
Kubernetes ArchitectureKnoldus Inc.
 
What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...
What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...
What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...Edureka!
 
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesKubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesSlideTeam
 
Kubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewKubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewBob Killen
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetesGabriel Carro
 
(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive Overview(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive OverviewBob Killen
 
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Edureka!
 

La actualidad más candente (20)

Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)
 
Kubernetes architecture
Kubernetes architectureKubernetes architecture
Kubernetes architecture
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory Guide
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
An overview of the Kubernetes architecture
An overview of the Kubernetes architectureAn overview of the Kubernetes architecture
An overview of the Kubernetes architecture
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Docker Kubernetes Istio
Docker Kubernetes IstioDocker Kubernetes Istio
Docker Kubernetes Istio
 
Introduction to helm
Introduction to helmIntroduction to helm
Introduction to helm
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
 
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
 
Kubernetes Architecture
 Kubernetes Architecture Kubernetes Architecture
Kubernetes Architecture
 
What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...
What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...
What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...
 
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesKubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
 
Kubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewKubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive Overview
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive Overview(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive Overview
 
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 

Similar a Kubernetes

Kubernetes extensibility
Kubernetes extensibilityKubernetes extensibility
Kubernetes extensibilityDocker, Inc.
 
kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA...
kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA...kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA...
kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA...ssuser92b4be
 
Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)HungWei Chiu
 
Effective Building your Platform with Kubernetes == Keep it Simple
Effective Building your Platform with Kubernetes == Keep it Simple Effective Building your Platform with Kubernetes == Keep it Simple
Effective Building your Platform with Kubernetes == Keep it Simple Wojciech Barczyński
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developerPaul Czarkowski
 
Deploying Windows Apps to Kubernetes with Draft and Helm
Deploying Windows Apps to Kubernetes with Draft and HelmDeploying Windows Apps to Kubernetes with Draft and Helm
Deploying Windows Apps to Kubernetes with Draft and HelmJessica Deen
 
[Hands-on 필수 준비 사항] 쇼핑몰 예제를 통한 Microservice 개발/배포 실습 - 황주필 부장 / 강인호 부장, 한국오라클
[Hands-on 필수 준비 사항] 쇼핑몰 예제를 통한 Microservice 개발/배포 실습 - 황주필 부장 / 강인호 부장, 한국오라클[Hands-on 필수 준비 사항] 쇼핑몰 예제를 통한 Microservice 개발/배포 실습 - 황주필 부장 / 강인호 부장, 한국오라클
[Hands-on 필수 준비 사항] 쇼핑몰 예제를 통한 Microservice 개발/배포 실습 - 황주필 부장 / 강인호 부장, 한국오라클Oracle Korea
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetesWilliam Stewart
 
Building a Kubernetes App with Amazon EKS
Building a Kubernetes App with Amazon EKSBuilding a Kubernetes App with Amazon EKS
Building a Kubernetes App with Amazon EKSDevOps.com
 
Deploying a Kubernetes App with Amazon EKS
Deploying a Kubernetes App with Amazon EKSDeploying a Kubernetes App with Amazon EKS
Deploying a Kubernetes App with Amazon EKSLaura Frank Tacho
 
Kubernetes installation
Kubernetes installationKubernetes installation
Kubernetes installationAhmed Mekawy
 
Aws container webinar day 1
Aws container webinar day 1Aws container webinar day 1
Aws container webinar day 1HoseokSeo7
 
Learn kubernetes in 90 minutes
Learn kubernetes in 90 minutesLearn kubernetes in 90 minutes
Learn kubernetes in 90 minutesLarry Cai
 
A DevOps guide to Kubernetes
A DevOps guide to KubernetesA DevOps guide to Kubernetes
A DevOps guide to KubernetesPaul Czarkowski
 
DevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes IntegrationDevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes IntegrationHank Preston
 
OSS Japan 2019 service mesh bridging Kubernetes and legacy
OSS Japan 2019 service mesh bridging Kubernetes and legacyOSS Japan 2019 service mesh bridging Kubernetes and legacy
OSS Japan 2019 service mesh bridging Kubernetes and legacySteve Wong
 
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...Codemotion
 
KubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipeline
KubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipelineKubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipeline
KubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipelineKubeAcademy
 
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 a Kubernetes (20)

Kubernetes extensibility
Kubernetes extensibilityKubernetes extensibility
Kubernetes extensibility
 
kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA...
kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA...kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA...
kubeadm Cluster Creation Internals_ From Self-Hosting to Upgradability and HA...
 
Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)
 
Effective Building your Platform with Kubernetes == Keep it Simple
Effective Building your Platform with Kubernetes == Keep it Simple Effective Building your Platform with Kubernetes == Keep it Simple
Effective Building your Platform with Kubernetes == Keep it Simple
 
Kubernetes for the PHP developer
Kubernetes for the PHP developerKubernetes for the PHP developer
Kubernetes for the PHP developer
 
Deploying Windows Apps to Kubernetes with Draft and Helm
Deploying Windows Apps to Kubernetes with Draft and HelmDeploying Windows Apps to Kubernetes with Draft and Helm
Deploying Windows Apps to Kubernetes with Draft and Helm
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
[Hands-on 필수 준비 사항] 쇼핑몰 예제를 통한 Microservice 개발/배포 실습 - 황주필 부장 / 강인호 부장, 한국오라클
[Hands-on 필수 준비 사항] 쇼핑몰 예제를 통한 Microservice 개발/배포 실습 - 황주필 부장 / 강인호 부장, 한국오라클[Hands-on 필수 준비 사항] 쇼핑몰 예제를 통한 Microservice 개발/배포 실습 - 황주필 부장 / 강인호 부장, 한국오라클
[Hands-on 필수 준비 사항] 쇼핑몰 예제를 통한 Microservice 개발/배포 실습 - 황주필 부장 / 강인호 부장, 한국오라클
 
Kubernetes laravel and kubernetes
Kubernetes   laravel and kubernetesKubernetes   laravel and kubernetes
Kubernetes laravel and kubernetes
 
Building a Kubernetes App with Amazon EKS
Building a Kubernetes App with Amazon EKSBuilding a Kubernetes App with Amazon EKS
Building a Kubernetes App with Amazon EKS
 
Deploying a Kubernetes App with Amazon EKS
Deploying a Kubernetes App with Amazon EKSDeploying a Kubernetes App with Amazon EKS
Deploying a Kubernetes App with Amazon EKS
 
Kubernetes installation
Kubernetes installationKubernetes installation
Kubernetes installation
 
Aws container webinar day 1
Aws container webinar day 1Aws container webinar day 1
Aws container webinar day 1
 
Learn kubernetes in 90 minutes
Learn kubernetes in 90 minutesLearn kubernetes in 90 minutes
Learn kubernetes in 90 minutes
 
A DevOps guide to Kubernetes
A DevOps guide to KubernetesA DevOps guide to Kubernetes
A DevOps guide to Kubernetes
 
DevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes IntegrationDevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes Integration
 
OSS Japan 2019 service mesh bridging Kubernetes and legacy
OSS Japan 2019 service mesh bridging Kubernetes and legacyOSS Japan 2019 service mesh bridging Kubernetes and legacy
OSS Japan 2019 service mesh bridging Kubernetes and legacy
 
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...
Salvatore Incandela, Fabio Marinelli - Using Spinnaker to Create a Developmen...
 
KubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipeline
KubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipelineKubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipeline
KubeCon EU 2016: Leveraging ephemeral namespaces in a CI/CD pipeline
 
Kubernetes - Sailing a Sea of Containers
Kubernetes - Sailing a Sea of ContainersKubernetes - Sailing a Sea of Containers
Kubernetes - Sailing a Sea of Containers
 

Último

Configuration of IoT devices - Systems managament
Configuration of IoT devices - Systems managamentConfiguration of IoT devices - Systems managament
Configuration of IoT devices - Systems managamentBharaniDharan195623
 
Internet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxInternet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxVelmuruganTECE
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Erbil Polytechnic University
 
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
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...Erbil Polytechnic University
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONjhunlian
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substationstephanwindworld
 
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
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the weldingMuhammadUzairLiaqat
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdfCaalaaAbdulkerim
 
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdfHafizMudaserAhmad
 
Crushers to screens in aggregate production
Crushers to screens in aggregate productionCrushers to screens in aggregate production
Crushers to screens in aggregate productionChinnuNinan
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptMadan Karki
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxsiddharthjain2303
 

Último (20)

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
 
Configuration of IoT devices - Systems managament
Configuration of IoT devices - Systems managamentConfiguration of IoT devices - Systems managament
Configuration of IoT devices - Systems managament
 
Internet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxInternet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptx
 
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
Comparative study of High-rise Building Using ETABS,SAP200 and SAFE., SAFE an...
 
Designing pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptxDesigning pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptx
 
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
 
"Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ..."Exploring the Essential Functions and Design Considerations of Spillways in ...
"Exploring the Essential Functions and Design Considerations of Spillways in ...
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTIONTHE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
THE SENDAI FRAMEWORK FOR DISASTER RISK REDUCTION
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substation
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the welding
 
Research Methodology for Engineering pdf
Research Methodology for Engineering pdfResearch Methodology for Engineering pdf
Research Methodology for Engineering pdf
 
11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf11. Properties of Liquid Fuels in Energy Engineering.pdf
11. Properties of Liquid Fuels in Energy Engineering.pdf
 
Crushers to screens in aggregate production
Crushers to screens in aggregate productionCrushers to screens in aggregate production
Crushers to screens in aggregate production
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.ppt
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
Energy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptxEnergy Awareness training ppt for manufacturing process.pptx
Energy Awareness training ppt for manufacturing process.pptx
 

Kubernetes

  • 3. Aganda We will talk about 3 How to install Kubernetes Ansible Kubespray Kubeadm What is Kubernetes Architecture API Server Controller Manager Scheduler How to run an App in Kubernetes Write yams file Expose your service
  • 4. Kubernetes & Ansible Building a Kubernetes production ready environment is quite complicated, so we use automated subordinate tools to help us implement it. What is Anisble Ansible is an IT automation tool. It can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments or zero downtime rolling updates. 4
  • 5. Kubespray Kubernetes-incubator Kubespray is a composition of Ansible playbooks, inventory, provisioning tools, and domain knowledge for generic OS/Kubernetes clusters configuration management tasks. Kubespray provides: a highly available cluster composable attributes support for most popular Linux distributions (CoreOS, Debian Jessie, Ubuntu 16.04, CentOS/RHEL 7, Fedora/CentOS Atomic) continuous integration tests 5
  • 6. Kubeadm Kubernetes-official kubeadm’s simplicity means it can serve a wide range of use cases: New users can start with kubeadm to try Kubernetes out for the first time. Users familiar with Kubernetes can spin up clusters with kubeadm and test their applications. Larger projects can include kubeadm as a building block in a more complex system that can also include other installer tools. 6
  • 7. Install guide Kubeadm Before you begin 7 One or more machines running one of: Ubuntu 16.04+ Debian 9 CentOS 7 Or other… 2 GB or more of RAM per machine 2 CPUs or more Swap disabled. You MUST disable. Full network connectivity between all machines Ref: https://kubernetes.io/docs/tasks/ tools/install-kubeadm/
  • 8. Install guide Kubeadm STEP #1 8 Installing Docker sudo apt-get update sudo apt-get install -y docker.io or install Docker CE 17.03 sudo apt-get update sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common sudo curl -fsSL https://download.docker.com/linux/ubuntu/ gpg | apt-key add - sudo add-apt-repository "deb https://download.docker.com/ linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable" sudo apt-get update && apt-get install -y docker-ce=$(apt-cache madison docker-ce | grep 17.03 | head -1 | awk '{print $3}') Is Guide is only for Ubuntu or Debian
  • 9. Install guide Kubeadm STEP #2 9 Installing kubeadm , kubelet and kubectl sudo apt-get update && sudo apt-get install -y apt-transport-https curl sudo curl -s https:// packages.cloud.google.com/apt/doc/apt- key.gpg | sudo apt-key add - sudo cat <<EOF >/etc/apt/sources.list.d/ kubernetes.list deb http://apt.kubernetes.io/ kubernetes-xenial main EOF sudo apt-get update sudo apt-get install -y kubelet kubeadm kubectl Is Guide is only for Ubuntu or Debian
  • 10. Install guide Kubeadm STEP #3 10 Disable swap sudo swapoff -a sudo sysctl -w vm.swappiness=0 sudo sed '/swap.img/d' -i /etc/fstab Set the following system parameters cat <<EOF | tee /etc/sysctl.d/k8s.conf net.ipv4.ip_forward = 1
 net.bridge.bridge-nf-call-ip6tables =1
 net.bridge.bridge-nf-call-iptables = 1
 EOF sudo sysctl -p /etc/sysctl.d/k8s.conf Is Guide is only for Ubuntu or Debian
  • 11. Install guide Kubeadm STEP #4 11 Confirm Docker information CGROUP_DRIVER=$(sudo docker info | grep "Cgroup Driver" | awk '{print $3}') sudo sed -i "s|KUBELET_KUBECONFIG_ARGS=| KUBELET_KUBECONFIG_ARGS=--cgroup- driver=$CGROUP_DRIVER |g" /etc/systemd/ system/kubelet.service.d/10-kubeadm.conf Restart the Docker Daemon sudo systemctl daemon-reload sudo systemctl enable docker &&sudo systemctl start docker sudo systemctl status docker Is Guide is only for Ubuntu or Debian
  • 12. Install guide Kubeadm STEP #5 12 Restart the kubelet Daemon sudo systemctl daemon-reload sudo systemctl enable kubelet &&sudo systemctl start kublet sudo systemctl status kublet Using kubeadm to Create a Cluster sudo kubeadm init --pod-network-cidr=192.168.0.0/16 mkdir -p $HOME/.kube sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/ config sudo chown $(id -u):$(id -g) $HOME/.kube/config kubectl get node Is Guide is only for Ubuntu or Debian
  • 13. Install guide Kubeadm STEP #6 13 Using kubeadm join to the existing Cluster (on other node) kubeadm join --token <token> <master-ip>:<master-port> --discovery-token-ca-cert-hash sha256:<hash> Check Node is joined (on the master node) kubectl apply -f https://docs.projectcalico.org/v3.1/ getting-started/kubernetes/installation/hosted/rbac- kdd.yaml kubectl apply -f https://docs.projectcalico.org/v3.1/ getting-started/kubernetes/installation/hosted/kubernetes- datastore/calico-networking/1.7/calico.yaml kubectl get node Is Guide is only for Ubuntu or Debian
  • 14. Kubernetes & Architecture A node is a worker machine in Kubernetes, previously known as a minion. A node may be a VM or physical machine, depending on the cluster. 14
  • 15. What is
 CNCF  ▪ The Cloud Native Computing Foundation builds sustainable ecosystems and fosters a community around a constellation of high- quality projects that orchestrate containers as part of a microservices architecture. CNCF CNCF serves as the vendor-neutral home for many of the fastest-growing projects on GitHub 15
  • 16.
  • 17. What is
 Kubernetes  ▪ Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications. Kubernetes Planet Scale Run Anywhere Never Outgrow 17
  • 18.
  • 19. Kubernetes & Architecture A node is a worker machine in Kubernetes, previously known as a minion. A node may be a VM or physical machine, depending on the cluster. 19
  • 20. Kubernetes & Master node Master components provide the cluster’s control plane. Master components make global decisions about the cluster (for example, scheduling), and detecting and responding to cluster events (starting up a new pod when a replication controller’s ‘replicas’ field is unsatisfied). 20
  • 21. Kubernetes & Worker node Node components run on every node, maintaining running pods and providing the Kubernetes runtime environment. 21
  • 22. Kubernetes & Worker node Addons are pods and services that implement cluster features. The pods may be managed by Deployments, ReplicationControllers, and so on. Namespaced addon objects are created in the kube-system namespace. 22
  • 23. Kubernetes CNI  A Cloud Native Computing Foundation project, consists of a specification and libraries for writing plugins to configure network interfaces in Linux containers Flannel Calico Weave Kuryr Canal Cilium Contiv CNI (Container Network Interface) 23
  • 24. Kubernetes CRI Consists of a protobuf API, specifications/requirements, and libraries for container runtimes to integrate with kubelet on a node.  Docker rkt frakti cri-containerd CRI (Container Runtime Interface) 24
  • 25. Kubernetes CSI Enable storage vendors (SP) to develop a plugin once and have it work across a number of container orchestration (CO) systems. ceph Glusterfs CSI (Container Storage Interface) 25
  • 26. Kubernetes Computing A Kubernetes pod runs on a given node, it means a single pod cannot be stretched across multiple nodes. 26
  • 27. Kubernetes Networking From network point of view a routable IP address is assign to a given pod. Containers within a pod share an IP address and port space, and can find each other via localhost. 27
  • 28. Kubernetes Storage The storage claimed by a pod is shared with all the containers within that pod. Once a persistent volume is claimed by a pod, it cannot be claimed/attached by another pod. Volumes enable data to survive container restarts and to be shared among the applications within the pod. 28
  • 29. Kubernetes Scheduling By default the kube- scheduler service ensures that pods are only placed on nodes that have sufficient free resources. Also, it tries to balance out the resource utilisation of nodes. 29
  • 30. Kubernetes Pod Pods are the smallest deployable units of computing that can be created and managed in Kubernetes. 30
  • 31. Kubernetes Deployment Deployment controller changes the actual state to the desired state at a controlled rate.  31