SlideShare a Scribd company logo
1 of 71
Download to read offline
Kubernetes on
Bare-metal
(the fun and sad parts)
Charlie Drage
Red Hat
November 26th, 2018
Lightning-ish talk
I work on the Developer Tools team at Red Hat
I deal with *a lot* of Kubernetes
I maintain Kompose (Docker Compose to Kubernetes
tool)
I’m frugal and I don’t like using paid Kubernetes services
I work on OpenShift tools (project called Odo)
(short) Introduction
Why bare-metal?
You get to use your spare computers!
Development cluster
Home Monitoring
You get to learn about Kubernetes!
It’s free!
(well, not totally if you pay for your electricity)
You can pick and choose whatever OS
and environment you want!
Who’s using bare-metal clusters?
Ever visit Chick-Fil-A?
Seriously: https://medium.com/@cfatechblog/bare-metal-k8s-clustering-at-chick-fil-a-scale-7b0607bd3541
You’re visiting a Kubernetes datacenter!
At every restaurant! (2,200 restaurants, 6,600 devices!)
Who else
https://www.youtube.com/watch?v=7rqvRwfZHF4
Why Wikipedia created a Kubernetes infrastructure
(summary)
- Kubernetes is so good that it only takes 4 people to manage the entire
infrastructure
- Super versatile
- Containers! Containers! Containers!
- Single-node failure management
Okay, you’ve convinced me, let’s create a cluster
Wait! Let’s look at some cloud offerings first
It’s *so* easy to setup a cluster
(if it’s paid for…)
- Using Kops or KubeSpray
kops create cluster 
--node-count=2 
--node-size=t2.medium 
--zones=us-east-1a 
--name=${KOPS_CLUSTER_NAME}
- Using Google Kubernetes Engine
gcloud container clusters create
- Using any other paid services
(DigitalOcean, IBM Cloud, Oracle, etc…)
The above will happen if you provide Kubernetes as a
Service
Everything is taken care of with the Clouuudddddd
They take of this for you:
● Deployment
● Volumes
● LoadBalancing
● Ingress
● Logging and monitoring
● Automatic Cluster Scaling
● Node Auto-Repair
You pay them so they’ll take care
of the above for you.
These gifs will make sense later
Let’s use all these awesome features!
Setting up bare metal
Easy since 2017!
- Before kubeadm it was a pain in the butt. Now it’s painless!
- Want to know how it used to be? Setup using Kubernetes the Hard Way
(https://github.com/kelseyhightower/kubernetes-the-hard-way)
- Networking sucked before CNI (Container Network Interface) now we can
choose between Flannel, Calico, Canal, etc. without having to worry about
networking
Instructions
from https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/#before-you-begin
Debian, Ubuntu, CentOS, Fedora, HypriotOS (Raspberry Pi)
sudo apt-get install kubeadm
or
sudo yum install kubeadm
kubeadm init
master
kubeadm init --pod-network-cidr=10.244.0.0/16
kubeadm join
node(s)
kubeadm join --token TOKEN 192.168.1.100:6443 --discovery-token-ca-cert-hash HASH
kubectl apply -f
https://raw.githubusercontent.com/coreos/flannel/bc79dd1505b0c8681ece4de4c0d86c5cd2643275/Documentation/kube-flannel.yml
setup the networking
Done!
Extreme laziness
- Using Ansible!
- https://github.com/kairen/kubeadm-ansible
- As long as you have either CentOS, Fedora, Ubuntu or
Debian it will do it all for you
kubeadm-ansible
$ vim hosts.ini
[master]
192.16.35.12
[node]
192.16.35.[10:11]
[kube-cluster:children]
master
node
kubeadm-ansible
$ ansible-playbook site.yaml
...
==> master1: TASK [addon : Create Kubernetes dashboard deployment] **************************
==> master1: changed: [192.16.35.12 -> 192.16.35.12]
==> master1:
==> master1: PLAY RECAP *********************************************************************
==> master1: 192.16.35.10 : ok=18 changed=14 unreachable=0 failed=0
==> master1: 192.16.35.11 : ok=18 changed=14 unreachable=0 failed=0
==> master1: 192.16.35.12 : ok=34 changed=29 unreachable=0 failed=0
kubeadm-ansible
$ scp k8s@k8s-master:/etc/kubernetes/admin.conf .
$ export KUBECONFIG=~/admin.conf
$ kubectl get node
NAME STATUS AGE VERSION
master1 Ready 22m v1.6.3
node1 Ready 20m v1.6.3
node2 Ready 20m v1.6.3
The state of bare-metal support within Kubernetes
So why aren’t there many people using bare-metal k8s?
GKE, AWS, DigitalOcean, etc.
Bare metal users
I’ll explain why
Remember these?
● Deployment
● Volumes
● LoadBalancing
● Ingress
● Logging and monitoring
● Automatic Cluster Scaling
● Node Auto-Repair
You’ve got to set it up yourself
● Deployment
● Volumes
● LoadBalancing
● Ingress
● Logging and monitoring
● Automatic Cluster Scaling
● Node Auto-Repair
Deployment:
Helm to the rescue!
Which is an AWESOME tool
Helm: Install
$ kubectl --namespace kube-system create serviceaccount tiller
$ kubectl create clusterrolebinding tiller --clusterrole cluster-admin
--serviceaccount=kube-system:tiller
$ helm init --service-account tiller --upgrade
Helm: Usage
# Deploying Wordpress
$ helm install --name wordpress stable/wordpress
Volumes on Bare Metal
- Volumes provide dynamic storage for containers
- SO MANY OPTIONS TO CHOOSE FROM! (26 options)
- For a home cluster, you’d go for either nfs or hostPath (mounting directly onto the cluster)
- But even after setup… why can’t I dynamically create volumes? Well, only certain ones are
setup for that. Most being Cloud services.
- We’ve got Dynamic NFS Volumes https://github.com/kubernetes-incubator/external-storage
Volumes: Install
# On an NFS host
$ docker run 
-d 
--restart=always 
--net=host 
--name nfs 
--privileged 
-v /mnt/storage/k8s:/nfsshare 
-e SHARED_DIRECTORY=/nfsshare 
cdrage/nfs-server-alpine
# Install nfs support on each node
$ sudo apt-get install nfs-common -y
# Finally, we setup the volumes!
$ helm install stable/nfs-client-provisioner -n nfs-client --set nfs.server=192.168.1.91 --set nfs.path=/
--set storageClass.defaultClass=true
Volumes: Usage
$ kubectl get pvc
NAME STATUS VOLUME CAPACITY ACCESSMODES STORAGECLASS AGE
data-loopy-hydra-mariadb-0 Bound pvc-ad2d3724-edce-11e8-895e-52540046b08b 8Gi RWO nfs-client 7d
data-wordpress-mariadb-0 Bound pvc-81aeb087-edd1-11e8-895e-52540046b08b 8Gi RWO nfs-client 7d
wordpress-wordpress Bound pvc-81a56a8e-edd1-11e8-895e-52540046b08b 10Gi RWO nfs-client 7d
~
$ kubectl get pv
NAME CAPACITY ACCESSMODES RECLAIMPOLICY STATUS CLAIM STORAGECLASS REASON AGE
pvc-81a56a8e-edd1-11e8-895e-52540046b08b 10Gi RWO Delete Bound default/wordpress-wordpress nfs-client 7d
pvc-81aeb087-edd1-11e8-895e-52540046b08b 8Gi RWO Delete Bound default/data-wordpress-mariadb-0 nfs-client 7d
pvc-ad2d3724-edce-11e8-895e-52540046b08b 8Gi RWO Delete Bound default/data-loopy-hydra-mariadb-0 nfs-client 7d
LoadBalancing on Bare Metal
- LoadBalancing assigns an IP Address (ideally a public one) to a service
- If not, you’re forced to use an Ingress, NodePort or ClusterIP (internal IP) instead.
- Really only one option, and that’s MetalLB (https://github.com/google/metallb)
- Uses local IPs (or optionally BGP routers) to distribute IP Addresses
- Seems complicated, but it’s super easy to setup
LoadBalancing: Install
$ helm install --name metallb stable/metallb
# Create a ConfigMap
kind: ConfigMap
metadata:
namespace: default
name: metallb-config
data:
config: |
address-pools:
- name: default
protocol: layer2
addresses:
- 192.168.1.96-100
LoadBalancing: Usage
$ kubectl get svc
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes 10.96.0.1 <none> 443/TCP 22d
wordpress-mariadb 10.103.71.121 <none> 3306/TCP 7d
wordpress-wordpress 10.99.189.46 192.168.1.98 80:30295/TCP,443:31509/TCP 7d
Ingress on Bare Metal
- Ingress exposes https and http traffic routes
- Kubernetes acts as a master port 80/443 HTTP server and routes traffic
- Most popular implementation is kubernetes/nginx-ingress
Ingress: Install
$ helm install stable/nginx-ingress --namespace nginx-ingress --set
controller.hostNetwork=true,controller.kind=DaemonSet
# Create an Ingress
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
name: test-ingress
namespace: default
spec:
rules:
- host: test.charliedrage.com
http:
paths:
- path: /foobar
backend:
serviceName: myhttpservice
servicePort: 8080
Ingress: Usage
▶ kubectl get ingress
NAME HOSTS ADDRESS PORTS AGE
test-ingress test.charliedrage.com 80, 443 6d
Monitoring and Alerts on Bare Metal
- Using Prometheus for data
collection
- Grafana to create all those pretty
graphs
Monitoring and Alerts: Install
$ helm install --name prometheus stable/prometheus
$ helm install --name grafana stable/grafana
Monitoring and Alerts: Usage
$ export POD_NAME=$(kubectl get pods --namespace default -l "app=grafana" -o
jsonpath="{.items[0].metadata.name}")
$ kubectl --namespace default port-forward $POD_NAME 3000
$ kubectl get secret --namespace default grafana -o jsonpath="{.data.admin-password}" |
base64 --decode ; echo
Two more!
● Deployment
● Volumes
● LoadBalancing
● Ingress
● Logging and monitoring
● Automatic Cluster Scaling
● Node Auto-Repair
Automatic Cluster Scaling on Bare Metal
- Haha
- There’s
https://github.com/kubernetes/autoscaler
with support for only cloud providers.
- Please update issue #1060 for me when you
push a PR, it’s been inactive since July, thanks!
Node Auto Repair on Bare Metal
- Haha x2
- Nope! But there’s support for it!
- I swear, there is actually support for this
DollarShaveClub.com
These are actually from one of their commercials
I’m serious, this is the only support
Why in the world is it like this?
The truth:
Developers are lazy. It’s easier to let
someone else take care of it.
It’s still a viable solution! Just with caveats and some setup
And most importantly, you’ll learn!
We’re getting there! (slowly)
● We’ve got: kubeadm, kubespray, kops with bare metal support to make it easier for us
● Kubernetes has been modularizing / splitting off parts of the ecosystem
● We’ve got Kubernetes SIGs (Special Interest Groups) adding new projects all the time
● Maintainers added support for bare-metal! For example, kops added bare-metal support when
I requested it, but it was then subsequently dropped in favour for kubeadm..
● Ansible is (sometimes) a decent solution for setting up baremetal
● Components are slowly coming out of beta / alpha (nfs AutoProvisioner, MetalLB)
Go try it out! Don’t be lazy!
Follow me on Twitter / Github
@cdrage
charliedrage.com/notes/kubernetes
Thanks for listening
Q&A?

More Related Content

What's hot

Orchestrating Redis & K8s Operators
Orchestrating Redis & K8s OperatorsOrchestrating Redis & K8s Operators
Orchestrating Redis & K8s OperatorsDoiT International
 
Kubernetes and Istio
Kubernetes and IstioKubernetes and Istio
Kubernetes and IstioKetan Gote
 
How to Integrate Kubernetes in OpenStack
 How to Integrate Kubernetes in OpenStack  How to Integrate Kubernetes in OpenStack
How to Integrate Kubernetes in OpenStack Meng-Ze Lee
 
Performance Benchmarking of Clouds Evaluating OpenStack
Performance Benchmarking of Clouds                Evaluating OpenStackPerformance Benchmarking of Clouds                Evaluating OpenStack
Performance Benchmarking of Clouds Evaluating OpenStackPradeep Kumar
 
Kubernetes Requests and Limits
Kubernetes Requests and LimitsKubernetes Requests and Limits
Kubernetes Requests and LimitsAhmed AbouZaid
 
Effective Building your Platform with Kubernetes == Keep it Simple
Effective Building your Platform with Kubernetes == Keep it Simple Effective Building your Platform with Kubernetes == Keep it Simple
Effective Building your Platform with Kubernetes == Keep it Simple Wojciech Barczyński
 
Google Cloud Networking Deep Dive
Google Cloud Networking Deep DiveGoogle Cloud Networking Deep Dive
Google Cloud Networking Deep DiveMichelle Holley
 
Dayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on CloudDayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on CloudJung-Hong Kim
 
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Edureka!
 
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architectureOpenStack Korea Community
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceBen Hall
 
Commit to excellence - Java in containers
Commit to excellence - Java in containersCommit to excellence - Java in containers
Commit to excellence - Java in containersRed Hat Developers
 
Deploy an Elastic, Resilient, Load-Balanced Cluster in 5 Minutes with Senlin
Deploy an Elastic, Resilient, Load-Balanced Cluster in 5 Minutes with SenlinDeploy an Elastic, Resilient, Load-Balanced Cluster in 5 Minutes with Senlin
Deploy an Elastic, Resilient, Load-Balanced Cluster in 5 Minutes with SenlinQiming Teng
 
Kubernetes Monitoring & Best Practices
Kubernetes Monitoring & Best PracticesKubernetes Monitoring & Best Practices
Kubernetes Monitoring & Best PracticesAjeet Singh Raina
 
Divide and conquer: resource segregation in the OpenStack cloud
Divide and conquer: resource segregation in the OpenStack cloudDivide and conquer: resource segregation in the OpenStack cloud
Divide and conquer: resource segregation in the OpenStack cloudStephen Gordon
 
Comparison of control plane deployment architectures in the scope of hypercon...
Comparison of control plane deployment architectures in the scope of hypercon...Comparison of control plane deployment architectures in the scope of hypercon...
Comparison of control plane deployment architectures in the scope of hypercon...Miroslav Halas
 
Autoscaling Kubernetes
Autoscaling KubernetesAutoscaling Kubernetes
Autoscaling Kubernetescraigbox
 
Containerizing GPU Applications with Docker for Scaling to the Cloud
Containerizing GPU Applications with Docker for Scaling to the CloudContainerizing GPU Applications with Docker for Scaling to the Cloud
Containerizing GPU Applications with Docker for Scaling to the CloudSubbu Rama
 
Kubernetes Architecture - beyond a black box - Part 2
Kubernetes Architecture - beyond a black box - Part 2Kubernetes Architecture - beyond a black box - Part 2
Kubernetes Architecture - beyond a black box - Part 2Hao H. Zhang
 

What's hot (20)

Orchestrating Redis & K8s Operators
Orchestrating Redis & K8s OperatorsOrchestrating Redis & K8s Operators
Orchestrating Redis & K8s Operators
 
Kubernetes and Istio
Kubernetes and IstioKubernetes and Istio
Kubernetes and Istio
 
How to Integrate Kubernetes in OpenStack
 How to Integrate Kubernetes in OpenStack  How to Integrate Kubernetes in OpenStack
How to Integrate Kubernetes in OpenStack
 
Performance Benchmarking of Clouds Evaluating OpenStack
Performance Benchmarking of Clouds                Evaluating OpenStackPerformance Benchmarking of Clouds                Evaluating OpenStack
Performance Benchmarking of Clouds Evaluating OpenStack
 
Kubernetes Requests and Limits
Kubernetes Requests and LimitsKubernetes Requests and Limits
Kubernetes Requests and Limits
 
Effective Building your Platform with Kubernetes == Keep it Simple
Effective Building your Platform with Kubernetes == Keep it Simple Effective Building your Platform with Kubernetes == Keep it Simple
Effective Building your Platform with Kubernetes == Keep it Simple
 
Google Cloud Networking Deep Dive
Google Cloud Networking Deep DiveGoogle Cloud Networking Deep Dive
Google Cloud Networking Deep Dive
 
Dayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on CloudDayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on Cloud
 
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
 
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
 
OpenStack Cinder
OpenStack CinderOpenStack Cinder
OpenStack Cinder
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
 
Commit to excellence - Java in containers
Commit to excellence - Java in containersCommit to excellence - Java in containers
Commit to excellence - Java in containers
 
Deploy an Elastic, Resilient, Load-Balanced Cluster in 5 Minutes with Senlin
Deploy an Elastic, Resilient, Load-Balanced Cluster in 5 Minutes with SenlinDeploy an Elastic, Resilient, Load-Balanced Cluster in 5 Minutes with Senlin
Deploy an Elastic, Resilient, Load-Balanced Cluster in 5 Minutes with Senlin
 
Kubernetes Monitoring & Best Practices
Kubernetes Monitoring & Best PracticesKubernetes Monitoring & Best Practices
Kubernetes Monitoring & Best Practices
 
Divide and conquer: resource segregation in the OpenStack cloud
Divide and conquer: resource segregation in the OpenStack cloudDivide and conquer: resource segregation in the OpenStack cloud
Divide and conquer: resource segregation in the OpenStack cloud
 
Comparison of control plane deployment architectures in the scope of hypercon...
Comparison of control plane deployment architectures in the scope of hypercon...Comparison of control plane deployment architectures in the scope of hypercon...
Comparison of control plane deployment architectures in the scope of hypercon...
 
Autoscaling Kubernetes
Autoscaling KubernetesAutoscaling Kubernetes
Autoscaling Kubernetes
 
Containerizing GPU Applications with Docker for Scaling to the Cloud
Containerizing GPU Applications with Docker for Scaling to the CloudContainerizing GPU Applications with Docker for Scaling to the Cloud
Containerizing GPU Applications with Docker for Scaling to the Cloud
 
Kubernetes Architecture - beyond a black box - Part 2
Kubernetes Architecture - beyond a black box - Part 2Kubernetes Architecture - beyond a black box - Part 2
Kubernetes Architecture - beyond a black box - Part 2
 

Similar to Kubernetes on Bare Metal at the Kitchener-Waterloo Kubernetes and Cloud Native Meetup

Bdc from bare metal to k8s
Bdc   from bare metal to k8sBdc   from bare metal to k8s
Bdc from bare metal to k8sChris Adkin
 
JUDCon 2010 Boston : BoxGrinder
JUDCon 2010 Boston : BoxGrinderJUDCon 2010 Boston : BoxGrinder
JUDCon 2010 Boston : BoxGrindermarekgoldmann
 
Puppet and Apache CloudStack
Puppet and Apache CloudStackPuppet and Apache CloudStack
Puppet and Apache CloudStackPuppet
 
Infrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStackInfrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStackke4qqq
 
Puppet and CloudStack
Puppet and CloudStackPuppet and CloudStack
Puppet and CloudStackke4qqq
 
Puppetpreso
PuppetpresoPuppetpreso
Puppetpresoke4qqq
 
An Ensemble Core with Docker - Solving a Real Pain in the PaaS
An Ensemble Core with Docker - Solving a Real Pain in the PaaS An Ensemble Core with Docker - Solving a Real Pain in the PaaS
An Ensemble Core with Docker - Solving a Real Pain in the PaaS Erik Osterman
 
Deploying Kubernetes on GCP with Kubespray
Deploying Kubernetes on GCP with KubesprayDeploying Kubernetes on GCP with Kubespray
Deploying Kubernetes on GCP with KubesprayAltoros
 
Postgres the hardway
Postgres the hardwayPostgres the hardway
Postgres the hardwayDave Pitts
 
How Honestbee Does CI/CD on Kubernetes - Vincent DeSmet
How Honestbee Does CI/CD on Kubernetes - Vincent DeSmetHow Honestbee Does CI/CD on Kubernetes - Vincent DeSmet
How Honestbee Does CI/CD on Kubernetes - Vincent DeSmetDevOpsDaysJKT
 
OpenNebula, the foreman and CentOS play nice, too
OpenNebula, the foreman and CentOS play nice, tooOpenNebula, the foreman and CentOS play nice, too
OpenNebula, the foreman and CentOS play nice, tooinovex GmbH
 
Networking in Kubernetes
Networking in KubernetesNetworking in Kubernetes
Networking in KubernetesMinhan Xia
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes NetworkingCJ Cullen
 
CoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love SystemdCoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love SystemdRichard Lister
 
Virtualization and Cloud Computing with Elastic Server On Demand
Virtualization and Cloud Computing with Elastic Server On DemandVirtualization and Cloud Computing with Elastic Server On Demand
Virtualization and Cloud Computing with Elastic Server On DemandYan Pritzker
 
Kubered -Recipes for C2 Operations on Kubernetes
Kubered -Recipes for C2 Operations on KubernetesKubered -Recipes for C2 Operations on Kubernetes
Kubered -Recipes for C2 Operations on KubernetesJeffrey Holden
 
Tectonic Summit 2016: Kubernetes 1.5 and Beyond
Tectonic Summit 2016: Kubernetes 1.5 and BeyondTectonic Summit 2016: Kubernetes 1.5 and Beyond
Tectonic Summit 2016: Kubernetes 1.5 and BeyondCoreOS
 

Similar to Kubernetes on Bare Metal at the Kitchener-Waterloo Kubernetes and Cloud Native Meetup (20)

Bdc from bare metal to k8s
Bdc   from bare metal to k8sBdc   from bare metal to k8s
Bdc from bare metal to k8s
 
JUDCon 2010 Boston : BoxGrinder
JUDCon 2010 Boston : BoxGrinderJUDCon 2010 Boston : BoxGrinder
JUDCon 2010 Boston : BoxGrinder
 
Puppet and Apache CloudStack
Puppet and Apache CloudStackPuppet and Apache CloudStack
Puppet and Apache CloudStack
 
Infrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStackInfrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStack
 
Puppet and CloudStack
Puppet and CloudStackPuppet and CloudStack
Puppet and CloudStack
 
Puppetpreso
PuppetpresoPuppetpreso
Puppetpreso
 
An Ensemble Core with Docker - Solving a Real Pain in the PaaS
An Ensemble Core with Docker - Solving a Real Pain in the PaaS An Ensemble Core with Docker - Solving a Real Pain in the PaaS
An Ensemble Core with Docker - Solving a Real Pain in the PaaS
 
kubernetes practice
kubernetes practicekubernetes practice
kubernetes practice
 
Deploying Kubernetes on GCP with Kubespray
Deploying Kubernetes on GCP with KubesprayDeploying Kubernetes on GCP with Kubespray
Deploying Kubernetes on GCP with Kubespray
 
Postgres the hardway
Postgres the hardwayPostgres the hardway
Postgres the hardway
 
How Honestbee Does CI/CD on Kubernetes - Vincent DeSmet
How Honestbee Does CI/CD on Kubernetes - Vincent DeSmetHow Honestbee Does CI/CD on Kubernetes - Vincent DeSmet
How Honestbee Does CI/CD on Kubernetes - Vincent DeSmet
 
OpenNebula, the foreman and CentOS play nice, too
OpenNebula, the foreman and CentOS play nice, tooOpenNebula, the foreman and CentOS play nice, too
OpenNebula, the foreman and CentOS play nice, too
 
Networking in Kubernetes
Networking in KubernetesNetworking in Kubernetes
Networking in Kubernetes
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes Networking
 
CoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love SystemdCoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love Systemd
 
Kamailio on Docker
Kamailio on DockerKamailio on Docker
Kamailio on Docker
 
Virtualization and Cloud Computing with Elastic Server On Demand
Virtualization and Cloud Computing with Elastic Server On DemandVirtualization and Cloud Computing with Elastic Server On Demand
Virtualization and Cloud Computing with Elastic Server On Demand
 
Kubered -Recipes for C2 Operations on Kubernetes
Kubered -Recipes for C2 Operations on KubernetesKubered -Recipes for C2 Operations on Kubernetes
Kubered -Recipes for C2 Operations on Kubernetes
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
Tectonic Summit 2016: Kubernetes 1.5 and Beyond
Tectonic Summit 2016: Kubernetes 1.5 and BeyondTectonic Summit 2016: Kubernetes 1.5 and Beyond
Tectonic Summit 2016: Kubernetes 1.5 and Beyond
 

More from CloudOps2005

Defense in Depth: Securing your new Kubernetes cluster from the challenges th...
Defense in Depth: Securing your new Kubernetes cluster from the challenges th...Defense in Depth: Securing your new Kubernetes cluster from the challenges th...
Defense in Depth: Securing your new Kubernetes cluster from the challenges th...CloudOps2005
 
Human No, Machine Yes: Welcome to the CDF with Incremental Confidence
Human No, Machine Yes: Welcome to the CDF with Incremental ConfidenceHuman No, Machine Yes: Welcome to the CDF with Incremental Confidence
Human No, Machine Yes: Welcome to the CDF with Incremental ConfidenceCloudOps2005
 
The Salmon Algorithm Spawning with Kubernetes
The Salmon Algorithm Spawning with KubernetesThe Salmon Algorithm Spawning with Kubernetes
The Salmon Algorithm Spawning with KubernetesCloudOps2005
 
Own your Destiny in the Cloud - Ian Rae - Cloud Native Day Montreal 2019
Own your Destiny in the Cloud - Ian Rae - Cloud Native Day Montreal 2019Own your Destiny in the Cloud - Ian Rae - Cloud Native Day Montreal 2019
Own your Destiny in the Cloud - Ian Rae - Cloud Native Day Montreal 2019CloudOps2005
 
Plateformes et infrastructure infonuagique natif de ville de Montréall
Plateformes et infrastructure infonuagique natif de ville de MontréallPlateformes et infrastructure infonuagique natif de ville de Montréall
Plateformes et infrastructure infonuagique natif de ville de MontréallCloudOps2005
 
Using Rook to Manage Kubernetes Storage with Ceph
Using Rook to Manage Kubernetes Storage with CephUsing Rook to Manage Kubernetes Storage with Ceph
Using Rook to Manage Kubernetes Storage with CephCloudOps2005
 
Kafka on Kubernetes
Kafka on KubernetesKafka on Kubernetes
Kafka on KubernetesCloudOps2005
 
Kubernetes: Crossing the Chasm
Kubernetes: Crossing the ChasmKubernetes: Crossing the Chasm
Kubernetes: Crossing the ChasmCloudOps2005
 
Distributed Logging with Kubernetes
Distributed Logging with KubernetesDistributed Logging with Kubernetes
Distributed Logging with KubernetesCloudOps2005
 
Kubernetes Security with Calico and Open Policy Agent
Kubernetes Security with Calico and Open Policy AgentKubernetes Security with Calico and Open Policy Agent
Kubernetes Security with Calico and Open Policy AgentCloudOps2005
 
Advanced Deployment Strategies with Kubernetes and Istio
Advanced Deployment Strategies with Kubernetes and IstioAdvanced Deployment Strategies with Kubernetes and Istio
Advanced Deployment Strategies with Kubernetes and IstioCloudOps2005
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCDCloudOps2005
 
Kubernetes Services are sooo Yesterday!
Kubernetes Services are sooo Yesterday!Kubernetes Services are sooo Yesterday!
Kubernetes Services are sooo Yesterday!CloudOps2005
 
Amazon EKS: the good, the bad, and the ugly
Amazon EKS: the good, the bad, and the uglyAmazon EKS: the good, the bad, and the ugly
Amazon EKS: the good, the bad, and the uglyCloudOps2005
 
Kubernetes, Terraform, Vault, and Consul
Kubernetes, Terraform, Vault, and ConsulKubernetes, Terraform, Vault, and Consul
Kubernetes, Terraform, Vault, and ConsulCloudOps2005
 
SIG Multicluster and the Path to Federation
SIG Multicluster and the Path to FederationSIG Multicluster and the Path to Federation
SIG Multicluster and the Path to FederationCloudOps2005
 
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
 
Operator SDK for K8s using Go
Operator SDK for K8s using GoOperator SDK for K8s using Go
Operator SDK for K8s using GoCloudOps2005
 
How to Handle your Kubernetes Upgrades
How to Handle your Kubernetes UpgradesHow to Handle your Kubernetes Upgrades
How to Handle your Kubernetes UpgradesCloudOps2005
 
Kubernetes and Cloud Native Meetup - March, 2019
Kubernetes and Cloud Native Meetup - March, 2019Kubernetes and Cloud Native Meetup - March, 2019
Kubernetes and Cloud Native Meetup - March, 2019CloudOps2005
 

More from CloudOps2005 (20)

Defense in Depth: Securing your new Kubernetes cluster from the challenges th...
Defense in Depth: Securing your new Kubernetes cluster from the challenges th...Defense in Depth: Securing your new Kubernetes cluster from the challenges th...
Defense in Depth: Securing your new Kubernetes cluster from the challenges th...
 
Human No, Machine Yes: Welcome to the CDF with Incremental Confidence
Human No, Machine Yes: Welcome to the CDF with Incremental ConfidenceHuman No, Machine Yes: Welcome to the CDF with Incremental Confidence
Human No, Machine Yes: Welcome to the CDF with Incremental Confidence
 
The Salmon Algorithm Spawning with Kubernetes
The Salmon Algorithm Spawning with KubernetesThe Salmon Algorithm Spawning with Kubernetes
The Salmon Algorithm Spawning with Kubernetes
 
Own your Destiny in the Cloud - Ian Rae - Cloud Native Day Montreal 2019
Own your Destiny in the Cloud - Ian Rae - Cloud Native Day Montreal 2019Own your Destiny in the Cloud - Ian Rae - Cloud Native Day Montreal 2019
Own your Destiny in the Cloud - Ian Rae - Cloud Native Day Montreal 2019
 
Plateformes et infrastructure infonuagique natif de ville de Montréall
Plateformes et infrastructure infonuagique natif de ville de MontréallPlateformes et infrastructure infonuagique natif de ville de Montréall
Plateformes et infrastructure infonuagique natif de ville de Montréall
 
Using Rook to Manage Kubernetes Storage with Ceph
Using Rook to Manage Kubernetes Storage with CephUsing Rook to Manage Kubernetes Storage with Ceph
Using Rook to Manage Kubernetes Storage with Ceph
 
Kafka on Kubernetes
Kafka on KubernetesKafka on Kubernetes
Kafka on Kubernetes
 
Kubernetes: Crossing the Chasm
Kubernetes: Crossing the ChasmKubernetes: Crossing the Chasm
Kubernetes: Crossing the Chasm
 
Distributed Logging with Kubernetes
Distributed Logging with KubernetesDistributed Logging with Kubernetes
Distributed Logging with Kubernetes
 
Kubernetes Security with Calico and Open Policy Agent
Kubernetes Security with Calico and Open Policy AgentKubernetes Security with Calico and Open Policy Agent
Kubernetes Security with Calico and Open Policy Agent
 
Advanced Deployment Strategies with Kubernetes and Istio
Advanced Deployment Strategies with Kubernetes and IstioAdvanced Deployment Strategies with Kubernetes and Istio
Advanced Deployment Strategies with Kubernetes and Istio
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCD
 
Kubernetes Services are sooo Yesterday!
Kubernetes Services are sooo Yesterday!Kubernetes Services are sooo Yesterday!
Kubernetes Services are sooo Yesterday!
 
Amazon EKS: the good, the bad, and the ugly
Amazon EKS: the good, the bad, and the uglyAmazon EKS: the good, the bad, and the ugly
Amazon EKS: the good, the bad, and the ugly
 
Kubernetes, Terraform, Vault, and Consul
Kubernetes, Terraform, Vault, and ConsulKubernetes, Terraform, Vault, and Consul
Kubernetes, Terraform, Vault, and Consul
 
SIG Multicluster and the Path to Federation
SIG Multicluster and the Path to FederationSIG Multicluster and the Path to Federation
SIG Multicluster and the Path to Federation
 
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
 
Operator SDK for K8s using Go
Operator SDK for K8s using GoOperator SDK for K8s using Go
Operator SDK for K8s using Go
 
How to Handle your Kubernetes Upgrades
How to Handle your Kubernetes UpgradesHow to Handle your Kubernetes Upgrades
How to Handle your Kubernetes Upgrades
 
Kubernetes and Cloud Native Meetup - March, 2019
Kubernetes and Cloud Native Meetup - March, 2019Kubernetes and Cloud Native Meetup - March, 2019
Kubernetes and Cloud Native Meetup - March, 2019
 

Recently uploaded

Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 

Recently uploaded (20)

Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 

Kubernetes on Bare Metal at the Kitchener-Waterloo Kubernetes and Cloud Native Meetup

  • 1. Kubernetes on Bare-metal (the fun and sad parts) Charlie Drage Red Hat November 26th, 2018 Lightning-ish talk
  • 2. I work on the Developer Tools team at Red Hat I deal with *a lot* of Kubernetes I maintain Kompose (Docker Compose to Kubernetes tool) I’m frugal and I don’t like using paid Kubernetes services I work on OpenShift tools (project called Odo) (short) Introduction
  • 4. You get to use your spare computers! Development cluster Home Monitoring
  • 5. You get to learn about Kubernetes!
  • 6. It’s free! (well, not totally if you pay for your electricity)
  • 7. You can pick and choose whatever OS and environment you want!
  • 10.
  • 12. At every restaurant! (2,200 restaurants, 6,600 devices!)
  • 15. Why Wikipedia created a Kubernetes infrastructure (summary) - Kubernetes is so good that it only takes 4 people to manage the entire infrastructure - Super versatile - Containers! Containers! Containers! - Single-node failure management
  • 16. Okay, you’ve convinced me, let’s create a cluster
  • 17. Wait! Let’s look at some cloud offerings first
  • 18. It’s *so* easy to setup a cluster (if it’s paid for…) - Using Kops or KubeSpray kops create cluster --node-count=2 --node-size=t2.medium --zones=us-east-1a --name=${KOPS_CLUSTER_NAME} - Using Google Kubernetes Engine gcloud container clusters create - Using any other paid services (DigitalOcean, IBM Cloud, Oracle, etc…) The above will happen if you provide Kubernetes as a Service
  • 19. Everything is taken care of with the Clouuudddddd They take of this for you: ● Deployment ● Volumes ● LoadBalancing ● Ingress ● Logging and monitoring ● Automatic Cluster Scaling ● Node Auto-Repair You pay them so they’ll take care of the above for you.
  • 20. These gifs will make sense later
  • 21. Let’s use all these awesome features!
  • 23. Easy since 2017! - Before kubeadm it was a pain in the butt. Now it’s painless! - Want to know how it used to be? Setup using Kubernetes the Hard Way (https://github.com/kelseyhightower/kubernetes-the-hard-way) - Networking sucked before CNI (Container Network Interface) now we can choose between Flannel, Calico, Canal, etc. without having to worry about networking
  • 25. Debian, Ubuntu, CentOS, Fedora, HypriotOS (Raspberry Pi)
  • 26. sudo apt-get install kubeadm or sudo yum install kubeadm
  • 30. kubeadm join --token TOKEN 192.168.1.100:6443 --discovery-token-ca-cert-hash HASH
  • 32. Done!
  • 33. Extreme laziness - Using Ansible! - https://github.com/kairen/kubeadm-ansible - As long as you have either CentOS, Fedora, Ubuntu or Debian it will do it all for you
  • 35. kubeadm-ansible $ ansible-playbook site.yaml ... ==> master1: TASK [addon : Create Kubernetes dashboard deployment] ************************** ==> master1: changed: [192.16.35.12 -> 192.16.35.12] ==> master1: ==> master1: PLAY RECAP ********************************************************************* ==> master1: 192.16.35.10 : ok=18 changed=14 unreachable=0 failed=0 ==> master1: 192.16.35.11 : ok=18 changed=14 unreachable=0 failed=0 ==> master1: 192.16.35.12 : ok=34 changed=29 unreachable=0 failed=0
  • 36. kubeadm-ansible $ scp k8s@k8s-master:/etc/kubernetes/admin.conf . $ export KUBECONFIG=~/admin.conf $ kubectl get node NAME STATUS AGE VERSION master1 Ready 22m v1.6.3 node1 Ready 20m v1.6.3 node2 Ready 20m v1.6.3
  • 37. The state of bare-metal support within Kubernetes
  • 38. So why aren’t there many people using bare-metal k8s?
  • 39. GKE, AWS, DigitalOcean, etc. Bare metal users
  • 41. Remember these? ● Deployment ● Volumes ● LoadBalancing ● Ingress ● Logging and monitoring ● Automatic Cluster Scaling ● Node Auto-Repair
  • 42. You’ve got to set it up yourself ● Deployment ● Volumes ● LoadBalancing ● Ingress ● Logging and monitoring ● Automatic Cluster Scaling ● Node Auto-Repair
  • 43. Deployment: Helm to the rescue! Which is an AWESOME tool
  • 44. Helm: Install $ kubectl --namespace kube-system create serviceaccount tiller $ kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller $ helm init --service-account tiller --upgrade
  • 45. Helm: Usage # Deploying Wordpress $ helm install --name wordpress stable/wordpress
  • 46. Volumes on Bare Metal - Volumes provide dynamic storage for containers - SO MANY OPTIONS TO CHOOSE FROM! (26 options) - For a home cluster, you’d go for either nfs or hostPath (mounting directly onto the cluster) - But even after setup… why can’t I dynamically create volumes? Well, only certain ones are setup for that. Most being Cloud services. - We’ve got Dynamic NFS Volumes https://github.com/kubernetes-incubator/external-storage
  • 47. Volumes: Install # On an NFS host $ docker run -d --restart=always --net=host --name nfs --privileged -v /mnt/storage/k8s:/nfsshare -e SHARED_DIRECTORY=/nfsshare cdrage/nfs-server-alpine # Install nfs support on each node $ sudo apt-get install nfs-common -y # Finally, we setup the volumes! $ helm install stable/nfs-client-provisioner -n nfs-client --set nfs.server=192.168.1.91 --set nfs.path=/ --set storageClass.defaultClass=true
  • 48. Volumes: Usage $ kubectl get pvc NAME STATUS VOLUME CAPACITY ACCESSMODES STORAGECLASS AGE data-loopy-hydra-mariadb-0 Bound pvc-ad2d3724-edce-11e8-895e-52540046b08b 8Gi RWO nfs-client 7d data-wordpress-mariadb-0 Bound pvc-81aeb087-edd1-11e8-895e-52540046b08b 8Gi RWO nfs-client 7d wordpress-wordpress Bound pvc-81a56a8e-edd1-11e8-895e-52540046b08b 10Gi RWO nfs-client 7d ~ $ kubectl get pv NAME CAPACITY ACCESSMODES RECLAIMPOLICY STATUS CLAIM STORAGECLASS REASON AGE pvc-81a56a8e-edd1-11e8-895e-52540046b08b 10Gi RWO Delete Bound default/wordpress-wordpress nfs-client 7d pvc-81aeb087-edd1-11e8-895e-52540046b08b 8Gi RWO Delete Bound default/data-wordpress-mariadb-0 nfs-client 7d pvc-ad2d3724-edce-11e8-895e-52540046b08b 8Gi RWO Delete Bound default/data-loopy-hydra-mariadb-0 nfs-client 7d
  • 49. LoadBalancing on Bare Metal - LoadBalancing assigns an IP Address (ideally a public one) to a service - If not, you’re forced to use an Ingress, NodePort or ClusterIP (internal IP) instead. - Really only one option, and that’s MetalLB (https://github.com/google/metallb) - Uses local IPs (or optionally BGP routers) to distribute IP Addresses - Seems complicated, but it’s super easy to setup
  • 50. LoadBalancing: Install $ helm install --name metallb stable/metallb # Create a ConfigMap kind: ConfigMap metadata: namespace: default name: metallb-config data: config: | address-pools: - name: default protocol: layer2 addresses: - 192.168.1.96-100
  • 51. LoadBalancing: Usage $ kubectl get svc NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes 10.96.0.1 <none> 443/TCP 22d wordpress-mariadb 10.103.71.121 <none> 3306/TCP 7d wordpress-wordpress 10.99.189.46 192.168.1.98 80:30295/TCP,443:31509/TCP 7d
  • 52. Ingress on Bare Metal - Ingress exposes https and http traffic routes - Kubernetes acts as a master port 80/443 HTTP server and routes traffic - Most popular implementation is kubernetes/nginx-ingress
  • 53. Ingress: Install $ helm install stable/nginx-ingress --namespace nginx-ingress --set controller.hostNetwork=true,controller.kind=DaemonSet # Create an Ingress apiVersion: extensions/v1beta1 kind: Ingress metadata: annotations: kubernetes.io/ingress.class: nginx name: test-ingress namespace: default spec: rules: - host: test.charliedrage.com http: paths: - path: /foobar backend: serviceName: myhttpservice servicePort: 8080
  • 54. Ingress: Usage ▶ kubectl get ingress NAME HOSTS ADDRESS PORTS AGE test-ingress test.charliedrage.com 80, 443 6d
  • 55. Monitoring and Alerts on Bare Metal - Using Prometheus for data collection - Grafana to create all those pretty graphs
  • 56. Monitoring and Alerts: Install $ helm install --name prometheus stable/prometheus $ helm install --name grafana stable/grafana
  • 57. Monitoring and Alerts: Usage $ export POD_NAME=$(kubectl get pods --namespace default -l "app=grafana" -o jsonpath="{.items[0].metadata.name}") $ kubectl --namespace default port-forward $POD_NAME 3000 $ kubectl get secret --namespace default grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
  • 58. Two more! ● Deployment ● Volumes ● LoadBalancing ● Ingress ● Logging and monitoring ● Automatic Cluster Scaling ● Node Auto-Repair
  • 59. Automatic Cluster Scaling on Bare Metal - Haha - There’s https://github.com/kubernetes/autoscaler with support for only cloud providers. - Please update issue #1060 for me when you push a PR, it’s been inactive since July, thanks!
  • 60. Node Auto Repair on Bare Metal - Haha x2 - Nope! But there’s support for it! - I swear, there is actually support for this
  • 61. DollarShaveClub.com These are actually from one of their commercials
  • 62. I’m serious, this is the only support
  • 63. Why in the world is it like this?
  • 64. The truth: Developers are lazy. It’s easier to let someone else take care of it.
  • 65. It’s still a viable solution! Just with caveats and some setup
  • 66. And most importantly, you’ll learn!
  • 67. We’re getting there! (slowly) ● We’ve got: kubeadm, kubespray, kops with bare metal support to make it easier for us ● Kubernetes has been modularizing / splitting off parts of the ecosystem ● We’ve got Kubernetes SIGs (Special Interest Groups) adding new projects all the time ● Maintainers added support for bare-metal! For example, kops added bare-metal support when I requested it, but it was then subsequently dropped in favour for kubeadm.. ● Ansible is (sometimes) a decent solution for setting up baremetal ● Components are slowly coming out of beta / alpha (nfs AutoProvisioner, MetalLB)
  • 68. Go try it out! Don’t be lazy!
  • 69. Follow me on Twitter / Github @cdrage charliedrage.com/notes/kubernetes
  • 71. Q&A?