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

Infrastructure is code with the AWS CDK - MAD312 - New York AWS Summit
Infrastructure is code with the AWS CDK - MAD312 - New York AWS SummitInfrastructure is code with the AWS CDK - MAD312 - New York AWS Summit
Infrastructure is code with the AWS CDK - MAD312 - New York AWS SummitAmazon Web Services
 
Terraform introduction
Terraform introductionTerraform introduction
Terraform introductionJason Vance
 
Amazon Virtual Private Cloud (VPC): Networking Fundamentals and Connectivity ...
Amazon Virtual Private Cloud (VPC): Networking Fundamentals and Connectivity ...Amazon Virtual Private Cloud (VPC): Networking Fundamentals and Connectivity ...
Amazon Virtual Private Cloud (VPC): Networking Fundamentals and Connectivity ...Amazon Web Services
 
Aks pimarox from zero to hero
Aks pimarox from zero to heroAks pimarox from zero to hero
Aks pimarox from zero to heroJohan Biere
 
Programming Infrastructure with AWS CDK
Programming Infrastructure with AWS CDKProgramming Infrastructure with AWS CDK
Programming Infrastructure with AWS CDKDonnie Prakoso
 
Kubernetes design principles, patterns and ecosystem
Kubernetes design principles, patterns and ecosystemKubernetes design principles, patterns and ecosystem
Kubernetes design principles, patterns and ecosystemSreenivas Makam
 
Getting Started with Infrastructure as Code
Getting Started with Infrastructure as CodeGetting Started with Infrastructure as Code
Getting Started with Infrastructure as CodeWinWire Technologies Inc
 
Managing Container Images with Amazon ECR - AWS Online Tech Talks
Managing Container Images with Amazon ECR - AWS Online Tech TalksManaging Container Images with Amazon ECR - AWS Online Tech Talks
Managing Container Images with Amazon ECR - AWS Online Tech TalksAmazon Web Services
 
AWS CDK introduction
AWS CDK introductionAWS CDK introduction
AWS CDK introductionleo lapworth
 
Kubernetes Architecture - beyond a black box - Part 1
Kubernetes Architecture - beyond a black box - Part 1Kubernetes Architecture - beyond a black box - Part 1
Kubernetes Architecture - beyond a black box - Part 1Hao H. Zhang
 
Docker introduction &amp; benefits
Docker introduction &amp; benefitsDocker introduction &amp; benefits
Docker introduction &amp; benefitsAmit Manwade
 
[REPEAT 1] Elastic Load Balancing: Deep Dive and Best Practices (NET404-R1) -...
[REPEAT 1] Elastic Load Balancing: Deep Dive and Best Practices (NET404-R1) -...[REPEAT 1] Elastic Load Balancing: Deep Dive and Best Practices (NET404-R1) -...
[REPEAT 1] Elastic Load Balancing: Deep Dive and Best Practices (NET404-R1) -...Amazon Web Services
 
AWS Certified Cloud Practitioner Course S11-S17
AWS Certified Cloud Practitioner Course S11-S17AWS Certified Cloud Practitioner Course S11-S17
AWS Certified Cloud Practitioner Course S11-S17Neal Davis
 
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요Jo Hoon
 
Eks and fargate
Eks and fargateEks and fargate
Eks and fargateAsaf Abres
 
Docker introduction
Docker introductionDocker introduction
Docker introductionPhuc Nguyen
 

What's hot (20)

Infrastructure is code with the AWS CDK - MAD312 - New York AWS Summit
Infrastructure is code with the AWS CDK - MAD312 - New York AWS SummitInfrastructure is code with the AWS CDK - MAD312 - New York AWS Summit
Infrastructure is code with the AWS CDK - MAD312 - New York AWS Summit
 
Terraform introduction
Terraform introductionTerraform introduction
Terraform introduction
 
Amazon Virtual Private Cloud (VPC): Networking Fundamentals and Connectivity ...
Amazon Virtual Private Cloud (VPC): Networking Fundamentals and Connectivity ...Amazon Virtual Private Cloud (VPC): Networking Fundamentals and Connectivity ...
Amazon Virtual Private Cloud (VPC): Networking Fundamentals and Connectivity ...
 
Aks pimarox from zero to hero
Aks pimarox from zero to heroAks pimarox from zero to hero
Aks pimarox from zero to hero
 
Introduction to container based virtualization with docker
Introduction to container based virtualization with dockerIntroduction to container based virtualization with docker
Introduction to container based virtualization with docker
 
Programming Infrastructure with AWS CDK
Programming Infrastructure with AWS CDKProgramming Infrastructure with AWS CDK
Programming Infrastructure with AWS CDK
 
AWS CDK Introduction
AWS CDK IntroductionAWS CDK Introduction
AWS CDK Introduction
 
Kubernetes design principles, patterns and ecosystem
Kubernetes design principles, patterns and ecosystemKubernetes design principles, patterns and ecosystem
Kubernetes design principles, patterns and ecosystem
 
Getting Started with Infrastructure as Code
Getting Started with Infrastructure as CodeGetting Started with Infrastructure as Code
Getting Started with Infrastructure as Code
 
Amazon API Gateway
Amazon API GatewayAmazon API Gateway
Amazon API Gateway
 
Managing Container Images with Amazon ECR - AWS Online Tech Talks
Managing Container Images with Amazon ECR - AWS Online Tech TalksManaging Container Images with Amazon ECR - AWS Online Tech Talks
Managing Container Images with Amazon ECR - AWS Online Tech Talks
 
Introduction to Amazon EKS
Introduction to Amazon EKSIntroduction to Amazon EKS
Introduction to Amazon EKS
 
AWS CDK introduction
AWS CDK introductionAWS CDK introduction
AWS CDK introduction
 
Kubernetes Architecture - beyond a black box - Part 1
Kubernetes Architecture - beyond a black box - Part 1Kubernetes Architecture - beyond a black box - Part 1
Kubernetes Architecture - beyond a black box - Part 1
 
Docker introduction &amp; benefits
Docker introduction &amp; benefitsDocker introduction &amp; benefits
Docker introduction &amp; benefits
 
[REPEAT 1] Elastic Load Balancing: Deep Dive and Best Practices (NET404-R1) -...
[REPEAT 1] Elastic Load Balancing: Deep Dive and Best Practices (NET404-R1) -...[REPEAT 1] Elastic Load Balancing: Deep Dive and Best Practices (NET404-R1) -...
[REPEAT 1] Elastic Load Balancing: Deep Dive and Best Practices (NET404-R1) -...
 
AWS Certified Cloud Practitioner Course S11-S17
AWS Certified Cloud Practitioner Course S11-S17AWS Certified Cloud Practitioner Course S11-S17
AWS Certified Cloud Practitioner Course S11-S17
 
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
 
Eks and fargate
Eks and fargateEks and fargate
Eks and fargate
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 

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

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
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
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 

Recently uploaded (20)

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 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
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 

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!