SlideShare a Scribd company logo
5 Painless Demos to
Get You Started with
Kubernetes
Jakub Nowakowski
Automation | Test Lead @ Amartus
jnowakowski8
What’s On
1. A short story of containers
2. Containers orchestration
3. Why Kubernetes?
4. Cluster components
5. Pod >> Deployment >> Service
6. Networking
7. Cluster bootstrapping
8. Time for some action!
A Short Story of Containers
• Packages with application, dependencies, binaries
and configurations
• Consistent on all environments
• Lightweight and isolated
• Infrastructure-agnostic
• Way to handle microservices
Containers Orchestration
Photo by Axel Ahoi on Unsplash
Kubernetes
Kubernetes (or k8s) in Greek κυβερνήτης means helmsman. Hence the logo!
History:
• Created by Google (Borg) ~15 years ago
• Open sourced in 2014
• Donated to Cloud Native Computing Foundation (2015)
• Container-centric management environment.
• Automates deployment, scaling, and operations of application containers.
• Orchestrates computing, networking, and storage infrastructure.
• Infrastructure- and vendor-agnostic (physical/virtual machines, bare metal/cloud/hybrid).
Cluster Components
Master
Node
Pod >> Deployment >> Service
source: kubernetes.io
Master
Nodes
Networking
Pod-to-pod (need configuration)
Container-to-container (local)
External-to-pod (k8s services),
i.e.:
• ClusterIp
• NodePort
Requirements:
• no ports brokering
• no NAT
Solutions:
• routing
• overlay network (SDN) (Flannel, Calico,
Weave Net, ...)
Cluster Bootstrapping
minikube – the easiest way to start a local, single-node cluster in a VM
$ minikube start
kubeadm – configure k8s components with single command on each machine
node1:~$ kubadm init
node2:~$ kubeadm join 
-–token <TOKEN> 
<MASTER_IP>:6443 
--discovery-token-ca-cert-hash sha256:<HASH>
and many more...
Picking the Right Solution (kubernetes.io)
11 2-Mar-18
Photo by Mitchell Orr on Unsplash
Demo 0: Minikube
Quickly bootstrap a k8s cluster with Minikube.
Resources:
kubernetes.io: Install Minikube
Commands:
$ minikube start
$ minikube status
$ kubectl cluster-info
$ kubectl get nodes
$ minikube dashboard
$ minikube stop
Demo 1: Pod, Deployment, Service
Use kubectl CLI
Create a deployment and expose it outside the cluster as a NodePort service.
Perform operations with kubectl CLI.
Commands:
$ kubectl get pods,deployments,services
$ kubectl create deployment --image=<IMAGE> <NAME>
$ kubectl expose deployment <NAME> --type=NodePort --port=<PORT>
Demo 2: Scaling and updates
YAML manifests
Create a deployment and a service with an YAML manifest file.
Scale it and update an image of the container.
Commands:
$ kubectl apply -f <FILE>
$ kubectl scale deployment <NAME> --replicas=<NUMBER>
$ kubectl set image deployment/<NAME> <CONTAINER>=<IMAGE>
Demo 3: Multiple containers in a pod
Create a deployment with two containers in one pod.
Scale it and expose one of the containers.
Commands:
$ kubectl apply -f <FILE>
Demo 4: Multiple pods
Create three deployments with different scaling and connections between them.
Expose frontend to outside of the cluster.
Commands:
$ kubectl apply -f <FILE>
Confidential | Copyright@2018 Amartus
info@amartus.com @amartus_com company/amartus
www.amartus.com
Questions?

More Related Content

What's hot

IPC16: A Practical Introduction to Kubernetes
IPC16: A Practical Introduction to Kubernetes IPC16: A Practical Introduction to Kubernetes
IPC16: A Practical Introduction to Kubernetes
Robert Lemke
 
OSDN: Serverless technologies with Kubernetes
OSDN: Serverless technologies with Kubernetes OSDN: Serverless technologies with Kubernetes
OSDN: Serverless technologies with Kubernetes
Provectus
 
What is serveless?
What is serveless? What is serveless?
What is serveless?
Provectus
 
KubeCon CloudNativeCon 2016 Seattle - a report
KubeCon CloudNativeCon 2016 Seattle - a reportKubeCon CloudNativeCon 2016 Seattle - a report
KubeCon CloudNativeCon 2016 Seattle - a report
Krishna-Kumar
 
Package your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and KubernetesPackage your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and Kubernetes
Arun Gupta
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
Eueung Mulyana
 
OpenStack with OpenDaylight
OpenStack with OpenDaylightOpenStack with OpenDaylight
OpenStack with OpenDaylight
Vikram G Hosakote
 
Tectonic Summit 2016: The Origins of Kubernetes
Tectonic Summit 2016: The Origins of KubernetesTectonic Summit 2016: The Origins of Kubernetes
Tectonic Summit 2016: The Origins of Kubernetes
CoreOS
 
Kubernetes kubecon-roundup
Kubernetes kubecon-roundupKubernetes kubecon-roundup
Kubernetes kubecon-roundup
Sebastien Goasguen
 
Kubernetes Hands-On Guide
Kubernetes Hands-On GuideKubernetes Hands-On Guide
Kubernetes Hands-On Guide
Stratoscale
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
Antonin Stoklasek
 
Building Clustered Applications with Kubernetes and Docker
Building Clustered Applications with Kubernetes and DockerBuilding Clustered Applications with Kubernetes and Docker
Building Clustered Applications with Kubernetes and Docker
Steve Watt
 
Rex gke-clustree
Rex gke-clustreeRex gke-clustree
Rex gke-clustree
Romain Vrignaud
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
Paris Apostolopoulos
 
Kubernetes
KubernetesKubernetes
Kubernetes
Meng-Ze Lee
 
Kubernetes 101 Workshop
Kubernetes 101 WorkshopKubernetes 101 Workshop
Kubernetes 101 Workshop
Vishal Biyani
 
Kubernetes on CloudStack with coreOS
Kubernetes on CloudStack with coreOSKubernetes on CloudStack with coreOS
Kubernetes on CloudStack with coreOS
Sebastien Goasguen
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
Peng Xiao
 
Moving to Kubernetes - Tales from SoundCloud
Moving to Kubernetes - Tales from SoundCloudMoving to Kubernetes - Tales from SoundCloud
Moving to Kubernetes - Tales from SoundCloud
Tobias Schmidt
 
Building Big Architectures
Building Big ArchitecturesBuilding Big Architectures
Building Big Architectures
Ramit Surana
 

What's hot (20)

IPC16: A Practical Introduction to Kubernetes
IPC16: A Practical Introduction to Kubernetes IPC16: A Practical Introduction to Kubernetes
IPC16: A Practical Introduction to Kubernetes
 
OSDN: Serverless technologies with Kubernetes
OSDN: Serverless technologies with Kubernetes OSDN: Serverless technologies with Kubernetes
OSDN: Serverless technologies with Kubernetes
 
What is serveless?
What is serveless? What is serveless?
What is serveless?
 
KubeCon CloudNativeCon 2016 Seattle - a report
KubeCon CloudNativeCon 2016 Seattle - a reportKubeCon CloudNativeCon 2016 Seattle - a report
KubeCon CloudNativeCon 2016 Seattle - a report
 
Package your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and KubernetesPackage your Java EE Application using Docker and Kubernetes
Package your Java EE Application using Docker and Kubernetes
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
OpenStack with OpenDaylight
OpenStack with OpenDaylightOpenStack with OpenDaylight
OpenStack with OpenDaylight
 
Tectonic Summit 2016: The Origins of Kubernetes
Tectonic Summit 2016: The Origins of KubernetesTectonic Summit 2016: The Origins of Kubernetes
Tectonic Summit 2016: The Origins of Kubernetes
 
Kubernetes kubecon-roundup
Kubernetes kubecon-roundupKubernetes kubecon-roundup
Kubernetes kubecon-roundup
 
Kubernetes Hands-On Guide
Kubernetes Hands-On GuideKubernetes Hands-On Guide
Kubernetes Hands-On Guide
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
Building Clustered Applications with Kubernetes and Docker
Building Clustered Applications with Kubernetes and DockerBuilding Clustered Applications with Kubernetes and Docker
Building Clustered Applications with Kubernetes and Docker
 
Rex gke-clustree
Rex gke-clustreeRex gke-clustree
Rex gke-clustree
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Kubernetes 101 Workshop
Kubernetes 101 WorkshopKubernetes 101 Workshop
Kubernetes 101 Workshop
 
Kubernetes on CloudStack with coreOS
Kubernetes on CloudStack with coreOSKubernetes on CloudStack with coreOS
Kubernetes on CloudStack with coreOS
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Moving to Kubernetes - Tales from SoundCloud
Moving to Kubernetes - Tales from SoundCloudMoving to Kubernetes - Tales from SoundCloud
Moving to Kubernetes - Tales from SoundCloud
 
Building Big Architectures
Building Big ArchitecturesBuilding Big Architectures
Building Big Architectures
 

Similar to 5 Painless Demos to Get You Started with Kubernetes

Learn kubernetes in 90 minutes
Learn kubernetes in 90 minutesLearn kubernetes in 90 minutes
Learn kubernetes in 90 minutes
Larry Cai
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
Eric Gustafson
 
Kubernetes Selenium Grid
Kubernetes Selenium GridKubernetes Selenium Grid
Kubernetes Selenium Grid
Amrit pal singh
 
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
Steve Wong
 
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
Ryan Jarvinen
 
Pro2516 10 things about oracle and k8s.pptx-final
Pro2516   10 things about oracle and k8s.pptx-finalPro2516   10 things about oracle and k8s.pptx-final
Pro2516 10 things about oracle and k8s.pptx-final
Michel Schildmeijer
 
How to integrate Kubernetes in OpenStack: You need to know these project
How to integrate Kubernetes in OpenStack: You need to know these projectHow to integrate Kubernetes in OpenStack: You need to know these project
How to integrate Kubernetes in OpenStack: You need to know these project
inwin stack
 
Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !
Anthony Dahanne
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
Piotr Perzyna
 
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
 
DevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes IntegrationDevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes Integration
Hank Preston
 
Kubernetes - Sailing a Sea of Containers
Kubernetes - Sailing a Sea of ContainersKubernetes - Sailing a Sea of Containers
Kubernetes - Sailing a Sea of Containers
Kel Cecil
 
Dockerizing OpenStack for High Availability
Dockerizing OpenStack for High AvailabilityDockerizing OpenStack for High Availability
Dockerizing OpenStack for High Availability
Daniel Krook
 
Run K8s on Local Environment
Run K8s on Local EnvironmentRun K8s on Local Environment
Run K8s on Local Environment
Ganesh Pol
 
Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307
Inhye Park
 
Mastering Kubernetes - Basics and Advanced Concepts using Example Project
Mastering Kubernetes - Basics and Advanced Concepts using Example ProjectMastering Kubernetes - Basics and Advanced Concepts using Example Project
Mastering Kubernetes - Basics and Advanced Concepts using Example Project
wajrcs
 
Kubernetes workshop -_the_basics
Kubernetes workshop -_the_basicsKubernetes workshop -_the_basics
Kubernetes workshop -_the_basics
Sjuul Janssen
 
Kubernetes extensibility
Kubernetes extensibilityKubernetes extensibility
Kubernetes extensibility
Docker, Inc.
 
Moving a Monolith to Kubernetes
Moving a Monolith to KubernetesMoving a Monolith to Kubernetes
Moving a Monolith to Kubernetes
M. Scott Ford
 
Microservices in Java
Microservices in JavaMicroservices in Java
Microservices in Java
Anatole Tresch
 

Similar to 5 Painless Demos to Get You Started with Kubernetes (20)

Learn kubernetes in 90 minutes
Learn kubernetes in 90 minutesLearn kubernetes in 90 minutes
Learn kubernetes in 90 minutes
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Kubernetes Selenium Grid
Kubernetes Selenium GridKubernetes Selenium Grid
Kubernetes Selenium Grid
 
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
 
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
 
Pro2516 10 things about oracle and k8s.pptx-final
Pro2516   10 things about oracle and k8s.pptx-finalPro2516   10 things about oracle and k8s.pptx-final
Pro2516 10 things about oracle and k8s.pptx-final
 
How to integrate Kubernetes in OpenStack: You need to know these project
How to integrate Kubernetes in OpenStack: You need to know these projectHow to integrate Kubernetes in OpenStack: You need to know these project
How to integrate Kubernetes in OpenStack: You need to know these project
 
Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !Get you Java application ready for Kubernetes !
Get you Java application ready for Kubernetes !
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
 
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)
 
DevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes IntegrationDevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes Integration
 
Kubernetes - Sailing a Sea of Containers
Kubernetes - Sailing a Sea of ContainersKubernetes - Sailing a Sea of Containers
Kubernetes - Sailing a Sea of Containers
 
Dockerizing OpenStack for High Availability
Dockerizing OpenStack for High AvailabilityDockerizing OpenStack for High Availability
Dockerizing OpenStack for High Availability
 
Run K8s on Local Environment
Run K8s on Local EnvironmentRun K8s on Local Environment
Run K8s on Local Environment
 
Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307Docker kubernetes fundamental(pod_service)_190307
Docker kubernetes fundamental(pod_service)_190307
 
Mastering Kubernetes - Basics and Advanced Concepts using Example Project
Mastering Kubernetes - Basics and Advanced Concepts using Example ProjectMastering Kubernetes - Basics and Advanced Concepts using Example Project
Mastering Kubernetes - Basics and Advanced Concepts using Example Project
 
Kubernetes workshop -_the_basics
Kubernetes workshop -_the_basicsKubernetes workshop -_the_basics
Kubernetes workshop -_the_basics
 
Kubernetes extensibility
Kubernetes extensibilityKubernetes extensibility
Kubernetes extensibility
 
Moving a Monolith to Kubernetes
Moving a Monolith to KubernetesMoving a Monolith to Kubernetes
Moving a Monolith to Kubernetes
 
Microservices in Java
Microservices in JavaMicroservices in Java
Microservices in Java
 

Recently uploaded

By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 

Recently uploaded (20)

By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 

5 Painless Demos to Get You Started with Kubernetes

  • 1. 5 Painless Demos to Get You Started with Kubernetes Jakub Nowakowski Automation | Test Lead @ Amartus jnowakowski8
  • 2. What’s On 1. A short story of containers 2. Containers orchestration 3. Why Kubernetes? 4. Cluster components 5. Pod >> Deployment >> Service 6. Networking 7. Cluster bootstrapping 8. Time for some action!
  • 3. A Short Story of Containers • Packages with application, dependencies, binaries and configurations • Consistent on all environments • Lightweight and isolated • Infrastructure-agnostic • Way to handle microservices
  • 5. Photo by Axel Ahoi on Unsplash
  • 6. Kubernetes Kubernetes (or k8s) in Greek κυβερνήτης means helmsman. Hence the logo! History: • Created by Google (Borg) ~15 years ago • Open sourced in 2014 • Donated to Cloud Native Computing Foundation (2015) • Container-centric management environment. • Automates deployment, scaling, and operations of application containers. • Orchestrates computing, networking, and storage infrastructure. • Infrastructure- and vendor-agnostic (physical/virtual machines, bare metal/cloud/hybrid).
  • 8. Pod >> Deployment >> Service source: kubernetes.io Master Nodes
  • 9. Networking Pod-to-pod (need configuration) Container-to-container (local) External-to-pod (k8s services), i.e.: • ClusterIp • NodePort Requirements: • no ports brokering • no NAT Solutions: • routing • overlay network (SDN) (Flannel, Calico, Weave Net, ...)
  • 10. Cluster Bootstrapping minikube – the easiest way to start a local, single-node cluster in a VM $ minikube start kubeadm – configure k8s components with single command on each machine node1:~$ kubadm init node2:~$ kubeadm join -–token <TOKEN> <MASTER_IP>:6443 --discovery-token-ca-cert-hash sha256:<HASH> and many more... Picking the Right Solution (kubernetes.io)
  • 11. 11 2-Mar-18 Photo by Mitchell Orr on Unsplash
  • 12. Demo 0: Minikube Quickly bootstrap a k8s cluster with Minikube. Resources: kubernetes.io: Install Minikube Commands: $ minikube start $ minikube status $ kubectl cluster-info $ kubectl get nodes $ minikube dashboard $ minikube stop
  • 13. Demo 1: Pod, Deployment, Service Use kubectl CLI Create a deployment and expose it outside the cluster as a NodePort service. Perform operations with kubectl CLI. Commands: $ kubectl get pods,deployments,services $ kubectl create deployment --image=<IMAGE> <NAME> $ kubectl expose deployment <NAME> --type=NodePort --port=<PORT>
  • 14. Demo 2: Scaling and updates YAML manifests Create a deployment and a service with an YAML manifest file. Scale it and update an image of the container. Commands: $ kubectl apply -f <FILE> $ kubectl scale deployment <NAME> --replicas=<NUMBER> $ kubectl set image deployment/<NAME> <CONTAINER>=<IMAGE>
  • 15. Demo 3: Multiple containers in a pod Create a deployment with two containers in one pod. Scale it and expose one of the containers. Commands: $ kubectl apply -f <FILE>
  • 16. Demo 4: Multiple pods Create three deployments with different scaling and connections between them. Expose frontend to outside of the cluster. Commands: $ kubectl apply -f <FILE>
  • 17. Confidential | Copyright@2018 Amartus info@amartus.com @amartus_com company/amartus www.amartus.com Questions?

Editor's Notes

  1. Container = A package that contains everything the software needs to run (application binaries, system libraries, dependencies, configurations). Allow applications to be deployed easily and consistently regardless of the target environment (developer laptop, testing environment or a production data center). Containers are lightweight (no additional OS needed). Processes running in separate containers are isolated from one another. Many containers can run on a single machine. Containers can be installed on any compute unit, regardless of hardware, OS, or software. They run on premise, in the cloud or in hybrid solutions. Containerized modules provide a great way to implement and run applications developed with microservices architecture (applications developed as a set of small components, each running its own processes and usually communicating via HTTP API calls).
  2. Containers orchestration is the automated process of: Deploying multiple containers and rescheduling them in case of failure. Integrating containers and exposing services to be accessible externally. Managing and configuring running containers, handling rolling updates. Scaling in and scaling out containers depending on traffic.
  3. Although there are different container orchestrators available, Kubernetes is by far the most popular and fastest-growing one. It’s a highly-extensible solution for fully-automated containerized applications clusters management. Let’s meet our hero.
  4. Kubernetes – helmsman in Greek. Created by Google about 15 years ago. Developed and used internally over the time. In 2014, open sourced and one year later donated to the community (which is pretty impressive: > 2000 contributors, >60 000 commits, one of most popular projects on github). Kubernetes provides a container-centric management environment to automate operations on applications delivered as containers. It orchestrates computing, networking, and storage infrastructure. It’s an infrastructure- and provider-agnostic solution, which can be run on physical or virtual machines, bare metal servers located in a company, in the cloud, or on hybrid solutions.
  5. A Cluster is a group of one or more virtual or physical machines that provide resources to run applications. There are two types of machines in the cluster: - Master (provides the control plane for the cluster) - makes global decisions about the cluster (for example, scheduling) and detects and responds to cluster events (e.g., starting a new application instance when another is down). - Node (Worker) - provides runtime environment for applications on designated machines. ------------------------------------------ Master components: - apiserver – exposes Kubernetes API to provide front-end for Kubernetes configuration - etcd – key value store for all cluster data - scheduler – assigns pods to nodes - controller manager – monitors the current state of the cluster and performs operations to meet the desired state Node components: - kubelet – agent running on each node; makes sure that containers are running - kube-proxy – maintains network rules on the host and performs connection forwarding - container runtime – software responsible for running containers (e.g., Docker or rkt)
  6. POD A Pod is a Kubernetes abstraction that represents a group of one or more application containers, 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 DEPLOYMENT Deployment Controller is responsible for running and monitoring pods,. For instance, if a node holding the pod is going down or is deleted, the controller will boot a new instance to replace it. SERVICE If we have multiple pods running, how do we ensure that there is a single endpoint to access them? A service takes care of that. It provides a unified way to route traffic to a cluster and eventually to a list of pods.
  7. There are three challenges in network connectivity across the cluster: Container-to-container communication – containers within the same pod share IP address and localhost, so they can easily communicate with each other within the same pod. Pod-to-pod networking – that's the main challenge, as this connection is not configured out-of-the-box in Kubernetes, and requires some additional planning and configuration Pods should communicate without port forwarding or mapping, and should reach one another without NAT. One solution is to configure static routing in the network topology with appropriate paths to reach pods. Another solution is an Overlay Network, which can set up a virtual network over the physical one to handle communication that will tunnel the traffic between pods. Packets going from a pod will be encapsulated on the node and tunneled to the destination node. There is a number of plugins available to support this solutions. External-to-pod communciation is handled by Kubernetes Services (e.g., ClusterIp – exposing the service to cluster only, NodePort – exposing the service to external of the cluster).
  8. Minikube: The recommended method for creating a local, single-node Kubernetes cluster for development and testing. Setup is completely automated and doesn’t require a cloud provider account. Kubeadm: Expects the user to bring a machine to execute on; type doesn’t matter (laptop, VM, physical/cloud server or Raspberry Pi).
  9. Demos are shared on GitHub: https://github.com/nkuba/k8s-intro-demos
  10. Please visit: https://github.com/nkuba/k8s-intro-demos/tree/master/demo0
  11. Please visit: https://github.com/nkuba/k8s-intro-demos/tree/master/demo1
  12. Please visit: https://github.com/nkuba/k8s-intro-demos/tree/master/demo2
  13. Please visit: https://github.com/nkuba/k8s-intro-demos/tree/master/demo3
  14. Please visit: https://github.com/nkuba/k8s-intro-demos/tree/master/demo4
  15. Questions? Enquiries? Help needed? Get in touch with us at info@amartus.com Follow us at @amartus_com | www.linkedin.com/company/Amartus/ Are you interested in becoming a certified Kubernetes Admin? I’ve been there, check my Medium post for some tips: https://medium.com/@jnowakowski/k8s-admin-exam-tips-22961241ba7d