SlideShare a Scribd company logo
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
© 2018 inwinSTACK Inc. All rights reserved.
Alfie Chen
alfie.c@inwinstack.com
inwinSTACK
alfieYFC alfie.yfc
inwinSTACK inwinSTACK
Groups/k8s.tw
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Agenda
World of Microservices
Lab#1 Docker
Intro to Kubernetes
Lab#2 Minikube
Demo & Case Studies
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
World of Microservices
Virtual Machines, Containers, etc.
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
• Huge Applications
• Hours to Build
• Huge Downtime
• Microservices
• Container Deployment
• DevOps
• Continuous Integration
• Continuous Delivery
App Development Changes
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Kitchen
Office
Ladies’ RoomMen’s Room
Front
desk
entrance
Dining Area
What is Microservices?
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Kitchen
Office
Ladies’ RoomMen’s Room
Front
desk
entrance
Dining Area
What is Microservices?
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Nginx
(Reverse Proxy Service)
Bootstrap
(Front-end Framework)
Rails
(Web Framework)
Sidekiq
(Background Processing Framework) Redis
(Storage)
Postgresql
(Database)
Elastic
(DB Search Engine)
What is Microservices?
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Physical Server
Software Program
Physical Server
Hypervisor
VM VM VM VM
What is Microservices?
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
What is Microservices?
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Kitchen
Office
Ladies’ RoomMen’s Room
Front
desk
entrance
Dining Area
What is Microservices?
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Physical Server
Container Engine
Container Container Container Container
What is Microservices?
Physical Server
Software Program
Physical Server
Hypervisor
VM VM VM VM
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Containers
• Light-weighted
• Isolated Apps
• Simple Version Control
• Fast Delivery
• Portability
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Containers
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Containers – Local Development
Physical Server
Container Engine
Container
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Containers – Simplified Testing
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Docker
Docker provides a uniformed wrapper around a software
package
• Containers
• Images
• Dockerfile
• Docker Registry
build upload
run
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Docker Hub / Store
• https://hub.docker.com/
• https://store.docker.com/
• Public Docker Registry
• Additional Features
1. Automated Builds
2. Webhooks
3. Organizations
upload
(it’s kinda like GitHub)
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Lab#1 Docker
Installation; HelloWorld; Docker Commands!
https://github.com/acinwinstack/minikube-intro-workshop
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Lab1.1 – Installation (Windows)
• https://docs.docker.com/engine/installation/
• https://download.docker.com/win/stable/Docker%20for%2
0Windows%20Installer.exe
• Windows 10 Pro with Hyper-V
• Windows Server 2016
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Lab1.1 – Installation (Mac)
• https://docs.docker.com/engine/installation/
• https://docs.docker.com/docker-for-mac/install/
• Mac 2010 hardware model or newer
• MacOS El Capitan 10.11 or newer
• At least 4GB RAM
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Lab1.1 – Installation (Toolbox)
• https://docs.docker.com/engine/installation/
• https://docs.docker.com/toolbox/overview/
• Any Windows system Docker for Windows doesn’t support
• Any Mac system Docker for Mac doesn’t support
• Docker Toolbox !
"#$
%#&$'()*+,
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
DebianGNU_4.4.74-boot2docker
Lab1.1 – Installation (Toolbox)
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Lab1.1 – Installation (Linux)
• https://docs.docker.com/install/#server
• Enterprise Edition
• Community Edition
The easy way (CE):
curl –fsSL “https://get.docker.com/” | sh
sudo systemctl start docker
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Lab1.2 – Docker Commands
$ docker pull nginx .
$ docker login .
$ docker tag nginx <username>/nginx .
$ docker push <username>/nginx .
$ docker run –itd nginx .
$ docker ps .
$ docker run –itd –p 80:80 --name test nginx:1.12.2 .
$ curl localhost .
$ docker rm –f <containerID> .
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Lab1.2 – Docker Commands
$ git clone https://github.com/acinwinstack/minikube-in
tro-workshop.git
$ cd minikube-intro-workshop/
$ docker build –t <username>/helloworld:v1 ./build/ .
$ docker images .
$ docker run –itd --name test2 –p 8080:80  .
<username>/helloworld:v1 .
$ curl localhost:8080 .
$ docker push <username>:helloworld:v1 .
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
How does it work?
Host Machine
Containers Images
Client/User
docker build
docker pull
docker run
Docker Hub
Docker daemon
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Commands
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Intro to Kubernetes
A powerful container orchestrator open
sourced by Google Inc.
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
• Κυβερνήτης: Governor, Pilot.
• “K8s”
• Current Release: 1.10+
• https://kubernetes.io/
• Release Roadmap
https://github.com/kubernetes/kubernetes/milestones/
Introduction
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Kubernetes Cluster
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
• Controllers
o Deployment
o Stateful Set
o Daemon Set
o Job
• Service
Kubernetes Concepts
Kitchen
Office
Ladies’ RoomMen’s Room
Frontdesk
entrance
Dining
Area
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
• Deployment
o Stateless
o Randomly assigned identities
o Availability > Consistency
o [Web Frontends]
Kubernetes Concepts – Controllers
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
• Stateful Set
o Keeps states
o Persistent data
o Each has its own identity
o Availability < Consistency
o [Databases]
o [Message Queues]
Kubernetes Concepts – Controllers
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
• Daemon Set
o Background process
o One pod per node
o Node labels
o [Cluster Storage]
o [Logging]
o [Node Monitoring]
Kubernetes Concepts – Controllers
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
• Jobs
o Batch Pattern
o Run in parallel
o Run to completion (then exit)
o Independent but related processes
Kubernetes Concepts – Controllers
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Kubernetes Concepts – Service
Physical Server
192.168.99.100
Minion
Pod (10.32.0.3)
Container
Container
80
81
Pod
Container
Container
Svc
ClusterIP
10.101.214.237
↓
10.32.0.3:80
30294
Svc
NodePort
192.168.99.100:30294
↓
10.32.0.3:80
Svc
LoadBalancer
220.132.5.189
↓
10.32.0.3:80
curl192.168.99.100:30294
curl220.132.5.189
Internet
curl 10.101.214.237
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
There’s more!!
So many tools to choose from...
https://kubernetes.io/docs/concepts/
Kubernetes Concepts
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Lab#2 Minikube
Local, single node K8s cluster
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Lab Description
• Single Node
• Persistent Storage
• Rolling update
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Lab2.1 - Installation
https://kubernetes.io/docs/tasks/tools/install-minikube/
Physical Server
Host OS
Hypervisor
(VirtualBox)
Guest OS: Debian GNU/Linux
(192.168.99.100)
Master & Minion
Pod
Container
Container
Pod
Container
Pod
Container
Container
kube-proxykubelet
Controller
Manager
etcdSchedulerAPI Server
Terminal
#kubectl
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Lab2.2 – Minikube Commands
$ minikube start .
$ minikube dashboard .
$ minikube ssh .
$ minikube stop .
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Lab2.3 – Run the Web App
$ kubectl apply -f lab1/redis_pod.yml .
$ kubectl get po –o wide .
write down the pod IP of redis
$ vi lab1/web_deploy.yml .
Config REDIS_IP
$ kubectl apply –f lab1/web_deploy.yml .
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Lab2.4 – Expose the Web App
$ kubectl expose deploy hello-world-deploy  .
--name hello-world-svc  .
--type NodePort  .
--port 80  .
--target-port 80 .
$ kubectl get svc .
write down the NodePort IP of hello-world-svc
$ curl <minikube>:NodePortIP .
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Lab2.5 – Persistent Volume
$ vi lab2/web_deploy.yml .
Config REDIS_IP
$ kubectl apply –f lab2/web_deploy.yml .
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Production Solutions &
Case Studies
Infrastructure designs for production, with a
successful story to tell
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
K8s Minimum Specs
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
K8s Minimum Architecture (HA)
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Kubernetes + Ceph
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Virtual Kubernetes
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
A Successful Story – User Background
• A Hospital in Taipei
• Java developers
• Already using Docker containers
• CI/CD practice with GitLab + Docker
We know our
containers
very well…
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
A Successful Story – User Background
• EMR System Applications
• HR Software Applications
• Radiology Information System Applications
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
The Challenge
• Docker Swarm is not enough
• Require auto-scaling
• Require multi-tenancy
• Require various deploy methods
• Require S3 storage solution
• Require infrastructure scalability for the future
(for both application and storage)
• Require user-friendly interface for both tenants &
admins
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
The Challenge
• Docker Swarm is not enough
• Require auto-scaling
• Require multi-tenancy
• Require various deploy methods
• Require S3 storage solution
• Require infrastructure scalability for the future
(for both application and storage)
• Require user-friendly interface for both tenants &
admins
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
The Solution
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
The Solution
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
The Impact - CI/CD Pipeline
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
The Impact - Storage Optimization
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Conclusion
What should you REALLY take away today?
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Things to Consider…
• What’s best for your app?
i.e. VMs vs Containers
• What are your customized requirements?
i.e. Dev? Ops? DevOps?
• What specific open source apps are in interest?
i.e. Web (wordpress, apache, php);
DB (redis, postgresql, mongodb); …
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
Things to Consider…
Determine how much hardware resource is available
Determine what architecture utilizes the most of your resource
(keep application priorities in mind)
ASK inwinSTACK!!
© 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL
The information contained in this document
is confidential, privileged and only for the
intended recipient and may not be used,
published or redistributed without the prior
written consent of inwinSTACK Inc.
The End
www.inwinstack.com

More Related Content

PDF
DockerCon EU 2015: The Glue is the Hard Part: Making a Production-Ready PaaS
Docker, Inc.
 
PDF
Continuous Deployment with Jenkins on Kubernetes
Matt Baldwin
 
PDF
Container Days Boston - Kubernetes in production
Mike Splain
 
PPTX
Scaling Docker Containers using Kubernetes and Azure Container Service
Ben Hall
 
PDF
KubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces
KubeAcademy
 
PPTX
Going Reactive with Java
Red Hat Developers
 
PDF
OpenStack Preso: DevOps on Hybrid Infrastructure
rhirschfeld
 
PDF
05.10.2017 AWS User Group Meetup - FALLACIES OF DISTRIBUTED COMPUTING WITH KU...
Zalando adtech lab
 
DockerCon EU 2015: The Glue is the Hard Part: Making a Production-Ready PaaS
Docker, Inc.
 
Continuous Deployment with Jenkins on Kubernetes
Matt Baldwin
 
Container Days Boston - Kubernetes in production
Mike Splain
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Ben Hall
 
KubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces
KubeAcademy
 
Going Reactive with Java
Red Hat Developers
 
OpenStack Preso: DevOps on Hybrid Infrastructure
rhirschfeld
 
05.10.2017 AWS User Group Meetup - FALLACIES OF DISTRIBUTED COMPUTING WITH KU...
Zalando adtech lab
 

What's hot (20)

PDF
Building kubectl plugins with Quarkus | DevNation Tech Talk
Red Hat Developers
 
PPTX
Tectonic Summit 2016: Kubernetes 1.5 and Beyond
CoreOS
 
PDF
JUC Europe 2015: Scaling Your Jenkins Master with Docker
CloudBees
 
PDF
CI / CD / CS - Continuous Security in Kubernetes
Sysdig
 
PPTX
Pod Sandbox workflow creation from Dockershim
Victor Morales
 
PDF
On-Demand Image Resizing from Part of the monolith to Containerized Microserv...
Docker, Inc.
 
PDF
Enabling Microservices @Orbitz - DockerCon 2015
Steve Hoffman
 
PPTX
Docker for Fun and Profit
Kel Cecil
 
PDF
Container orchestration from theory to practice
Docker, Inc.
 
PPTX
Scaling jenkins with kubernetes
Ami Mahloof
 
PDF
Configuration Management and Transforming Legacy Applications in the Enterpri...
Docker, Inc.
 
PDF
DockerCon EU 2015: The Latest in Docker Engine
Docker, Inc.
 
PDF
What’s New in Docker - Victor Vieux, Docker
Docker, Inc.
 
PDF
Online Meetup: Why should container system / platform builders care about con...
Docker, Inc.
 
PDF
DockerCon EU 2015: Trading Bitcoin with Docker
Docker, Inc.
 
PPTX
Continuous Delivery with Jenkins & Kubernetes @ Sky
Adriana Vasiu
 
PDF
An Introduction to Rancher
Conner Swann
 
PDF
Docker Security Deep Dive by Ying Li and David Lawrence
Docker, Inc.
 
PDF
In-Cluster Continuous Testing Framework for Docker Containers
Neil Gehani
 
PDF
Docker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Docker, Inc.
 
Building kubectl plugins with Quarkus | DevNation Tech Talk
Red Hat Developers
 
Tectonic Summit 2016: Kubernetes 1.5 and Beyond
CoreOS
 
JUC Europe 2015: Scaling Your Jenkins Master with Docker
CloudBees
 
CI / CD / CS - Continuous Security in Kubernetes
Sysdig
 
Pod Sandbox workflow creation from Dockershim
Victor Morales
 
On-Demand Image Resizing from Part of the monolith to Containerized Microserv...
Docker, Inc.
 
Enabling Microservices @Orbitz - DockerCon 2015
Steve Hoffman
 
Docker for Fun and Profit
Kel Cecil
 
Container orchestration from theory to practice
Docker, Inc.
 
Scaling jenkins with kubernetes
Ami Mahloof
 
Configuration Management and Transforming Legacy Applications in the Enterpri...
Docker, Inc.
 
DockerCon EU 2015: The Latest in Docker Engine
Docker, Inc.
 
What’s New in Docker - Victor Vieux, Docker
Docker, Inc.
 
Online Meetup: Why should container system / platform builders care about con...
Docker, Inc.
 
DockerCon EU 2015: Trading Bitcoin with Docker
Docker, Inc.
 
Continuous Delivery with Jenkins & Kubernetes @ Sky
Adriana Vasiu
 
An Introduction to Rancher
Conner Swann
 
Docker Security Deep Dive by Ying Li and David Lawrence
Docker, Inc.
 
In-Cluster Continuous Testing Framework for Docker Containers
Neil Gehani
 
Docker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Docker, Inc.
 
Ad

Similar to Minikube Workshop Handout (20)

PDF
Cicd.pdf
ssuser37d481
 
PPTX
Real World Example of Orchestrating Docker, Node JS, NFV on OpenStack
Nati Shalom
 
PDF
Introduction to Jenkins X - a beginner's guide
Andrew Bayer
 
PPTX
Docker and Jenkins [as code]
Mark Waite
 
PDF
Using containerization to enable your microservice architecture
Apigee | Google Cloud
 
PDF
Building Event-Driven Workflows with Knative and Tekton
Leon Stigter
 
PDF
Continuous Delivery to Kubernetes with Jenkins and Helm
David Currie
 
PDF
CI and CD Across the Enterprise with Jenkins (devops.com Nov 2014)
CloudBees
 
PDF
cisco networking automation presentation.pdf
Srikrishna Komatineni
 
PPTX
Kubernetes 101 VMworld 2019 workshop slides
Simone Morellato
 
PPTX
Get the Exact Identity Solution You Need - In the Cloud - Overview
ForgeRock
 
PPTX
Javaone 2014 - Git & Docker with Jenkins
Andy Pemberton
 
PDF
Emulators as an Emerging Best Practice for API Providers
Cisco DevNet
 
PDF
Securing Your Apps & APIs in the Cloud
Olivia LaMar
 
PPTX
Continuous Delivery with Jenkins and Wildfly (2014)
Tracy Kennedy
 
PPTX
Workflow, container, and beyond
Kohsuke Kawaguchi
 
PDF
CI/CD 기반의 Microservice 개발
Oracle Korea
 
PDF
introduction to kubernetes slide deck by Roach
ZiyanMaraikar1
 
PDF
Nebulaworks Docker Overview 09-22-2015
Chris Ciborowski
 
PDF
Microservices and APIs
Puneet Sachdev
 
Cicd.pdf
ssuser37d481
 
Real World Example of Orchestrating Docker, Node JS, NFV on OpenStack
Nati Shalom
 
Introduction to Jenkins X - a beginner's guide
Andrew Bayer
 
Docker and Jenkins [as code]
Mark Waite
 
Using containerization to enable your microservice architecture
Apigee | Google Cloud
 
Building Event-Driven Workflows with Knative and Tekton
Leon Stigter
 
Continuous Delivery to Kubernetes with Jenkins and Helm
David Currie
 
CI and CD Across the Enterprise with Jenkins (devops.com Nov 2014)
CloudBees
 
cisco networking automation presentation.pdf
Srikrishna Komatineni
 
Kubernetes 101 VMworld 2019 workshop slides
Simone Morellato
 
Get the Exact Identity Solution You Need - In the Cloud - Overview
ForgeRock
 
Javaone 2014 - Git & Docker with Jenkins
Andy Pemberton
 
Emulators as an Emerging Best Practice for API Providers
Cisco DevNet
 
Securing Your Apps & APIs in the Cloud
Olivia LaMar
 
Continuous Delivery with Jenkins and Wildfly (2014)
Tracy Kennedy
 
Workflow, container, and beyond
Kohsuke Kawaguchi
 
CI/CD 기반의 Microservice 개발
Oracle Korea
 
introduction to kubernetes slide deck by Roach
ZiyanMaraikar1
 
Nebulaworks Docker Overview 09-22-2015
Chris Ciborowski
 
Microservices and APIs
Puneet Sachdev
 
Ad

Recently uploaded (20)

PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PPTX
The Future of AI & Machine Learning.pptx
pritsen4700
 
PDF
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
The Future of AI & Machine Learning.pptx
pritsen4700
 
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
The Future of Artificial Intelligence (AI)
Mukul
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 

Minikube Workshop Handout

  • 1. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL © 2018 inwinSTACK Inc. All rights reserved. Alfie Chen [email protected] inwinSTACK alfieYFC alfie.yfc inwinSTACK inwinSTACK Groups/k8s.tw
  • 2. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Agenda World of Microservices Lab#1 Docker Intro to Kubernetes Lab#2 Minikube Demo & Case Studies
  • 3. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL World of Microservices Virtual Machines, Containers, etc.
  • 4. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL • Huge Applications • Hours to Build • Huge Downtime • Microservices • Container Deployment • DevOps • Continuous Integration • Continuous Delivery App Development Changes
  • 5. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Kitchen Office Ladies’ RoomMen’s Room Front desk entrance Dining Area What is Microservices?
  • 6. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Kitchen Office Ladies’ RoomMen’s Room Front desk entrance Dining Area What is Microservices?
  • 7. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Nginx (Reverse Proxy Service) Bootstrap (Front-end Framework) Rails (Web Framework) Sidekiq (Background Processing Framework) Redis (Storage) Postgresql (Database) Elastic (DB Search Engine) What is Microservices?
  • 8. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Physical Server Software Program Physical Server Hypervisor VM VM VM VM What is Microservices?
  • 9. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL What is Microservices?
  • 10. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Kitchen Office Ladies’ RoomMen’s Room Front desk entrance Dining Area What is Microservices?
  • 11. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Physical Server Container Engine Container Container Container Container What is Microservices? Physical Server Software Program Physical Server Hypervisor VM VM VM VM
  • 12. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Containers • Light-weighted • Isolated Apps • Simple Version Control • Fast Delivery • Portability
  • 13. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Containers
  • 14. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Containers – Local Development Physical Server Container Engine Container
  • 15. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Containers – Simplified Testing
  • 16. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Docker Docker provides a uniformed wrapper around a software package • Containers • Images • Dockerfile • Docker Registry build upload run
  • 17. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Docker Hub / Store • https://hub.docker.com/ • https://store.docker.com/ • Public Docker Registry • Additional Features 1. Automated Builds 2. Webhooks 3. Organizations upload (it’s kinda like GitHub)
  • 18. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Lab#1 Docker Installation; HelloWorld; Docker Commands! https://github.com/acinwinstack/minikube-intro-workshop
  • 19. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Lab1.1 – Installation (Windows) • https://docs.docker.com/engine/installation/ • https://download.docker.com/win/stable/Docker%20for%2 0Windows%20Installer.exe • Windows 10 Pro with Hyper-V • Windows Server 2016
  • 20. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Lab1.1 – Installation (Mac) • https://docs.docker.com/engine/installation/ • https://docs.docker.com/docker-for-mac/install/ • Mac 2010 hardware model or newer • MacOS El Capitan 10.11 or newer • At least 4GB RAM
  • 21. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Lab1.1 – Installation (Toolbox) • https://docs.docker.com/engine/installation/ • https://docs.docker.com/toolbox/overview/ • Any Windows system Docker for Windows doesn’t support • Any Mac system Docker for Mac doesn’t support • Docker Toolbox ! "#$ %#&$'()*+,
  • 22. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL DebianGNU_4.4.74-boot2docker Lab1.1 – Installation (Toolbox)
  • 23. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Lab1.1 – Installation (Linux) • https://docs.docker.com/install/#server • Enterprise Edition • Community Edition The easy way (CE): curl –fsSL “https://get.docker.com/” | sh sudo systemctl start docker
  • 24. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Lab1.2 – Docker Commands $ docker pull nginx . $ docker login . $ docker tag nginx <username>/nginx . $ docker push <username>/nginx . $ docker run –itd nginx . $ docker ps . $ docker run –itd –p 80:80 --name test nginx:1.12.2 . $ curl localhost . $ docker rm –f <containerID> .
  • 25. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Lab1.2 – Docker Commands $ git clone https://github.com/acinwinstack/minikube-in tro-workshop.git $ cd minikube-intro-workshop/ $ docker build –t <username>/helloworld:v1 ./build/ . $ docker images . $ docker run –itd --name test2 –p 8080:80 . <username>/helloworld:v1 . $ curl localhost:8080 . $ docker push <username>:helloworld:v1 .
  • 26. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL How does it work? Host Machine Containers Images Client/User docker build docker pull docker run Docker Hub Docker daemon
  • 27. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Commands
  • 28. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Intro to Kubernetes A powerful container orchestrator open sourced by Google Inc.
  • 29. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL • Κυβερνήτης: Governor, Pilot. • “K8s” • Current Release: 1.10+ • https://kubernetes.io/ • Release Roadmap https://github.com/kubernetes/kubernetes/milestones/ Introduction
  • 30. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Kubernetes Cluster
  • 31. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL • Controllers o Deployment o Stateful Set o Daemon Set o Job • Service Kubernetes Concepts Kitchen Office Ladies’ RoomMen’s Room Frontdesk entrance Dining Area
  • 32. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL • Deployment o Stateless o Randomly assigned identities o Availability > Consistency o [Web Frontends] Kubernetes Concepts – Controllers
  • 33. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL • Stateful Set o Keeps states o Persistent data o Each has its own identity o Availability < Consistency o [Databases] o [Message Queues] Kubernetes Concepts – Controllers
  • 34. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL • Daemon Set o Background process o One pod per node o Node labels o [Cluster Storage] o [Logging] o [Node Monitoring] Kubernetes Concepts – Controllers
  • 35. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL • Jobs o Batch Pattern o Run in parallel o Run to completion (then exit) o Independent but related processes Kubernetes Concepts – Controllers
  • 36. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Kubernetes Concepts – Service Physical Server 192.168.99.100 Minion Pod (10.32.0.3) Container Container 80 81 Pod Container Container Svc ClusterIP 10.101.214.237 ↓ 10.32.0.3:80 30294 Svc NodePort 192.168.99.100:30294 ↓ 10.32.0.3:80 Svc LoadBalancer 220.132.5.189 ↓ 10.32.0.3:80 curl192.168.99.100:30294 curl220.132.5.189 Internet curl 10.101.214.237
  • 37. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL There’s more!! So many tools to choose from... https://kubernetes.io/docs/concepts/ Kubernetes Concepts
  • 38. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Lab#2 Minikube Local, single node K8s cluster
  • 39. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Lab Description • Single Node • Persistent Storage • Rolling update
  • 40. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Lab2.1 - Installation https://kubernetes.io/docs/tasks/tools/install-minikube/ Physical Server Host OS Hypervisor (VirtualBox) Guest OS: Debian GNU/Linux (192.168.99.100) Master & Minion Pod Container Container Pod Container Pod Container Container kube-proxykubelet Controller Manager etcdSchedulerAPI Server Terminal #kubectl
  • 41. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Lab2.2 – Minikube Commands $ minikube start . $ minikube dashboard . $ minikube ssh . $ minikube stop .
  • 42. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Lab2.3 – Run the Web App $ kubectl apply -f lab1/redis_pod.yml . $ kubectl get po –o wide . write down the pod IP of redis $ vi lab1/web_deploy.yml . Config REDIS_IP $ kubectl apply –f lab1/web_deploy.yml .
  • 43. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Lab2.4 – Expose the Web App $ kubectl expose deploy hello-world-deploy . --name hello-world-svc . --type NodePort . --port 80 . --target-port 80 . $ kubectl get svc . write down the NodePort IP of hello-world-svc $ curl <minikube>:NodePortIP .
  • 44. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Lab2.5 – Persistent Volume $ vi lab2/web_deploy.yml . Config REDIS_IP $ kubectl apply –f lab2/web_deploy.yml .
  • 45. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Production Solutions & Case Studies Infrastructure designs for production, with a successful story to tell
  • 46. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL K8s Minimum Specs
  • 47. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL K8s Minimum Architecture (HA)
  • 48. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Kubernetes + Ceph
  • 49. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Virtual Kubernetes
  • 50. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL A Successful Story – User Background • A Hospital in Taipei • Java developers • Already using Docker containers • CI/CD practice with GitLab + Docker We know our containers very well…
  • 51. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL A Successful Story – User Background • EMR System Applications • HR Software Applications • Radiology Information System Applications
  • 52. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL The Challenge • Docker Swarm is not enough • Require auto-scaling • Require multi-tenancy • Require various deploy methods • Require S3 storage solution • Require infrastructure scalability for the future (for both application and storage) • Require user-friendly interface for both tenants & admins
  • 53. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL The Challenge • Docker Swarm is not enough • Require auto-scaling • Require multi-tenancy • Require various deploy methods • Require S3 storage solution • Require infrastructure scalability for the future (for both application and storage) • Require user-friendly interface for both tenants & admins
  • 54. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL The Solution
  • 55. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL The Solution
  • 56. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL The Impact - CI/CD Pipeline
  • 57. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL The Impact - Storage Optimization
  • 58. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Conclusion What should you REALLY take away today?
  • 59. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Things to Consider… • What’s best for your app? i.e. VMs vs Containers • What are your customized requirements? i.e. Dev? Ops? DevOps? • What specific open source apps are in interest? i.e. Web (wordpress, apache, php); DB (redis, postgresql, mongodb); …
  • 60. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL Things to Consider… Determine how much hardware resource is available Determine what architecture utilizes the most of your resource (keep application priorities in mind) ASK inwinSTACK!!
  • 61. © 2018 inwinSTACK Inc. All rights reserved. CONFIDENTIAL The information contained in this document is confidential, privileged and only for the intended recipient and may not be used, published or redistributed without the prior written consent of inwinSTACK Inc. The End www.inwinstack.com