SlideShare a Scribd company logo
1 of 32
Download to read offline
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 1/32
Running k3s on
Raspberry Pi
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 2/32
Kyohei Mizumoto(@kyohmizu)
C# Software Engineer
Interests
Docker/Kubernetes
Go
Security
whoami
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 3/32
Target
People who:
haven't used k3s
haven't run k3s on Raspberry Pi
are interested in k3s cluster management
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 4/32
Preferred Knowledge
The basic knowledge of:
Docker
Kubernetes
Virtual Machine(Microsoft Azure)
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 5/32
Agenda
What is k3s?
Get started
Control Raspberry Pi using k3s
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 6/32
What is k3s?
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 7/32
kubernetes = k8s
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 8/32
k3s = k(8-5)s
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 9/32
Lightweight Kubernetes
Easy to install
Half the memory
Single binary less than 40MB
k3s - 5 less than k8s
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 10/32
Great for
Edge
IoT
CI
ARM
k3s - 5 less than k8s
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 11/32
Changes
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 12/32
How It Works
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 13/32
k3s Pronounce "Kubes"...?
https://github.com/rancher/k3s/issues/55
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 14/32
Get started
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 15/32
Download Binary
https://github.com/rancher/k3s/releases/latest
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 16/32
Download Binary
DOWNLOADPATH:
https://github.com/rancher/k3s/releases/download/v0.5.0/k3s
$ wget [DOWNLOADPATH]
$ ls
k3s
$ chmod +x k3s
$ sudo mv k3s /usr/bin/
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 17/32
Run Server
# Run in the background
$ sudo k3s server &
# Kubeconfig is written to /etc/rancher/k3s/k3s.yaml
$ k3s kubectl get node
NAME STATUS ROLES AGE VERSION
k3s-server Ready <none> 30s v1.14.1-k3s.4
# Run without running the agent
$ k3s server --disable-agent
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 18/32
Join Nodes
# NODE_TOKEN comes from
# /var/lib/rancher/k3s/server/node-token on the server
$ sudo k3s agent --server https://myserver:6443 
--token ${NODE_TOKEN}
Show nodes on server:
$ k3s kubectl get node
NAME STATUS ROLES AGE VERSION
k3s-agent Ready <none> 1h v1.14.1-k3s.4
k3s-server Ready <none> 1h v1.14.1-k3s.4
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 19/32
Control Raspberry Pi
using k3s
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 20/32
Raspberry Pi
https://www.raspberrypi.org/
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 21/32
Configuration
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 22/32
Raspberry Pi Configuration
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 23/32
Raspberry Pi Configuration
Raspberry Pi 3 B+
Breadboard
LED
Resistor
Jump wire
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 24/32
Required Preparation
Create VM on Microsoft Azure
Run k3s server on the VM (with a node)
Join k3s node on Raspberry Pi
$ k3s kubectl get node
NAME STATUS ROLES AGE VERSION
k3s-server Ready <none> 19d v1.14.1-k3s.4
raspi-1 Ready <none> 16d v1.14.1-k3s.4
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 25/32
Sample Program(sample.py)
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setup(2,GPIO.OUT)
while True:
GPIO.output(2,True)
time.sleep(1)
GPIO.output(2,False)
time.sleep(1)
GPIO.cleanup()
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 26/32
Dockerfile
FROM python:3
ADD sample.py /
RUN pip install rpi.gpio
CMD [ "python", "./sample.py" ]
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 27/32
Create Docker Image
# [NAME] is an account name of Docker Hub
$ docker build -t [NAME]/raspi-sample
# Run container
$ docker run --privileged [NAME]/raspi-sample
# Login to Docker Hub
$ docker login
$ docker push [NAME]/raspi-sample
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 28/32
Manifest(sample.yaml)
apiVersion: v1
kind: Pod
metadata:
name: sample
spec:
containers:
- name: sample
image: [NAME]/raspi-sample
securityContext:
privileged: true
nodeSelector:
kubernetes.io/arch: arm
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 29/32
Deploy on Raspberry Pi
$ k3s kubectl apply -f sample.yaml
pod/sample created
# The pod was deployed on Raspberry Pi
$ k3s kubectl get po -o wide
NAME READY STATUS RESTARTS AGE IP
NODE NOMINATED NODE READINESS GATES
sample 1/1 Running 0 48s 10.42.0.6
raspi-1 <none> <none>
The LED blinks!!
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 30/32
Demo
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 31/32
Links
https://k3s.io/
https://github.com/rancher/k3s
2019/5/16 Running k3s on Raspberry Pi
127.0.0.1:5500/#1 32/32
Thank you!

More Related Content

What's hot

Accelerating Envoy and Istio with Cilium and the Linux Kernel
Accelerating Envoy and Istio with Cilium and the Linux KernelAccelerating Envoy and Istio with Cilium and the Linux Kernel
Accelerating Envoy and Istio with Cilium and the Linux KernelThomas Graf
 
제3회난공불락 오픈소스 인프라세미나 - Pacemaker
제3회난공불락 오픈소스 인프라세미나 - Pacemaker제3회난공불락 오픈소스 인프라세미나 - Pacemaker
제3회난공불락 오픈소스 인프라세미나 - PacemakerTommy Lee
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetesGabriel Carro
 
Extending kubernetes with CustomResourceDefinitions
Extending kubernetes with CustomResourceDefinitionsExtending kubernetes with CustomResourceDefinitions
Extending kubernetes with CustomResourceDefinitionsStefan Schimanski
 
Kubernetes Security
Kubernetes SecurityKubernetes Security
Kubernetes Securityinovex GmbH
 
JHipster presentation by Gaetan Bloch
JHipster presentation by Gaetan BlochJHipster presentation by Gaetan Bloch
JHipster presentation by Gaetan BlochGaëtan Bloch
 
Kubernetes Networking with Cilium - Deep Dive
Kubernetes Networking with Cilium - Deep DiveKubernetes Networking with Cilium - Deep Dive
Kubernetes Networking with Cilium - Deep DiveMichal Rostecki
 
AWS로 게임 런칭 준비하기 ::: 장준성, 채민관, AWS Game Master 온라인 시리즈 #4
AWS로 게임 런칭 준비하기 ::: 장준성, 채민관, AWS Game Master 온라인 시리즈 #4AWS로 게임 런칭 준비하기 ::: 장준성, 채민관, AWS Game Master 온라인 시리즈 #4
AWS로 게임 런칭 준비하기 ::: 장준성, 채민관, AWS Game Master 온라인 시리즈 #4Amazon Web Services Korea
 
Techdays Helsinki - Creating the distributed apps of the future using dapr - ...
Techdays Helsinki - Creating the distributed apps of the future using dapr - ...Techdays Helsinki - Creating the distributed apps of the future using dapr - ...
Techdays Helsinki - Creating the distributed apps of the future using dapr - ...Geert van der Cruijsen
 
Node.js API 서버 성능 개선기
Node.js API 서버 성능 개선기Node.js API 서버 성능 개선기
Node.js API 서버 성능 개선기JeongHun Byeon
 
Kubernetes extensibility: CRDs & Operators
Kubernetes extensibility: CRDs & OperatorsKubernetes extensibility: CRDs & Operators
Kubernetes extensibility: CRDs & OperatorsSIGHUP
 
Container Monitoring with Sysdig
Container Monitoring with SysdigContainer Monitoring with Sysdig
Container Monitoring with SysdigSreenivas Makam
 
Understanding the Android System Server
Understanding the Android System ServerUnderstanding the Android System Server
Understanding the Android System ServerOpersys inc.
 
Kubernetes architecture
Kubernetes architectureKubernetes architecture
Kubernetes architectureJanakiram MSV
 
BlueHat v17 || Detecting Compromise on Windows Endpoints with Osquery
BlueHat v17 || Detecting Compromise on Windows Endpoints with Osquery BlueHat v17 || Detecting Compromise on Windows Endpoints with Osquery
BlueHat v17 || Detecting Compromise on Windows Endpoints with Osquery BlueHat Security Conference
 
Replacing iptables with eBPF in Kubernetes with Cilium
Replacing iptables with eBPF in Kubernetes with CiliumReplacing iptables with eBPF in Kubernetes with Cilium
Replacing iptables with eBPF in Kubernetes with CiliumMichal Rostecki
 
Simply your Jenkins Projects with Docker Multi-Stage Builds
Simply your Jenkins Projects with Docker Multi-Stage BuildsSimply your Jenkins Projects with Docker Multi-Stage Builds
Simply your Jenkins Projects with Docker Multi-Stage BuildsEric Smalling
 
Introduction and Deep Dive Into Containerd
Introduction and Deep Dive Into ContainerdIntroduction and Deep Dive Into Containerd
Introduction and Deep Dive Into ContainerdKohei Tokunaga
 

What's hot (20)

Accelerating Envoy and Istio with Cilium and the Linux Kernel
Accelerating Envoy and Istio with Cilium and the Linux KernelAccelerating Envoy and Istio with Cilium and the Linux Kernel
Accelerating Envoy and Istio with Cilium and the Linux Kernel
 
제3회난공불락 오픈소스 인프라세미나 - Pacemaker
제3회난공불락 오픈소스 인프라세미나 - Pacemaker제3회난공불락 오픈소스 인프라세미나 - Pacemaker
제3회난공불락 오픈소스 인프라세미나 - Pacemaker
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Extending kubernetes with CustomResourceDefinitions
Extending kubernetes with CustomResourceDefinitionsExtending kubernetes with CustomResourceDefinitions
Extending kubernetes with CustomResourceDefinitions
 
Kubernetes Security
Kubernetes SecurityKubernetes Security
Kubernetes Security
 
Replicação PostgreSQL com RepManager
Replicação PostgreSQL com RepManagerReplicação PostgreSQL com RepManager
Replicação PostgreSQL com RepManager
 
JHipster presentation by Gaetan Bloch
JHipster presentation by Gaetan BlochJHipster presentation by Gaetan Bloch
JHipster presentation by Gaetan Bloch
 
Kubernetes Networking with Cilium - Deep Dive
Kubernetes Networking with Cilium - Deep DiveKubernetes Networking with Cilium - Deep Dive
Kubernetes Networking with Cilium - Deep Dive
 
AWS로 게임 런칭 준비하기 ::: 장준성, 채민관, AWS Game Master 온라인 시리즈 #4
AWS로 게임 런칭 준비하기 ::: 장준성, 채민관, AWS Game Master 온라인 시리즈 #4AWS로 게임 런칭 준비하기 ::: 장준성, 채민관, AWS Game Master 온라인 시리즈 #4
AWS로 게임 런칭 준비하기 ::: 장준성, 채민관, AWS Game Master 온라인 시리즈 #4
 
Techdays Helsinki - Creating the distributed apps of the future using dapr - ...
Techdays Helsinki - Creating the distributed apps of the future using dapr - ...Techdays Helsinki - Creating the distributed apps of the future using dapr - ...
Techdays Helsinki - Creating the distributed apps of the future using dapr - ...
 
Node.js API 서버 성능 개선기
Node.js API 서버 성능 개선기Node.js API 서버 성능 개선기
Node.js API 서버 성능 개선기
 
Kubernetes extensibility: CRDs & Operators
Kubernetes extensibility: CRDs & OperatorsKubernetes extensibility: CRDs & Operators
Kubernetes extensibility: CRDs & Operators
 
Container Monitoring with Sysdig
Container Monitoring with SysdigContainer Monitoring with Sysdig
Container Monitoring with Sysdig
 
Understanding the Android System Server
Understanding the Android System ServerUnderstanding the Android System Server
Understanding the Android System Server
 
Kubernetes architecture
Kubernetes architectureKubernetes architecture
Kubernetes architecture
 
BlueHat v17 || Detecting Compromise on Windows Endpoints with Osquery
BlueHat v17 || Detecting Compromise on Windows Endpoints with Osquery BlueHat v17 || Detecting Compromise on Windows Endpoints with Osquery
BlueHat v17 || Detecting Compromise on Windows Endpoints with Osquery
 
Replacing iptables with eBPF in Kubernetes with Cilium
Replacing iptables with eBPF in Kubernetes with CiliumReplacing iptables with eBPF in Kubernetes with Cilium
Replacing iptables with eBPF in Kubernetes with Cilium
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Simply your Jenkins Projects with Docker Multi-Stage Builds
Simply your Jenkins Projects with Docker Multi-Stage BuildsSimply your Jenkins Projects with Docker Multi-Stage Builds
Simply your Jenkins Projects with Docker Multi-Stage Builds
 
Introduction and Deep Dive Into Containerd
Introduction and Deep Dive Into ContainerdIntroduction and Deep Dive Into Containerd
Introduction and Deep Dive Into Containerd
 

Similar to Running k3s on raspberry pi

DCSF19 Tips and Tricks of the Docker Captains
DCSF19 Tips and Tricks of the Docker Captains  DCSF19 Tips and Tricks of the Docker Captains
DCSF19 Tips and Tricks of the Docker Captains Docker, Inc.
 
Blasting Through the Clouds - Automating Cloud Foundry with Concourse CI
Blasting Through the Clouds - Automating Cloud Foundry with Concourse CIBlasting Through the Clouds - Automating Cloud Foundry with Concourse CI
Blasting Through the Clouds - Automating Cloud Foundry with Concourse CIFabian Keller
 
Multi cluster management with rancher
Multi cluster management with rancherMulti cluster management with rancher
Multi cluster management with rancherKyohei Mizumoto
 
Installing Component Pack 6.0.0.6
Installing Component Pack 6.0.0.6Installing Component Pack 6.0.0.6
Installing Component Pack 6.0.0.6LetsConnect
 
You got database in my cloud!
You got database  in my cloud!You got database  in my cloud!
You got database in my cloud!Liz Frost
 
Istio on IBM K8Sにチャレンジしてみた
Istio on IBM K8SにチャレンジしてみたIstio on IBM K8Sにチャレンジしてみた
Istio on IBM K8SにチャレンジしてみたShoichiro Sakaigawa
 
Let's talk about Failures with Kubernetes - Hamburg Meetup
Let's talk about Failures with Kubernetes - Hamburg MeetupLet's talk about Failures with Kubernetes - Hamburg Meetup
Let's talk about Failures with Kubernetes - Hamburg MeetupHenning Jacobs
 
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)충섭 김
 
Containerize Legacy .NET Framework Web Apps for Cloud Migration
Containerize Legacy .NET Framework Web Apps for Cloud MigrationContainerize Legacy .NET Framework Web Apps for Cloud Migration
Containerize Legacy .NET Framework Web Apps for Cloud MigrationAmazon Web Services
 
Implementing Lightweight Kubernetes(K3s) on Raspberry Pi Stack - Sangam Biradar
Implementing Lightweight Kubernetes(K3s) on Raspberry Pi Stack - Sangam BiradarImplementing Lightweight Kubernetes(K3s) on Raspberry Pi Stack - Sangam Biradar
Implementing Lightweight Kubernetes(K3s) on Raspberry Pi Stack - Sangam Biradarsangam biradar
 
容器與IoT端點應用
容器與IoT端點應用容器與IoT端點應用
容器與IoT端點應用Philip Zheng
 
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...Jian-Hong Pan
 
Zero downtime deployment of micro-services with Kubernetes
Zero downtime deployment of micro-services with KubernetesZero downtime deployment of micro-services with Kubernetes
Zero downtime deployment of micro-services with KubernetesWojciech Barczyński
 
如何让开源软件用得更放心
如何让开源软件用得更放心如何让开源软件用得更放心
如何让开源软件用得更放心Onward Security
 
[KubeConUS2019 Docker, Inc. Booth] Distributed Builds on Kubernetes with Bui...
 [KubeConUS2019 Docker, Inc. Booth] Distributed Builds on Kubernetes with Bui... [KubeConUS2019 Docker, Inc. Booth] Distributed Builds on Kubernetes with Bui...
[KubeConUS2019 Docker, Inc. Booth] Distributed Builds on Kubernetes with Bui...Akihiro Suda
 
Greenplum Kontained: Coordinating Many PostgreSQL Instances on Kubernetes: Cl...
Greenplum Kontained: Coordinating Many PostgreSQL Instances on Kubernetes: Cl...Greenplum Kontained: Coordinating Many PostgreSQL Instances on Kubernetes: Cl...
Greenplum Kontained: Coordinating Many PostgreSQL Instances on Kubernetes: Cl...VMware Tanzu
 
DCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker ContainersDCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker ContainersDocker, Inc.
 
Technology choices for Apache Kafka and Change Data Capture
Technology choices for Apache Kafka and Change Data CaptureTechnology choices for Apache Kafka and Change Data Capture
Technology choices for Apache Kafka and Change Data CaptureAndrew Schofield
 

Similar to Running k3s on raspberry pi (20)

Recap of de code 2019
Recap of de code 2019Recap of de code 2019
Recap of de code 2019
 
DCSF19 Tips and Tricks of the Docker Captains
DCSF19 Tips and Tricks of the Docker Captains  DCSF19 Tips and Tricks of the Docker Captains
DCSF19 Tips and Tricks of the Docker Captains
 
Blasting Through the Clouds - Automating Cloud Foundry with Concourse CI
Blasting Through the Clouds - Automating Cloud Foundry with Concourse CIBlasting Through the Clouds - Automating Cloud Foundry with Concourse CI
Blasting Through the Clouds - Automating Cloud Foundry with Concourse CI
 
Lab manual
Lab manualLab manual
Lab manual
 
Multi cluster management with rancher
Multi cluster management with rancherMulti cluster management with rancher
Multi cluster management with rancher
 
Installing Component Pack 6.0.0.6
Installing Component Pack 6.0.0.6Installing Component Pack 6.0.0.6
Installing Component Pack 6.0.0.6
 
You got database in my cloud!
You got database  in my cloud!You got database  in my cloud!
You got database in my cloud!
 
Istio on IBM K8Sにチャレンジしてみた
Istio on IBM K8SにチャレンジしてみたIstio on IBM K8Sにチャレンジしてみた
Istio on IBM K8Sにチャレンジしてみた
 
Let's talk about Failures with Kubernetes - Hamburg Meetup
Let's talk about Failures with Kubernetes - Hamburg MeetupLet's talk about Failures with Kubernetes - Hamburg Meetup
Let's talk about Failures with Kubernetes - Hamburg Meetup
 
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
쿠버네티스를 이용한 기능 브랜치별 테스트 서버 만들기 (GitOps CI/CD)
 
Containerize Legacy .NET Framework Web Apps for Cloud Migration
Containerize Legacy .NET Framework Web Apps for Cloud MigrationContainerize Legacy .NET Framework Web Apps for Cloud Migration
Containerize Legacy .NET Framework Web Apps for Cloud Migration
 
Implementing Lightweight Kubernetes(K3s) on Raspberry Pi Stack - Sangam Biradar
Implementing Lightweight Kubernetes(K3s) on Raspberry Pi Stack - Sangam BiradarImplementing Lightweight Kubernetes(K3s) on Raspberry Pi Stack - Sangam Biradar
Implementing Lightweight Kubernetes(K3s) on Raspberry Pi Stack - Sangam Biradar
 
容器與IoT端點應用
容器與IoT端點應用容器與IoT端點應用
容器與IoT端點應用
 
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
Package a PyApp as a Flatpak Package: An HTTP Server for Example @ PyCon APAC...
 
Zero downtime deployment of micro-services with Kubernetes
Zero downtime deployment of micro-services with KubernetesZero downtime deployment of micro-services with Kubernetes
Zero downtime deployment of micro-services with Kubernetes
 
如何让开源软件用得更放心
如何让开源软件用得更放心如何让开源软件用得更放心
如何让开源软件用得更放心
 
[KubeConUS2019 Docker, Inc. Booth] Distributed Builds on Kubernetes with Bui...
 [KubeConUS2019 Docker, Inc. Booth] Distributed Builds on Kubernetes with Bui... [KubeConUS2019 Docker, Inc. Booth] Distributed Builds on Kubernetes with Bui...
[KubeConUS2019 Docker, Inc. Booth] Distributed Builds on Kubernetes with Bui...
 
Greenplum Kontained: Coordinating Many PostgreSQL Instances on Kubernetes: Cl...
Greenplum Kontained: Coordinating Many PostgreSQL Instances on Kubernetes: Cl...Greenplum Kontained: Coordinating Many PostgreSQL Instances on Kubernetes: Cl...
Greenplum Kontained: Coordinating Many PostgreSQL Instances on Kubernetes: Cl...
 
DCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker ContainersDCEU 18: Developing with Docker Containers
DCEU 18: Developing with Docker Containers
 
Technology choices for Apache Kafka and Change Data Capture
Technology choices for Apache Kafka and Change Data CaptureTechnology choices for Apache Kafka and Change Data Capture
Technology choices for Apache Kafka and Change Data Capture
 

More from Kyohei Mizumoto

Introduction to telepresence
Introduction to telepresenceIntroduction to telepresence
Introduction to telepresenceKyohei Mizumoto
 
Windowsコンテナ入門
Windowsコンテナ入門Windowsコンテナ入門
Windowsコンテナ入門Kyohei Mizumoto
 
Introduction of cloud native CI/CD on kubernetes
Introduction of cloud native CI/CD on kubernetesIntroduction of cloud native CI/CD on kubernetes
Introduction of cloud native CI/CD on kubernetesKyohei Mizumoto
 
Deploy Mattermost on AKS
Deploy Mattermost on AKSDeploy Mattermost on AKS
Deploy Mattermost on AKSKyohei Mizumoto
 
Kubernetes logging introduction
Kubernetes logging introductionKubernetes logging introduction
Kubernetes logging introductionKyohei Mizumoto
 
Kubernetes monitoring introduction
Kubernetes monitoring introductionKubernetes monitoring introduction
Kubernetes monitoring introductionKyohei Mizumoto
 
Istio service mesh introduction
Istio service mesh introductionIstio service mesh introduction
Istio service mesh introductionKyohei Mizumoto
 

More from Kyohei Mizumoto (8)

Introduction to telepresence
Introduction to telepresenceIntroduction to telepresence
Introduction to telepresence
 
Windowsコンテナ入門
Windowsコンテナ入門Windowsコンテナ入門
Windowsコンテナ入門
 
Introduction of cloud native CI/CD on kubernetes
Introduction of cloud native CI/CD on kubernetesIntroduction of cloud native CI/CD on kubernetes
Introduction of cloud native CI/CD on kubernetes
 
Deploy Mattermost on AKS
Deploy Mattermost on AKSDeploy Mattermost on AKS
Deploy Mattermost on AKS
 
Kubernetes logging introduction
Kubernetes logging introductionKubernetes logging introduction
Kubernetes logging introduction
 
Kubernetes monitoring introduction
Kubernetes monitoring introductionKubernetes monitoring introduction
Kubernetes monitoring introduction
 
Git入門
Git入門Git入門
Git入門
 
Istio service mesh introduction
Istio service mesh introductionIstio service mesh introduction
Istio service mesh introduction
 

Recently uploaded

Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Recently uploaded (20)

Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 

Running k3s on raspberry pi

  • 1. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 1/32 Running k3s on Raspberry Pi
  • 2. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 2/32 Kyohei Mizumoto(@kyohmizu) C# Software Engineer Interests Docker/Kubernetes Go Security whoami
  • 3. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 3/32 Target People who: haven't used k3s haven't run k3s on Raspberry Pi are interested in k3s cluster management
  • 4. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 4/32 Preferred Knowledge The basic knowledge of: Docker Kubernetes Virtual Machine(Microsoft Azure)
  • 5. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 5/32 Agenda What is k3s? Get started Control Raspberry Pi using k3s
  • 6. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 6/32 What is k3s?
  • 7. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 7/32 kubernetes = k8s
  • 8. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 8/32 k3s = k(8-5)s
  • 9. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 9/32 Lightweight Kubernetes Easy to install Half the memory Single binary less than 40MB k3s - 5 less than k8s
  • 10. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 10/32 Great for Edge IoT CI ARM k3s - 5 less than k8s
  • 11. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 11/32 Changes
  • 12. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 12/32 How It Works
  • 13. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 13/32 k3s Pronounce "Kubes"...? https://github.com/rancher/k3s/issues/55
  • 14. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 14/32 Get started
  • 15. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 15/32 Download Binary https://github.com/rancher/k3s/releases/latest
  • 16. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 16/32 Download Binary DOWNLOADPATH: https://github.com/rancher/k3s/releases/download/v0.5.0/k3s $ wget [DOWNLOADPATH] $ ls k3s $ chmod +x k3s $ sudo mv k3s /usr/bin/
  • 17. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 17/32 Run Server # Run in the background $ sudo k3s server & # Kubeconfig is written to /etc/rancher/k3s/k3s.yaml $ k3s kubectl get node NAME STATUS ROLES AGE VERSION k3s-server Ready <none> 30s v1.14.1-k3s.4 # Run without running the agent $ k3s server --disable-agent
  • 18. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 18/32 Join Nodes # NODE_TOKEN comes from # /var/lib/rancher/k3s/server/node-token on the server $ sudo k3s agent --server https://myserver:6443 --token ${NODE_TOKEN} Show nodes on server: $ k3s kubectl get node NAME STATUS ROLES AGE VERSION k3s-agent Ready <none> 1h v1.14.1-k3s.4 k3s-server Ready <none> 1h v1.14.1-k3s.4
  • 19. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 19/32 Control Raspberry Pi using k3s
  • 20. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 20/32 Raspberry Pi https://www.raspberrypi.org/
  • 21. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 21/32 Configuration
  • 22. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 22/32 Raspberry Pi Configuration
  • 23. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 23/32 Raspberry Pi Configuration Raspberry Pi 3 B+ Breadboard LED Resistor Jump wire
  • 24. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 24/32 Required Preparation Create VM on Microsoft Azure Run k3s server on the VM (with a node) Join k3s node on Raspberry Pi $ k3s kubectl get node NAME STATUS ROLES AGE VERSION k3s-server Ready <none> 19d v1.14.1-k3s.4 raspi-1 Ready <none> 16d v1.14.1-k3s.4
  • 25. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 25/32 Sample Program(sample.py) import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setup(2,GPIO.OUT) while True: GPIO.output(2,True) time.sleep(1) GPIO.output(2,False) time.sleep(1) GPIO.cleanup()
  • 26. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 26/32 Dockerfile FROM python:3 ADD sample.py / RUN pip install rpi.gpio CMD [ "python", "./sample.py" ]
  • 27. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 27/32 Create Docker Image # [NAME] is an account name of Docker Hub $ docker build -t [NAME]/raspi-sample # Run container $ docker run --privileged [NAME]/raspi-sample # Login to Docker Hub $ docker login $ docker push [NAME]/raspi-sample
  • 28. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 28/32 Manifest(sample.yaml) apiVersion: v1 kind: Pod metadata: name: sample spec: containers: - name: sample image: [NAME]/raspi-sample securityContext: privileged: true nodeSelector: kubernetes.io/arch: arm
  • 29. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 29/32 Deploy on Raspberry Pi $ k3s kubectl apply -f sample.yaml pod/sample created # The pod was deployed on Raspberry Pi $ k3s kubectl get po -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES sample 1/1 Running 0 48s 10.42.0.6 raspi-1 <none> <none> The LED blinks!!
  • 30. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 30/32 Demo
  • 31. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 31/32 Links https://k3s.io/ https://github.com/rancher/k3s
  • 32. 2019/5/16 Running k3s on Raspberry Pi 127.0.0.1:5500/#1 32/32 Thank you!