SlideShare a Scribd company logo
Kubernetes on metal
Do it Yourself Datacenter

9. Mai 2018
Martin Mailand martin@tuxadero.com
Overview
• Slides to explain what I want to show 20 min

• DEMO 30 min

• Q&A 10 min
About me
• Datacenter network engineer

• 15 years+ experience

• Currently working at STRATO AG
Typhoon
Typhoon
Typhoon
• Minimal, stable base Kubernetes distribution

• Declarative infrastructure and configuration

• Free (freedom and cost) and privacy-respecting

• Practical for labs, datacenters, and clouds

• https://github.com/poseidon/typhoon
Typhoon
• Kubernetes v1.10.2

• Single or multi-master

• Calico or flannel networking

• TLS-enabled

• RBAC-enabled
Typhoon
• AWS

• Bare-Metal

• Digital Ocean

• Google Cloud
Typhoon
• Container Linux

• Fedora Atomic
Typhoon Config I
cluster_name = "mercury"

matchbox_http_endpoint = "http://192.168.100.11:8080"

container_linux_channel = "alpha"

container_linux_version = "1758.0.0"

cached_install = "true"

kernel_args	 	 = ["coreos.autologin=ttyS0"]
Typhoon Config II
k8s_domain_name = "node1.example.com"

ssh_authorized_key = "ssh-rsa key"

asset_dir = "/home/martin/terraform/secrets"
Typhoon Config III
controller_names = ["node1"]

controller_macs = ["52:54:00:aa:aa:01"]

controller_domains = [„node1.example.com"]

worker_names = [

"node2",

]

worker_macs = [

"52:54:00:aa:aa:02",

]

worker_domains = [

"node2.example.com",

]
Toolchain
•Terraform

•Booktube

•Container Linux

•Container Linux Config

•Ignition

•Matchbox
Terraform
Terraform
• Tool for building, changing, versioning infrastructure

• Can manage popular service provider

• Configuration files describe your application

• Typhoon is a Terraform module
Bootkube
Bootkube
• tool for launching self-hosted Kubernetes clusters

• deploy a temporary Kubernetes control-plane

• render all of the assets necessary

• TLS assets

• Kubernetes object manifests

• kubeconfig
Container Linux
Container Linux
• Container Linux is a distro by CoreOS

• Container Linux provides no package manager

• All applications are containers or systemd units

• Immutable - configured during first boot

• Got acquired by RedHat in the beginning of 2018
Container Linux
Flatcar Linux
• Fork of Container Linux

• With the approval of CoreOS

• Berlin based

• https://www.flatcar-linux.org/
Container Linux Config
Container Linux Config
• Human-readable

• YAML

• Cannot be send directly to a Container Linux

provisioning target

• Must be validated

• Transformed into a machine-readable format
Container Linux Config
• User

• Storage

• Network

• Systemd units

• Etcd / docker
Container Linux Config
passwd:

users:

- name: core

password_hash: "$6$43y3tkl..."

ssh_authorized_keys:

- key1
Container Linux Config
storage:

filesystems:

- name: filesystem1

mount:

device: /dev/disk/by-partlabel/ROOT

format: btrfs

wipe_filesystem: true

label: ROOT
Container Linux Config
storage:

files:

- path: /opt/file1

filesystem: root

contents:

inline: Hello, world!

mode: 0644

user:

id: 500

group:

id: 501
Container Linux Config
systemd:

units:

- name: etcd-member.service

dropins:

- name: conf1.conf

contents: |

[Service]

Environment="ETCD_NAME=infra0"
Container Linux Config
Configuration Specification

https://coreos.com/os/docs/latest/configuration.html
Config Transpiler
Config Transpiler
• Translate

• Validate
Container Linux Config Transpiler
Container Linux Config
Config Transpiler
Ignition Config
Provisioned Machine
Ignition
Container Linux Config Transpiler
passwd:

users:

- name: core

password_hash: "$6$43y3tkl..."

ssh_authorized_keys:

- key1
{

"ignition": {

"version": "2.1.0"

},

"passwd": {

"users": [

{

"name": "core",

"passwordHash": "$6$43y3tkl...",

"sshAuthorizedKeys": [

"key1"

]

}

]

},

}
Ignition
Ignition
• only runs once

• runs early in the boot (in the initramfs)

• before the userspace has begun booting

• reads its configuration from a source-of-truth 
Matchbox
Matchbox
• is an HTTP and gRPC service

• renders Ignition configs

• Easily deployed as binary or container
Matchbox
• Group

• match machines to profiles based on labels

• MAC address

• UUID

• Stage

• Profile

• set of config templates  (e.g. ignition config)
Matchbox Group
{

"name": "node1",

"profile": "etcd",

"selector": {

"mac": "52:54:00:89:d8:10"

},

"metadata": {

"fleet_metadata": "role=etcd,name=node1",

"etcd_name": "node1",

"etcd_initial_cluster": "node1=http://node1:2380,
node2=http://node2:2380,node3=http://node3:2380"

}

}
Matchbox Profile
{

"id": "etcd",

"name": "Container Linux with etcd2",

"cloud_id": "",

"ignition_id": "etcd.yaml",

"boot": {

"kernel": "/assets/coreos/1576.4.0/coreos_production_pxe.vmlinuz",

"initrd": ["/assets/coreos/1576.4.0/coreos_production_pxe_image.cpio.gz"
"args": [

"coreos.config.url=http://matchbox.foo:8080/ignition?uuid=${uuid}
&mac=${mac:hexhyp}",

"coreos.first_boot=yes",

"coreos.autologin"

]

},

}
Recap
Recap
Demo
DEMO TIME

More Related Content

PDF
Dockercon 2015 Recap
PPTX
OpenStack Contribution Workflow
PDF
Container-relevant Upstream Kernel Developments
PDF
Introduction to Docker & CoreOS - Symfony User Group Cologne
 
PDF
Project Moby
PDF
Unikernels: the rise of the library hypervisor in MirageOS
PDF
Breaking the RpiDocker challenge
PDF
Docker London: Container Security
Dockercon 2015 Recap
OpenStack Contribution Workflow
Container-relevant Upstream Kernel Developments
Introduction to Docker & CoreOS - Symfony User Group Cologne
 
Project Moby
Unikernels: the rise of the library hypervisor in MirageOS
Breaking the RpiDocker challenge
Docker London: Container Security

What's hot (20)

PDF
OSCON: System software goes weird
PPTX
Docker Mentorweek beginner workshop notes
PDF
Ansible docker
PDF
Docker 1.11 Meetup: Containerd and runc, by Arnaud Porterie and Michael Crosby
PDF
GPU Acceleration for Containers on Intel Processor Graphics
PDF
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...
PPTX
ContainerCon sysdig Slides
PDF
JavaCro'15 - Docker, Kubernetes and Jube - a new cloud architecture - Aleš Ju...
PDF
DockerCon EU 2015: Docker Networking Deep Dive
PDF
CoreOS @Codetalks Hamburg
PPTX
Intro- Docker Native for OSX and Windows
PDF
Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...
PDF
Docker n co
PDF
Docker serverless v1.0
PPTX
Windows Server and Docker - The Internals Behind Bringing Docker and Containe...
PDF
Docker Orchestration at Production Scale
PPTX
PPTX
PDF
Linux Container Technology 101
OSCON: System software goes weird
Docker Mentorweek beginner workshop notes
Ansible docker
Docker 1.11 Meetup: Containerd and runc, by Arnaud Porterie and Michael Crosby
GPU Acceleration for Containers on Intel Processor Graphics
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...
ContainerCon sysdig Slides
JavaCro'15 - Docker, Kubernetes and Jube - a new cloud architecture - Aleš Ju...
DockerCon EU 2015: Docker Networking Deep Dive
CoreOS @Codetalks Hamburg
Intro- Docker Native for OSX and Windows
Wso2 con 2014-us-tutorial-apache stratos-wso2 private paas with docker integr...
Docker n co
Docker serverless v1.0
Windows Server and Docker - The Internals Behind Bringing Docker and Containe...
Docker Orchestration at Production Scale
Linux Container Technology 101
Ad

Similar to Kubernetes on bare metal (20)

PDF
On Prem Container Cloud - Lessons Learned
PDF
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
PDF
Linux Containers From Scratch
PDF
Kubernetes on Bare Metal at the Kitchener-Waterloo Kubernetes and Cloud Nativ...
PDF
Introduction to Docker and all things containers, Docker Meetup at RelateIQ
PDF
A Gentle Introduction To Docker And All Things Containers
PPTX
Kubernetes Introduction
PDF
[KubeCon NA 2020] containerd: Rootless Containers 2020
PDF
Docker 0.11 at MaxCDN meetup in Los Angeles
PDF
A Gentle Introduction to Docker and Containers
PDF
整合Cloud Foundry 和 Kubernetes 技術打造企業級雲應用平台解決方案
PDF
Docker Application to Scientific Computing
PDF
Cloud RPI4 tomcat ARM64
PDF
Kubernetes Day 2017 - Build, Ship and Run Your APP, Production !!
PDF
December 2020 CIALUG: Local Kubernetes for Dummies-So you want to move on fro...
PDF
Introduction to Docker (as presented at December 2013 Global Hackathon)
PDF
Veer's Container Security
PDF
Kubernetes or OpenShift - choosing your container platform for Dev and Ops
PPTX
Galera on kubernetes_no_video
PDF
David Steiman - Getting serious with private kubernetes clusters & cloud nati...
On Prem Container Cloud - Lessons Learned
Introduction to Docker at SF Peninsula Software Development Meetup @Guidewire
Linux Containers From Scratch
Kubernetes on Bare Metal at the Kitchener-Waterloo Kubernetes and Cloud Nativ...
Introduction to Docker and all things containers, Docker Meetup at RelateIQ
A Gentle Introduction To Docker And All Things Containers
Kubernetes Introduction
[KubeCon NA 2020] containerd: Rootless Containers 2020
Docker 0.11 at MaxCDN meetup in Los Angeles
A Gentle Introduction to Docker and Containers
整合Cloud Foundry 和 Kubernetes 技術打造企業級雲應用平台解決方案
Docker Application to Scientific Computing
Cloud RPI4 tomcat ARM64
Kubernetes Day 2017 - Build, Ship and Run Your APP, Production !!
December 2020 CIALUG: Local Kubernetes for Dummies-So you want to move on fro...
Introduction to Docker (as presented at December 2013 Global Hackathon)
Veer's Container Security
Kubernetes or OpenShift - choosing your container platform for Dev and Ops
Galera on kubernetes_no_video
David Steiman - Getting serious with private kubernetes clusters & cloud nati...
Ad

Recently uploaded (20)

PDF
mera desh ae watn.(a source of motivation and patriotism to the youth of the ...
PDF
Session 1 (Week 1)fghjmgfdsfgthyjkhfdsadfghjkhgfdsa
PDF
Top 8 Trusted Sources to Buy Verified Cash App Accounts.pdf
PPTX
curriculumandpedagogyinearlychildhoodcurriculum-171021103104 - Copy.pptx
PPTX
TITLE DEFENSE entitle the impact of social media on education
PPTX
KSS ON CYBERSECURITY INCIDENT RESPONSE AND PLANNING MANAGEMENT.pptx
PPTX
Mathew Digital SEO Checklist Guidlines 2025
PDF
BIOCHEM CH2 OVERVIEW OF MICROBIOLOGY.pdf
PPTX
Database Information System - Management Information System
PDF
SlidesGDGoCxRAIS about Google Dialogflow and NotebookLM.pdf
PDF
Understand the Gitlab_presentation_task.pdf
PDF
📍 LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1 TERPOPULER DI INDONESIA ! 🌟
PPT
415456121-Jiwratrwecdtwfdsfwgdwedvwe dbwsdjsadca-EVN.ppt
PPTX
module 1-Part 1.pptxdddddddddddddddddddddddddddddddddddd
PPTX
t_and_OpenAI_Combined_two_pressentations
PDF
The Ikigai Template _ Recalibrate How You Spend Your Time.pdf
PDF
📍 LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1 TERPOPULER DI INDONESIA ! 🌟
PDF
simpleintnettestmetiaerl for the simple testint
PPTX
Introduction to cybersecurity and digital nettiquette
PPTX
AI_Cyberattack_Solutions AI AI AI AI .pptx
mera desh ae watn.(a source of motivation and patriotism to the youth of the ...
Session 1 (Week 1)fghjmgfdsfgthyjkhfdsadfghjkhgfdsa
Top 8 Trusted Sources to Buy Verified Cash App Accounts.pdf
curriculumandpedagogyinearlychildhoodcurriculum-171021103104 - Copy.pptx
TITLE DEFENSE entitle the impact of social media on education
KSS ON CYBERSECURITY INCIDENT RESPONSE AND PLANNING MANAGEMENT.pptx
Mathew Digital SEO Checklist Guidlines 2025
BIOCHEM CH2 OVERVIEW OF MICROBIOLOGY.pdf
Database Information System - Management Information System
SlidesGDGoCxRAIS about Google Dialogflow and NotebookLM.pdf
Understand the Gitlab_presentation_task.pdf
📍 LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1 TERPOPULER DI INDONESIA ! 🌟
415456121-Jiwratrwecdtwfdsfwgdwedvwe dbwsdjsadca-EVN.ppt
module 1-Part 1.pptxdddddddddddddddddddddddddddddddddddd
t_and_OpenAI_Combined_two_pressentations
The Ikigai Template _ Recalibrate How You Spend Your Time.pdf
📍 LABUAN4D EXCLUSIVE SERVER STAR GAMING ASIA NO.1 TERPOPULER DI INDONESIA ! 🌟
simpleintnettestmetiaerl for the simple testint
Introduction to cybersecurity and digital nettiquette
AI_Cyberattack_Solutions AI AI AI AI .pptx

Kubernetes on bare metal