SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 30 day free trial to unlock unlimited reading.
1.
Technical Manager
William Yeh 葉秉哲
給 RD 的 Kubernetes 初體驗
… with a series of hands-on labs
2019-08-11
2.
• PhD in Computer Science, NCTU, Taiwan
• CSPO (Certified Scrum Product Owner) from Scrum Alliance
• PSM I (Professional Scrum Master I) from Scrum.org
• Technical manager @ Titansoft (since Mar 2019)
• Server director & Scrum master @ Gogolook
• Active speaker and trainer for software
architecture, DevOps, agile, and theory of
constraints
12.
Lab material
For each revision, pay attention to:
1. image versions
2. diff in code and configuration
Use git diff --stat HEAD~1 HEAD
to see diff between revisions.
Tag
1.0
2.0
3.0
4.0
5.0
6.0
7.0
13.
Image tags
Lab # Frontend API
1.0 N/A N/A
2.0 N/A 2.0
3.0 3.0 3.0
4.0 3.0 3.0
5.0 5.0 3.0
6.0 auto auto
7.0 auto auto & stable
14.
Lab material
https://github.com/William-Yeh/workshop-k8s201908
or http://bit.ly/k8s-201908 for short
1. Open browser
2. Git clone to your laptop
19.
Lab # 1.0 Review
a. Architecture
b. Main tasks
c. Diff
d. Tricks
e. Questions?
20.
app
runtime
OS kernel
app
runtime
OS kernel
Boundary of application packaging:
pros and cons
traditional deployment way
virtual machine
21.
app
runtime
OS kernel
app
runtime
OS kernel
app
runtime
OS kernel
IaC (Infra as Code)
traditional deployment way
IaC tools
● Chef
● Puppet
● Ansible
virtual machine
22.
app
runtime
OS kernel
app
runtime
OS kernel
app
runtime
OS kernel
Containers as application packaging
units
traditional deployment way
container
virtual machine
29.
Image tags
Lab # Frontend API
1.0 N/A N/A
2.0 N/A 2.0
3.0 3.0 3.0
4.0 3.0 3.0
5.0 5.0 3.0
6.0 auto auto
7.0 auto auto & stable
30.
app
runtime
OS kernel
app
runtime
OS kernel
app
runtime
OS kernel
Recap:
containers as application packaging units
traditional deployment way
container
virtual machine
31.
Lab # 3.0 Review
a. Architecture
b. Main tasks
c. Diff
d. Tricks
e. Questions?
32.
Kubernetes
4.0 - Local Kubernetes
5.0 - Configuration
��
46.
• Shared volumes
• IPC
• Network
Multi-Container Pods in Kubernetes
Pod
Container
Multi-container pods and container communication in Kubernetes
https://www.mirantis.com/blog/multi-container-pods-and-container-communication-in-kubernetes/
57.
Make sure you’re using local Kubernetes
kubectl config view
kubectl config get-contexts
kubectl config use-context docker-for-desktop
or
kubectl config use-context minikube
How to use kubectl to manage multiple Kubernetes clusters
https://success.docker.com/article/how-to-use-kubectl-to-manage-multiple-kubernetes-clusters
58.
Lab # 4.0 Review
a. Architecture
b. Main tasks
c. Diff
d. Tricks
e. Questions?
59.
CAUTION
● There’s one big issue in this Lab 4.0
Can you see?
● What if a image changes
but version tag remains unchanged?
84.
app
runtime
OS kernel
app
runtime
OS kernel
app
runtime
OS kernel
Recap:
containers as application packaging units
traditional deployment way
container
virtual machine
85.
_v2
Service
container
pod
deployment
service
label
label
3
selector