SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
1Footer
Self Hosted Bare Metal Kubernetes for SMEs
Thomas Hoppe
v1.0
2Self Hosted Bare Metal Kubernetes for SMEs
Who We Are
● n-fuse GmbH
● Since 2001
● ~25 Engineers
● Branches in Stuttgart, Germany and Riga, Latvia
● Accompanying our clients from idea to production
● In hard- and software projects
● Customers ranging from startups to top 10 DAX
www.n-fuse.co
3Self Hosted Bare Metal Kubernetes for SMEs
Outline of this Talk
●
What is Kubernetes and why to use it?
●
Installation process and caveats
●
Architecture of our environment
●
Monitoring, backup
●
How we use it, CI/CD
●
Outlook
...and a lot of real world experiences sprinkled over it
4Self Hosted Bare Metal Kubernetes for SMEs
What is Kubernetes?
● Open source container orchestrator that automates scale out of container
operations
– Docker in most cases
● Focuses completely on containers and is itself built as a set of containers
● Now maintained by the CNCF which is in-turn a member of the Linux
Foundation
5Self Hosted Bare Metal Kubernetes for SMEs
Why to Use K8s?
● All the benfits of containers
● Very good fit for µ-services
● Low overhead
● The ecosystem
6Self Hosted Bare Metal Kubernetes for SMEs
How to set up K8s? Just some Ways
●
Developer desktop
– Minikube
●
Turnkey Hosted Kubernetes
– Google Kubernetes Engine
– AWS EKS
– Azure Container Kubernetes Service
●
Custom
– Using IaaS (AWS, Google Computing Engine, Azure)
●
Using Tools like Kubespray, kops
– On Premise/ Bare Metal
●
Using Tectonic, Rancher, SuSE CaaS etc.
●
From Scratch on CoreOS  our pick
7Self Hosted Bare Metal Kubernetes for SMEs
CoreOS
●
Aka Container Linux
●
Very minimal Linux distro optimized
– Uses Gentoo’s build system :)
●
Heavy user of Systemd
●
3 release channels (alpha, beta, stable)
●
Automatic updates built-in
– Using two partition strategy like ChromeOS for fault resilience
●
Redhat’s takeover of CoreOS should not interfere as they announced to
keep it as is
– If you don’t trust them, try flatcar Linux, a “friendly fork”
8Self Hosted Bare Metal Kubernetes for SMEs
Bare Metal Provisioning of CoreOS with Matchbox
●
Using Matchbox provision the rest of the CoreOS fleet
– Toolbelt to install a whole cluster through network boot (using PXE etc.)
– Running one a “bootstrapping machine” to serve DHCP, images and configs
●
All provisioning configs are described in JSON
9Self Hosted Bare Metal Kubernetes for SMEs
Our K8s Environment – Logical View
10Self Hosted Bare Metal Kubernetes for SMEs
Our K8s Environment – Physical View
11Self Hosted Bare Metal Kubernetes for SMEs
Physical Facts
●
Located in DC of a housing provider in Frankfurt
– Latency matters!
●
Redundant 10 GbE Fibre Network
●
4-Node Server á
– 12 Cores
– 64 GB RAM
– 1x 800 GB DC grade SSD
– 2x 4 TB spinner’s
12Self Hosted Bare Metal Kubernetes for SMEs
Networking
●
VLANs and interface bonding on physical level
●
Flannel for K8s/container subnets
●
KubeDNS for service discovery
●
Planned upgrades
– Networking with Project Calico
– Service discovery with CoreDNS
13Self Hosted Bare Metal Kubernetes for SMEs
Support of K8s
●
Documentation available online, but doesn’t cover specific configuration
●
Bare metal installation docs aren’t up-to-date
– CoreOS had a installation guide for bare metal, but from one day to the other it was replaced
by a Tectonic installation guide
●
Support channels
– Slack: too crowded; hard to find what you need; nobody really answers when you ask
question
– IRC: land of bots (mostly); no reaction to questions at all; no history at all
– Mailing list: haven’t tried to write ourselves; at least searchable
– GitHub: here you can find proof that you’re not the only one with your problem; some issues
just change milestones, but don’t get resolved
– StackOverflow: by now the best choice; best used together with documentation
– Various blogs: some good recipes, but a lot of them are outdated due to fast evolution of
K8s
– Conference videos: one of good sources of information, but you need to pay attention to
outdated topics
14Self Hosted Bare Metal Kubernetes for SMEs
Versions, Versions, Versions...
●
Most annoying: K8s (even the latest version) doesn’t support the latest
Docker version and lags behind for months
●
Not all components (like ETCD, flannel etc.) versions are compatible with
each other and with K8s version of your choice
– Docker
– ETCD
– Flannel
●
CHANGELOG.md of K8s is good source of version compatibility with
external dependencies
15Self Hosted Bare Metal Kubernetes for SMEs
Docker Version Support Matrix
●
Currently K8s supports just following Docker versions
●
All supported Docker versions are End-of-Life
●
We’re stuck with older CoreOS Linux releases because they have too
recent Docker versions for K8s
– Watch out for CoreOS auto update!
Docker version 1.10.3 1.11.2 1.12.6 17.03.x 18.05.x
K8s version (latest)
1.6 x x x
1.7 x x x
1.8 x x x x
1.9 x x x
1.10 x x x -
1.11 ? ? ? -
16Self Hosted Bare Metal Kubernetes for SMEs
ETCD Version
●
Pay attention to maximum ETCD version supported by K8s release of your
choice
●
Biggest issue: you cannot downgrade ETCD
17Self Hosted Bare Metal Kubernetes for SMEs
TLS
●
All communication within ETCD and K8s cluster is secured by TLS
●
For all intra-communication you can and should use self generated CA and
certs
– CFSSL is a good tool to generate CA, certs etc.
●
Only external services – like ingresses – have Let’s Encrypt or commercial
certs
18Self Hosted Bare Metal Kubernetes for SMEs
Security and K8s
●
Most important: protect access to the API on master and nodes (via proxy)
– We use a basic IPTables firewall to disabled access from the net
– We use client certificate based authentication
●
RBAC (by default on from K8s v1.8) for resource access control
●
NetworkPolicy resources to control intra-pod and external communication
– Doesn’t work with Flannel, but works with Project Calico
19Self Hosted Bare Metal Kubernetes for SMEs
Installation Hints’n’tips
● Use UTC as your timezone everywhere
– Doing so will help later get in sync when reviewing logs etc.
● By default older CoreOS releases uses older flannel version
– That you can easily upgrade by creating respective systemd unit
20Self Hosted Bare Metal Kubernetes for SMEs
Workload partitioning
●
No-brainer: cordoning (disabling scheduling) on some nodes
●
Simplest, yet most effective in small clusters: node selection using labels
●
Advanced: affinity and anti-affinity that still uses node labels, but in regex
way
●
More advanced: using taints and tolerations that ensures pods aren’t
scheduled onto inappropriate nodes
21Self Hosted Bare Metal Kubernetes for SMEs
CI/CD with Gitlab
●
Running on the K8s cluster
– Deployed via https://github.com/sameersbn/docker-gitlab
– Maybe helm chart in the future (currently in Alpha/Beta)
●
Setting up Docker registry part of it allows to store private Docker images
and use them within K8s clusters
●
Gitlab has K8s integration for CI/CD
– requires some tinkering to get it running on a non-remote cluster
●
For CI/CD to work Gitlab installs the Gitlab-Runner
– Builds/tests your projects or Docker images
– Push them to registry
– Deploy to K8s cluster
22Self Hosted Bare Metal Kubernetes for SMEs
Developer Access to K8s
●
Per developer SSH-tunnel
●
kubectl access through tunnel via developer certificate
23Self Hosted Bare Metal Kubernetes for SMEs
Backup Strategy
●
Contents of master node as well host-dir based persistent volumes are
rsynced to another host on nightly basis
24Self Hosted Bare Metal Kubernetes for SMEs
Monitoring
●
Low-key system tools
– Docker stats
– Linux top
●
Kubernetes Dashboard (relying on data from built-in Heapster)
– No time travel
– No alerting
●
Planned: Prometheus
25Self Hosted Bare Metal Kubernetes for SMEs
Updates
●
CoreOS
– In general everything happens automatically out-of-the-box except you can’t use it by
default due to version conflicts
– Instead use CoreRoller tool to run your own image store
– Updates can be scheduled to off-hours and various nodes
●
K8s
– Quite easy within minor releases: just change version numbers in systemd unit as well K8s
system manifest files and restart systemd unit
– Between major releases, carefully study the CHANGELOG to find what has changed in
kubelet startup options (depreciations, additions) and change systemd unit accordingly
26Self Hosted Bare Metal Kubernetes for SMEs
Hints’n’tips for Running Stuff on K8s
●
kubectl is your friend
●
Use Deployments instead of ReplicaSets
– Remember to check manifests made by others before deploying them
●
There’s no restarting for pods like “docker restart”
●
Rolling-update is a great thing. Scale up, change deployment settings or
container image and K8s will do the rest
●
Don’t use pure Kube-registry
– It has issues while setting it up as well using it within cluster
– Instead use Gitlab with enabled Docker registry
27Self Hosted Bare Metal Kubernetes for SMEs
Outlook
●
Persistent volumes featuring network transparent remote storage – ROOK
– We will migrate all host-dir based PVs to ROOK based PVs
●
Highly available master/ ingress
– Two dedicated master nodes
– HA cluster based pacemaker

Weitere ähnliche Inhalte

Was ist angesagt?

Kubernetes and Oracle - a guiding whitepaper
Kubernetes and Oracle - a guiding whitepaperKubernetes and Oracle - a guiding whitepaper
Kubernetes and Oracle - a guiding whitepaperMichel Schildmeijer
 
OSDC 2018 | Introduction to SaltStack in the Modern Data Center by Mike Place
OSDC 2018 | Introduction to SaltStack in the Modern Data Center by Mike PlaceOSDC 2018 | Introduction to SaltStack in the Modern Data Center by Mike Place
OSDC 2018 | Introduction to SaltStack in the Modern Data Center by Mike PlaceNETWAYS
 
Pro2516 10 things about oracle and k8s.pptx-final
Pro2516   10 things about oracle and k8s.pptx-finalPro2516   10 things about oracle and k8s.pptx-final
Pro2516 10 things about oracle and k8s.pptx-finalMichel Schildmeijer
 
JDO 2019: What you should be aware of before setting up kubernetes on premise...
JDO 2019: What you should be aware of before setting up kubernetes on premise...JDO 2019: What you should be aware of before setting up kubernetes on premise...
JDO 2019: What you should be aware of before setting up kubernetes on premise...PROIDEA
 
LlinuxKit security, Security Scanning and Notary
LlinuxKit security, Security Scanning and NotaryLlinuxKit security, Security Scanning and Notary
LlinuxKit security, Security Scanning and NotaryDocker, Inc.
 
Opensource approach to design and deployment of Microservices based VNF
Opensource approach to design and deployment of Microservices based VNFOpensource approach to design and deployment of Microservices based VNF
Opensource approach to design and deployment of Microservices based VNFMichelle Holley
 
Improving Network Application Performance using Load Aware Libeventdev
Improving Network Application Performance using Load Aware LibeventdevImproving Network Application Performance using Load Aware Libeventdev
Improving Network Application Performance using Load Aware LibeventdevMichelle Holley
 
IstioD - From Microservices to Monolithic
IstioD - From Microservices to MonolithicIstioD - From Microservices to Monolithic
IstioD - From Microservices to MonolithicAll Things Open
 
Openstack Swift Introduction
Openstack Swift IntroductionOpenstack Swift Introduction
Openstack Swift IntroductionPark YounSung
 
Microservices Architectures with Docker Swarm, etcd, Kuryr and Neutron
Microservices Architectures with Docker Swarm, etcd, Kuryr and NeutronMicroservices Architectures with Docker Swarm, etcd, Kuryr and Neutron
Microservices Architectures with Docker Swarm, etcd, Kuryr and NeutronFawad Khaliq
 
Diagnose Your Microservices
Diagnose Your MicroservicesDiagnose Your Microservices
Diagnose Your MicroservicesMarcus Hirt
 
OVN: Scaleable Virtual Networking for Open vSwitch
OVN: Scaleable Virtual Networking for Open vSwitchOVN: Scaleable Virtual Networking for Open vSwitch
OVN: Scaleable Virtual Networking for Open vSwitchmestery
 
OpenDaylight: an open source SDN for your OpenStack cloud
OpenDaylight: an open source SDN for your OpenStack cloudOpenDaylight: an open source SDN for your OpenStack cloud
OpenDaylight: an open source SDN for your OpenStack cloudAnees Shaikh
 
BKK16-205 RDK-B IoT
BKK16-205 RDK-B IoTBKK16-205 RDK-B IoT
BKK16-205 RDK-B IoTLinaro
 
OpenStack Integration with OpenContrail and OpenDaylight
OpenStack Integration with OpenContrail and OpenDaylightOpenStack Integration with OpenContrail and OpenDaylight
OpenStack Integration with OpenContrail and OpenDaylightSyed Moneeb
 
The Real World with OpenShift - Red Hat DevOps & Microservices Conference 2017
The Real World with OpenShift - Red Hat DevOps & Microservices Conference 2017 The Real World with OpenShift - Red Hat DevOps & Microservices Conference 2017
The Real World with OpenShift - Red Hat DevOps & Microservices Conference 2017 Xpand IT
 
Hotplug and Virtio - Tetsuya Mukawa
Hotplug and Virtio - Tetsuya MukawaHotplug and Virtio - Tetsuya Mukawa
Hotplug and Virtio - Tetsuya Mukawaharryvanhaaren
 

Was ist angesagt? (20)

Kubernetes and Oracle - a guiding whitepaper
Kubernetes and Oracle - a guiding whitepaperKubernetes and Oracle - a guiding whitepaper
Kubernetes and Oracle - a guiding whitepaper
 
OSDC 2018 | Introduction to SaltStack in the Modern Data Center by Mike Place
OSDC 2018 | Introduction to SaltStack in the Modern Data Center by Mike PlaceOSDC 2018 | Introduction to SaltStack in the Modern Data Center by Mike Place
OSDC 2018 | Introduction to SaltStack in the Modern Data Center by Mike Place
 
Pro2516 10 things about oracle and k8s.pptx-final
Pro2516   10 things about oracle and k8s.pptx-finalPro2516   10 things about oracle and k8s.pptx-final
Pro2516 10 things about oracle and k8s.pptx-final
 
The Open vSwitch and OVN Projects
The Open vSwitch and OVN ProjectsThe Open vSwitch and OVN Projects
The Open vSwitch and OVN Projects
 
JDO 2019: What you should be aware of before setting up kubernetes on premise...
JDO 2019: What you should be aware of before setting up kubernetes on premise...JDO 2019: What you should be aware of before setting up kubernetes on premise...
JDO 2019: What you should be aware of before setting up kubernetes on premise...
 
LlinuxKit security, Security Scanning and Notary
LlinuxKit security, Security Scanning and NotaryLlinuxKit security, Security Scanning and Notary
LlinuxKit security, Security Scanning and Notary
 
Opensource approach to design and deployment of Microservices based VNF
Opensource approach to design and deployment of Microservices based VNFOpensource approach to design and deployment of Microservices based VNF
Opensource approach to design and deployment of Microservices based VNF
 
Improving Network Application Performance using Load Aware Libeventdev
Improving Network Application Performance using Load Aware LibeventdevImproving Network Application Performance using Load Aware Libeventdev
Improving Network Application Performance using Load Aware Libeventdev
 
IstioD - From Microservices to Monolithic
IstioD - From Microservices to MonolithicIstioD - From Microservices to Monolithic
IstioD - From Microservices to Monolithic
 
Openstack Swift Introduction
Openstack Swift IntroductionOpenstack Swift Introduction
Openstack Swift Introduction
 
Running Legacy Applications with Containers
Running Legacy Applications with ContainersRunning Legacy Applications with Containers
Running Legacy Applications with Containers
 
Microservices Architectures with Docker Swarm, etcd, Kuryr and Neutron
Microservices Architectures with Docker Swarm, etcd, Kuryr and NeutronMicroservices Architectures with Docker Swarm, etcd, Kuryr and Neutron
Microservices Architectures with Docker Swarm, etcd, Kuryr and Neutron
 
Diagnose Your Microservices
Diagnose Your MicroservicesDiagnose Your Microservices
Diagnose Your Microservices
 
OVN: Scaleable Virtual Networking for Open vSwitch
OVN: Scaleable Virtual Networking for Open vSwitchOVN: Scaleable Virtual Networking for Open vSwitch
OVN: Scaleable Virtual Networking for Open vSwitch
 
OpenDaylight: an open source SDN for your OpenStack cloud
OpenDaylight: an open source SDN for your OpenStack cloudOpenDaylight: an open source SDN for your OpenStack cloud
OpenDaylight: an open source SDN for your OpenStack cloud
 
BKK16-205 RDK-B IoT
BKK16-205 RDK-B IoTBKK16-205 RDK-B IoT
BKK16-205 RDK-B IoT
 
OpenStack Integration with OpenContrail and OpenDaylight
OpenStack Integration with OpenContrail and OpenDaylightOpenStack Integration with OpenContrail and OpenDaylight
OpenStack Integration with OpenContrail and OpenDaylight
 
The Real World with OpenShift - Red Hat DevOps & Microservices Conference 2017
The Real World with OpenShift - Red Hat DevOps & Microservices Conference 2017 The Real World with OpenShift - Red Hat DevOps & Microservices Conference 2017
The Real World with OpenShift - Red Hat DevOps & Microservices Conference 2017
 
Hotplug and Virtio - Tetsuya Mukawa
Hotplug and Virtio - Tetsuya MukawaHotplug and Virtio - Tetsuya Mukawa
Hotplug and Virtio - Tetsuya Mukawa
 
IaaS with Chef
IaaS with ChefIaaS with Chef
IaaS with Chef
 

Ähnlich wie OSDC 2018 | Self Hosted Bare Metal Kubernetes for SMEs by Thomas Toppe

DevOps Days Boston 2017: Real-world Kubernetes for DevOps
DevOps Days Boston 2017: Real-world Kubernetes for DevOpsDevOps Days Boston 2017: Real-world Kubernetes for DevOps
DevOps Days Boston 2017: Real-world Kubernetes for DevOpsAmbassador Labs
 
[WSO2Con Asia 2018] Deploying Applications in K8S and Docker
[WSO2Con Asia 2018] Deploying Applications in K8S and Docker[WSO2Con Asia 2018] Deploying Applications in K8S and Docker
[WSO2Con Asia 2018] Deploying Applications in K8S and DockerWSO2
 
A guide of PostgreSQL on Kubernetes
A guide of PostgreSQL on KubernetesA guide of PostgreSQL on Kubernetes
A guide of PostgreSQL on Kubernetest8kobayashi
 
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetesJuraj Hantak
 
Comparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetesComparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetesAdam Hamsik
 
To Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
To Russia with Love: Deploying Kubernetes in Exotic Locations On PremTo Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
To Russia with Love: Deploying Kubernetes in Exotic Locations On PremCloudOps2005
 
[WSO2Con EU 2018] Deploying Applications in K8S and Docker
[WSO2Con EU 2018] Deploying Applications in K8S and Docker[WSO2Con EU 2018] Deploying Applications in K8S and Docker
[WSO2Con EU 2018] Deploying Applications in K8S and DockerWSO2
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetesGabriel Carro
 
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMwareVMUG IT
 
[WSO2Con USA 2018] Deploying Applications in K8S and Docker
[WSO2Con USA 2018] Deploying Applications in K8S and Docker[WSO2Con USA 2018] Deploying Applications in K8S and Docker
[WSO2Con USA 2018] Deploying Applications in K8S and DockerWSO2
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopBob Killen
 
Kata Container - The Security of VM and The Speed of Container | Yuntong Jin
Kata Container - The Security of VM and The Speed of Container | Yuntong Jin	Kata Container - The Security of VM and The Speed of Container | Yuntong Jin
Kata Container - The Security of VM and The Speed of Container | Yuntong Jin Vietnam Open Infrastructure User Group
 
9 ways to consume kubernetes on open stack in 15 mins (k8s meetup)
9 ways to consume kubernetes on open stack in 15 mins (k8s meetup)9 ways to consume kubernetes on open stack in 15 mins (k8s meetup)
9 ways to consume kubernetes on open stack in 15 mins (k8s meetup)Stacy Véronneau
 
IBM Bluemix Nice meetup #5 - 20170504 - Orchestrer Docker avec Kubernetes
IBM Bluemix Nice meetup #5 - 20170504 - Orchestrer Docker avec KubernetesIBM Bluemix Nice meetup #5 - 20170504 - Orchestrer Docker avec Kubernetes
IBM Bluemix Nice meetup #5 - 20170504 - Orchestrer Docker avec KubernetesIBM France Lab
 
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...NETWAYS
 
OpenEBS hangout #4
OpenEBS hangout #4OpenEBS hangout #4
OpenEBS hangout #4OpenEBS
 
Container orchestration and microservices world
Container orchestration and microservices worldContainer orchestration and microservices world
Container orchestration and microservices worldKarol Chrapek
 

Ähnlich wie OSDC 2018 | Self Hosted Bare Metal Kubernetes for SMEs by Thomas Toppe (20)

DevOps Days Boston 2017: Real-world Kubernetes for DevOps
DevOps Days Boston 2017: Real-world Kubernetes for DevOpsDevOps Days Boston 2017: Real-world Kubernetes for DevOps
DevOps Days Boston 2017: Real-world Kubernetes for DevOps
 
[WSO2Con Asia 2018] Deploying Applications in K8S and Docker
[WSO2Con Asia 2018] Deploying Applications in K8S and Docker[WSO2Con Asia 2018] Deploying Applications in K8S and Docker
[WSO2Con Asia 2018] Deploying Applications in K8S and Docker
 
A guide of PostgreSQL on Kubernetes
A guide of PostgreSQL on KubernetesA guide of PostgreSQL on Kubernetes
A guide of PostgreSQL on Kubernetes
 
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
 
Comparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetesComparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetes
 
To Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
To Russia with Love: Deploying Kubernetes in Exotic Locations On PremTo Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
To Russia with Love: Deploying Kubernetes in Exotic Locations On Prem
 
Project Atomic-Nulecule
Project Atomic-NuleculeProject Atomic-Nulecule
Project Atomic-Nulecule
 
[WSO2Con EU 2018] Deploying Applications in K8S and Docker
[WSO2Con EU 2018] Deploying Applications in K8S and Docker[WSO2Con EU 2018] Deploying Applications in K8S and Docker
[WSO2Con EU 2018] Deploying Applications in K8S and Docker
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
 
[WSO2Con USA 2018] Deploying Applications in K8S and Docker
[WSO2Con USA 2018] Deploying Applications in K8S and Docker[WSO2Con USA 2018] Deploying Applications in K8S and Docker
[WSO2Con USA 2018] Deploying Applications in K8S and Docker
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
 
Aks: k8s e azure
Aks:  k8s e azureAks:  k8s e azure
Aks: k8s e azure
 
Kata Container - The Security of VM and The Speed of Container | Yuntong Jin
Kata Container - The Security of VM and The Speed of Container | Yuntong Jin	Kata Container - The Security of VM and The Speed of Container | Yuntong Jin
Kata Container - The Security of VM and The Speed of Container | Yuntong Jin
 
9 ways to consume kubernetes on open stack in 15 mins (k8s meetup)
9 ways to consume kubernetes on open stack in 15 mins (k8s meetup)9 ways to consume kubernetes on open stack in 15 mins (k8s meetup)
9 ways to consume kubernetes on open stack in 15 mins (k8s meetup)
 
IBM Bluemix Nice meetup #5 - 20170504 - Orchestrer Docker avec Kubernetes
IBM Bluemix Nice meetup #5 - 20170504 - Orchestrer Docker avec KubernetesIBM Bluemix Nice meetup #5 - 20170504 - Orchestrer Docker avec Kubernetes
IBM Bluemix Nice meetup #5 - 20170504 - Orchestrer Docker avec Kubernetes
 
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...OSDC 2018 | Three years running containers with Kubernetes in Production by T...
OSDC 2018 | Three years running containers with Kubernetes in Production by T...
 
OpenEBS hangout #4
OpenEBS hangout #4OpenEBS hangout #4
OpenEBS hangout #4
 
Container orchestration and microservices world
Container orchestration and microservices worldContainer orchestration and microservices world
Container orchestration and microservices world
 
AKS: k8s e azure
AKS: k8s e azureAKS: k8s e azure
AKS: k8s e azure
 

Kürzlich hochgeladen

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 

Kürzlich hochgeladen (20)

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 

OSDC 2018 | Self Hosted Bare Metal Kubernetes for SMEs by Thomas Toppe

  • 1. 1Footer Self Hosted Bare Metal Kubernetes for SMEs Thomas Hoppe v1.0
  • 2. 2Self Hosted Bare Metal Kubernetes for SMEs Who We Are ● n-fuse GmbH ● Since 2001 ● ~25 Engineers ● Branches in Stuttgart, Germany and Riga, Latvia ● Accompanying our clients from idea to production ● In hard- and software projects ● Customers ranging from startups to top 10 DAX www.n-fuse.co
  • 3. 3Self Hosted Bare Metal Kubernetes for SMEs Outline of this Talk ● What is Kubernetes and why to use it? ● Installation process and caveats ● Architecture of our environment ● Monitoring, backup ● How we use it, CI/CD ● Outlook ...and a lot of real world experiences sprinkled over it
  • 4. 4Self Hosted Bare Metal Kubernetes for SMEs What is Kubernetes? ● Open source container orchestrator that automates scale out of container operations – Docker in most cases ● Focuses completely on containers and is itself built as a set of containers ● Now maintained by the CNCF which is in-turn a member of the Linux Foundation
  • 5. 5Self Hosted Bare Metal Kubernetes for SMEs Why to Use K8s? ● All the benfits of containers ● Very good fit for µ-services ● Low overhead ● The ecosystem
  • 6. 6Self Hosted Bare Metal Kubernetes for SMEs How to set up K8s? Just some Ways ● Developer desktop – Minikube ● Turnkey Hosted Kubernetes – Google Kubernetes Engine – AWS EKS – Azure Container Kubernetes Service ● Custom – Using IaaS (AWS, Google Computing Engine, Azure) ● Using Tools like Kubespray, kops – On Premise/ Bare Metal ● Using Tectonic, Rancher, SuSE CaaS etc. ● From Scratch on CoreOS  our pick
  • 7. 7Self Hosted Bare Metal Kubernetes for SMEs CoreOS ● Aka Container Linux ● Very minimal Linux distro optimized – Uses Gentoo’s build system :) ● Heavy user of Systemd ● 3 release channels (alpha, beta, stable) ● Automatic updates built-in – Using two partition strategy like ChromeOS for fault resilience ● Redhat’s takeover of CoreOS should not interfere as they announced to keep it as is – If you don’t trust them, try flatcar Linux, a “friendly fork”
  • 8. 8Self Hosted Bare Metal Kubernetes for SMEs Bare Metal Provisioning of CoreOS with Matchbox ● Using Matchbox provision the rest of the CoreOS fleet – Toolbelt to install a whole cluster through network boot (using PXE etc.) – Running one a “bootstrapping machine” to serve DHCP, images and configs ● All provisioning configs are described in JSON
  • 9. 9Self Hosted Bare Metal Kubernetes for SMEs Our K8s Environment – Logical View
  • 10. 10Self Hosted Bare Metal Kubernetes for SMEs Our K8s Environment – Physical View
  • 11. 11Self Hosted Bare Metal Kubernetes for SMEs Physical Facts ● Located in DC of a housing provider in Frankfurt – Latency matters! ● Redundant 10 GbE Fibre Network ● 4-Node Server á – 12 Cores – 64 GB RAM – 1x 800 GB DC grade SSD – 2x 4 TB spinner’s
  • 12. 12Self Hosted Bare Metal Kubernetes for SMEs Networking ● VLANs and interface bonding on physical level ● Flannel for K8s/container subnets ● KubeDNS for service discovery ● Planned upgrades – Networking with Project Calico – Service discovery with CoreDNS
  • 13. 13Self Hosted Bare Metal Kubernetes for SMEs Support of K8s ● Documentation available online, but doesn’t cover specific configuration ● Bare metal installation docs aren’t up-to-date – CoreOS had a installation guide for bare metal, but from one day to the other it was replaced by a Tectonic installation guide ● Support channels – Slack: too crowded; hard to find what you need; nobody really answers when you ask question – IRC: land of bots (mostly); no reaction to questions at all; no history at all – Mailing list: haven’t tried to write ourselves; at least searchable – GitHub: here you can find proof that you’re not the only one with your problem; some issues just change milestones, but don’t get resolved – StackOverflow: by now the best choice; best used together with documentation – Various blogs: some good recipes, but a lot of them are outdated due to fast evolution of K8s – Conference videos: one of good sources of information, but you need to pay attention to outdated topics
  • 14. 14Self Hosted Bare Metal Kubernetes for SMEs Versions, Versions, Versions... ● Most annoying: K8s (even the latest version) doesn’t support the latest Docker version and lags behind for months ● Not all components (like ETCD, flannel etc.) versions are compatible with each other and with K8s version of your choice – Docker – ETCD – Flannel ● CHANGELOG.md of K8s is good source of version compatibility with external dependencies
  • 15. 15Self Hosted Bare Metal Kubernetes for SMEs Docker Version Support Matrix ● Currently K8s supports just following Docker versions ● All supported Docker versions are End-of-Life ● We’re stuck with older CoreOS Linux releases because they have too recent Docker versions for K8s – Watch out for CoreOS auto update! Docker version 1.10.3 1.11.2 1.12.6 17.03.x 18.05.x K8s version (latest) 1.6 x x x 1.7 x x x 1.8 x x x x 1.9 x x x 1.10 x x x - 1.11 ? ? ? -
  • 16. 16Self Hosted Bare Metal Kubernetes for SMEs ETCD Version ● Pay attention to maximum ETCD version supported by K8s release of your choice ● Biggest issue: you cannot downgrade ETCD
  • 17. 17Self Hosted Bare Metal Kubernetes for SMEs TLS ● All communication within ETCD and K8s cluster is secured by TLS ● For all intra-communication you can and should use self generated CA and certs – CFSSL is a good tool to generate CA, certs etc. ● Only external services – like ingresses – have Let’s Encrypt or commercial certs
  • 18. 18Self Hosted Bare Metal Kubernetes for SMEs Security and K8s ● Most important: protect access to the API on master and nodes (via proxy) – We use a basic IPTables firewall to disabled access from the net – We use client certificate based authentication ● RBAC (by default on from K8s v1.8) for resource access control ● NetworkPolicy resources to control intra-pod and external communication – Doesn’t work with Flannel, but works with Project Calico
  • 19. 19Self Hosted Bare Metal Kubernetes for SMEs Installation Hints’n’tips ● Use UTC as your timezone everywhere – Doing so will help later get in sync when reviewing logs etc. ● By default older CoreOS releases uses older flannel version – That you can easily upgrade by creating respective systemd unit
  • 20. 20Self Hosted Bare Metal Kubernetes for SMEs Workload partitioning ● No-brainer: cordoning (disabling scheduling) on some nodes ● Simplest, yet most effective in small clusters: node selection using labels ● Advanced: affinity and anti-affinity that still uses node labels, but in regex way ● More advanced: using taints and tolerations that ensures pods aren’t scheduled onto inappropriate nodes
  • 21. 21Self Hosted Bare Metal Kubernetes for SMEs CI/CD with Gitlab ● Running on the K8s cluster – Deployed via https://github.com/sameersbn/docker-gitlab – Maybe helm chart in the future (currently in Alpha/Beta) ● Setting up Docker registry part of it allows to store private Docker images and use them within K8s clusters ● Gitlab has K8s integration for CI/CD – requires some tinkering to get it running on a non-remote cluster ● For CI/CD to work Gitlab installs the Gitlab-Runner – Builds/tests your projects or Docker images – Push them to registry – Deploy to K8s cluster
  • 22. 22Self Hosted Bare Metal Kubernetes for SMEs Developer Access to K8s ● Per developer SSH-tunnel ● kubectl access through tunnel via developer certificate
  • 23. 23Self Hosted Bare Metal Kubernetes for SMEs Backup Strategy ● Contents of master node as well host-dir based persistent volumes are rsynced to another host on nightly basis
  • 24. 24Self Hosted Bare Metal Kubernetes for SMEs Monitoring ● Low-key system tools – Docker stats – Linux top ● Kubernetes Dashboard (relying on data from built-in Heapster) – No time travel – No alerting ● Planned: Prometheus
  • 25. 25Self Hosted Bare Metal Kubernetes for SMEs Updates ● CoreOS – In general everything happens automatically out-of-the-box except you can’t use it by default due to version conflicts – Instead use CoreRoller tool to run your own image store – Updates can be scheduled to off-hours and various nodes ● K8s – Quite easy within minor releases: just change version numbers in systemd unit as well K8s system manifest files and restart systemd unit – Between major releases, carefully study the CHANGELOG to find what has changed in kubelet startup options (depreciations, additions) and change systemd unit accordingly
  • 26. 26Self Hosted Bare Metal Kubernetes for SMEs Hints’n’tips for Running Stuff on K8s ● kubectl is your friend ● Use Deployments instead of ReplicaSets – Remember to check manifests made by others before deploying them ● There’s no restarting for pods like “docker restart” ● Rolling-update is a great thing. Scale up, change deployment settings or container image and K8s will do the rest ● Don’t use pure Kube-registry – It has issues while setting it up as well using it within cluster – Instead use Gitlab with enabled Docker registry
  • 27. 27Self Hosted Bare Metal Kubernetes for SMEs Outlook ● Persistent volumes featuring network transparent remote storage – ROOK – We will migrate all host-dir based PVs to ROOK based PVs ● Highly available master/ ingress – Two dedicated master nodes – HA cluster based pacemaker