SlideShare a Scribd company logo
Š 2018 SWITCH | 1
Saverio Proto
saverio.proto@switch.ch
Lugano
Kubernetes on Openstack
Š 2018 SWITCH | 2
Infrastructure & Data Services
Our offer
Our customers
Your added value
Š 2018 SWITCH | 3
Your added value
SWITCH made – Swiss made
• Swiss law and data location
• Scalable storage and computing power on
demand with immediate availability in
accordance to the need of – and controlled by –
the institutions
• Flexible usage and charging model,
no up-front investment
• Simple administration; integrated into the academic
network of SWITCH;
security and identity services included
• Support for academic use cases
• Created together with you
Š 2018 SWITCH | 4
Our customers
Higher education
• Cantonal universities
• ETH domain with research institutions
• Universities of applied sciences
• Universities of teacher education
University-related organizations
• Spin-Offs
• Research institutions
• eLearning Center
• University hospitals
Š 2018 SWITCH | 5
Our offer
• SWITCHengines
• Virtual Private Cloud (VPC)
• SCALE-UP (Project)*
* For developing academic services with 9
universities, as part of the „Scientific Information“
projects mandated by swissuniversities.
Š 2018 SWITCH | 6
SWITCHengines
Customer tailored computing and storage performance for
universities, research and teaching –further developed in the
SCALE-UP project mandated by swissuniversities.
Your benefits
• Your data in Switzerland
• Integrated network and security
• Support for academic use cases
• Simple administration and billing
• Created together with you
Customers
• Universities
• Research
institutions
• eLearning Center
• University
hospitals
• Spin-Offs
Services
• SWITCHengines (IaaS)
• Virtual Private Cloud (VPC)
• SCALE-UP (academic project)
Š 2018 SWITCH | 7
Openstack Cloud Engineer at
SWITCH.
He works in NRENs since 2011,
first in Italy and then in
Switzerland.
He has significant experience in
running critical infrastructures
using Open Source software.
He works together with the
Infrastructure & Data team, to
deliver an Openstack based
cloud to the Swiss Universities.
Saverio Proto
Š 2018 SWITCH | 8
Container orchestration.
Open Source system to deploy containerized applications.
• What you should already know:
• Docker, build docker containers
• Run your application in a container
• What Kubernentes will do for me ?
• Manage the lifecycle of containers
• Schedule the containers to the hosts
• Attach storage volumes to the containers
• Setup networking
Kubernetes (K8s): what is it ?
Š 2018 SWITCH | 9
• K8s can interact with the Openstack API
• Use keystone for authentication
• Create volumes
• Create load balancers
• Set routes in Neutron routers
Kubernetes on Openstack
Š 2018 SWITCH | 10
• https://github.com/switch-ch/k8s-on-openstack/
• Forked from https://github.com/infraly/k8s-on-openstack
This ansible playbook will create Openstack instances, and
will install Kubernetes on them.
export KEY=keyname
export IMAGE="Ubuntu Xenial 16.04 (SWITCHengines)"
export NETWORK=k8s
( read REAME for complete variables list)
ansible-playbook site.yaml
Deploy K8s on Openstack
Š 2018 SWITCH | 11
ubuntu@k8s-master:~$ kubectl get nodes
NAME STATUS AGE VERSION
k8s-1 Ready 3m v1.9.4
k8s-2 Ready 3m v1.9.4
k8s-3 Ready 3m v1.9.4
k8s-master Ready 4m v1.9.4
Start !
Š 2018 SWITCH | 12
The playbook returns an admin.conf that looks like this:
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: [..CUT..]
server: https://<ipaddress>:6443
name: kubernetes
contexts:
- context:
cluster: kubernetes
user: kubernetes-admin
name: kubernetes-admin@kubernetes
current-context: kubernetes-admin@kubernetes
kind: Config
preferences: {}
users:
- name: kubernetes-admin
user:
client-certificate-data: [..CUT..]
client-key-data: [..CUT..]
Client config
Š 2018 SWITCH | 13
• kubectl is the command line tool
• ~/.kube/config is the config file
• Supports Openstack Keystone authentication
• kubectl is able to read usual Openstack OS_ env vars
• kubectl config set-credentials 
osuser --auth-provider=openstack
• source ~/openrc
Client config
Š 2018 SWITCH | 14
Create a context to use the Openstack User
kubectl config set-context 
--cluster=kubernetes 
--user=osuser osuser@kubernetes
Lets use the context
kubectl config use-context osuser@kubernetes
Client config
Š 2018 SWITCH | 15
Keystone authentication for k8s
Kubectl
client
Openstack
Keystone
KubeApi
server
WebHook
2. Request
with bearer token
1. Token issue
3. Calling
WebHook for
token validation
4. Token validation
with keystone
Š 2018 SWITCH | 16
kube-apiserver
--authentication-token-webhook-config-file=webhook.kubeconfig.yaml
---
apiVersion: v1
clusters:
- cluster:
insecure-skip-tls-verify: true
server: https://localhost:8443/webhook
name: webhook
contexts:
- context:
cluster: webhook
user: webhook
name: webhook
current-context: webhook
kind: Config
preferences: {}
users:
- name: webhook
Configure the webhook
Š 2018 SWITCH | 17
It is just a container:
https://hub.docker.com/r/zioproto/k8s-keystone-auth/
More recent source code can be found here:
https://github.com/kubernetes/cloud-provider-openstack
make image-k8s-keystone-auth
Start the webhook container
Š 2018 SWITCH | 18
• Keystone tested for Authentication
• Default RBAC for Kubernetes implements Authorization
• Keystone projects are mapped to Kubernetes Groups
Authorization via RBAC
Š 2018 SWITCH | 19
/etc/kubernetes/cloud-config
[Global]
auth-url = https://keystone.cloud.switch.ch:5000/v2.0
username = saverio.proto@switch.ch
password = ******
tenant-name = saverio.proto@switch.ch
region = ZH
[BlockStorage]
trust-device-path = false
bs-version = v2
[Route]
router-id = 3a6cd142-91cd-4a04-9a86-a73455a0155d
[LoadBalancer]
lb-version = v2
floating-network-id = 3cc83f7d-9119-475b-ba17-f3510c7902e8
subnet-id = 5e18c72c-1902-4846-bd84-ec54cf028375
K8s Master interaction with Openstack
Š 2018 SWITCH | 20
/etc/kubernetes/manifests/kube-controller-manager.yaml
spec:
containers:
- command:
- kube-controller-manager
- --cloud-provider=openstack
- --cloud-config=/etc/kubernetes/cloud-config
Interaction with Openstack
Š 2018 SWITCH | 21
I changed my the way of doing Networking after the
Openstack summit in Sydney
Use --network-plugin=kubenet
• https://github.com/zioproto/k8s-on-
openstack/commit/f4506ed202ecc6fc4ff5ac603fd28f3664c
b2871
• https://www.openstack.org/videos/sydney-
2017/kubernetes-on-openstack-the-technical-details
Kubernetes Neutron Networking
Š 2018 SWITCH | 22
Kubernetes Neutron Networking
neutron
router
VM
aka k8s node
VM
aka k8s node
Default gateway is the
neutron router
Has static routes to reach
Pod Networks
Default gateway is the
neutron router
Pod Pod
Pod network assigned
by the k8s master
Pod Pod
Pod network assigned
by the k8s master
Š 2018 SWITCH | 23
• Docker containers run into Openstack instances
• Persistent storage is cinder volumes
• K8s will attach the Cinder Volume to the right Openstack
instance were the docker container is scheduled
volumes:
- name: mysql-persistent-storage
cinder:
volumeID: <uuid>
fsType: ext4
Persistent Storage
Š 2018 SWITCH | 24
• This method is not practical
• we have to manage Cinder volumes on the side
• Export UUID
• Solution
• Define a Storage Class
Persistent storage
Š 2018 SWITCH | 25
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: default
annotations:
storageclass.beta.kubernetes.io/is-
default-class: "true"
provisioner: kubernetes.io/cinder
parameters:
type: fast
availability: nova
Storage Class
Š 2018 SWITCH | 26
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: mysql-pvc
annotations:
volume.beta.kubernetes.io/storage-class: default
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 30Gi
Persistent Storage pvc
Š 2018 SWITCH | 27
volumes:
- name: mysql-persistent-storage
persistentVolumeClaim:
claimName: mysql-pvc
Persistent Storage with pvc
Š 2018 SWITCH | 28
I suggest not to use it, at least in Openstack Newton
• Both DNAT and SNAT are necessary
• you lose the client IP information
• IPv6 support status is unknown to me
• It is a pure L4 loadbalancer, cannot terminate TLS
connections or rewrite HTTP headers
Openstack LBaaSv2 with K8s
Š 2018 SWITCH | 29
Openstack LBaaSv2
neutron
router
VM
aka k8s node
VM
aka k8s node
Default gateway is the
neutron router
Default gateway is the
neutron router
Pod Pod
Pod network assigned
by the k8s master
Pod Pod
Pod network assigned
by the k8s master
neutron
LBaaS
Svc FloatingIP configured here
Openstack project network
Both DNAT and SNAT are
necessary here.
Š 2018 SWITCH | 30
• An API object that manages external access to the
services in a cluster, typically HTTP.
• Ingress can provide load balancing, TLS termination and
name-based virtual hosting.
• https://kubernetes.io/docs/concepts/services-
networking/ingress/
• At least two known implementations
• Nginx based
• HAProxy
Kubernetes NGINX Ingress
Š 2018 SWITCH | 31
Kubernetes NGINX Ingress
VM
aka k8s node
VM
aka k8s node
Pod Pod
Pod network assigned
by the k8s master
Pod Pod
Pod network assigned
by the k8s master
VM k8s
master
Kubernetes-nginx-ingress
Default network namespace
(docker –net=host)
• It is a special privileged Docker container running NGINX
• On the k8s master (s) or dedicated VM
• Has access to external IP addresses and cluster IP addresses
Kubernetes cluster network
Š 2018 SWITCH | 32
How I use the Ingress ?
Š 2018 SWITCH | 33
Slack channel #sig-openstack
• Join via http://slack.k8s.io/
Follow our cloud blog:
• https://cloudblog.switch.ch/
Get in touch with me
• saverio.proto@switch.ch
Getting involved
Š 2018 SWITCH | 34
Thank you ! Questions ?

More Related Content

PDF
Networking For Nested Containers: Magnum, Kuryr, Neutron Integration
Fawad Khaliq
 
PDF
Admission controllers - PSP, OPA, Kyverno and more!
SebastienSEYMARC
 
PDF
Kubernetes Multitenancy - KubeSec Enterprise Security Summit
Sanjeev Rampal
 
PPTX
Microservices: AutoScaling in Hyper-Microservice Architecture | Nguyễn Trung ...
Vietnam Open Infrastructure User Group
 
PDF
Cloud networking deep dive
amylynn11
 
PDF
Project kuryr returns: Docker delivered, Kubernetes Next
Antoni Segura Puimedon
 
PDF
LinuxTag 2013
OpenNebula Project
 
PDF
Containers, OCI, CNCF, Magnum, Kuryr, and You!
Daniel Krook
 
Networking For Nested Containers: Magnum, Kuryr, Neutron Integration
Fawad Khaliq
 
Admission controllers - PSP, OPA, Kyverno and more!
SebastienSEYMARC
 
Kubernetes Multitenancy - KubeSec Enterprise Security Summit
Sanjeev Rampal
 
Microservices: AutoScaling in Hyper-Microservice Architecture | Nguyễn Trung ...
Vietnam Open Infrastructure User Group
 
Cloud networking deep dive
amylynn11
 
Project kuryr returns: Docker delivered, Kubernetes Next
Antoni Segura Puimedon
 
LinuxTag 2013
OpenNebula Project
 
Containers, OCI, CNCF, Magnum, Kuryr, and You!
Daniel Krook
 

What's hot (20)

PDF
Mirantis OpenStack 5.0 Overview
Mirantis
 
PDF
Contrail Virtual Execution Platform
NETWAYS
 
PDF
Microservices for Enterprises - Consistent Network & Security services for Co...
Dhananjay Sampath
 
PDF
Zephyr: Creating a Best-of-Breed, Secure RTOS for IoT
LinuxCon ContainerCon CloudOpen China
 
PDF
Microservices Architectures with Docker Swarm, etcd, Kuryr and Neutron
Fawad Khaliq
 
PDF
Mirantis OpenStack-DC-Meetup 17 Sept 2014
Mirantis
 
PPTX
Moving AWS workloads to OpenStack
Mirantis
 
PDF
Kubernetes for Beginners
DigitalOcean
 
PPTX
Hybrid cloud openstack meetup
dfilppi
 
PDF
Keystone at openstack multi sites
Vietnam Open Infrastructure User Group
 
PPTX
Kuryr-Kubernetes: The perfect match for networking cloud native workloads - I...
Cloud Native Day Tel Aviv
 
PDF
OpenStack and OpenDaylight: An Integrated IaaS for SDN/NFV
Cloud Native Day Tel Aviv
 
PPTX
Kata Container - The Security of VM and The Speed of Container | Yuntong Jin
Vietnam Open Infrastructure User Group
 
PDF
How to build a Kubernetes networking solution from scratch
All Things Open
 
PDF
'Dockerizing' within enterprises
Harish Jayakumar
 
PPTX
OpenStack Discovery and Networking Assurance - Koren Lev - Meetup
Cloud Native Day Tel Aviv
 
PDF
VietOpenStack meetup 7th High Performance VM
Vietnam Open Infrastructure User Group
 
PPTX
Introduction to the Container Network Interface (CNI)
Weaveworks
 
PDF
Flowchain: A case study on building a Blockchain for the IoT
LinuxCon ContainerCon CloudOpen China
 
PPTX
Odl virtualization-20140520
NEC Corporation
 
Mirantis OpenStack 5.0 Overview
Mirantis
 
Contrail Virtual Execution Platform
NETWAYS
 
Microservices for Enterprises - Consistent Network & Security services for Co...
Dhananjay Sampath
 
Zephyr: Creating a Best-of-Breed, Secure RTOS for IoT
LinuxCon ContainerCon CloudOpen China
 
Microservices Architectures with Docker Swarm, etcd, Kuryr and Neutron
Fawad Khaliq
 
Mirantis OpenStack-DC-Meetup 17 Sept 2014
Mirantis
 
Moving AWS workloads to OpenStack
Mirantis
 
Kubernetes for Beginners
DigitalOcean
 
Hybrid cloud openstack meetup
dfilppi
 
Keystone at openstack multi sites
Vietnam Open Infrastructure User Group
 
Kuryr-Kubernetes: The perfect match for networking cloud native workloads - I...
Cloud Native Day Tel Aviv
 
OpenStack and OpenDaylight: An Integrated IaaS for SDN/NFV
Cloud Native Day Tel Aviv
 
Kata Container - The Security of VM and The Speed of Container | Yuntong Jin
Vietnam Open Infrastructure User Group
 
How to build a Kubernetes networking solution from scratch
All Things Open
 
'Dockerizing' within enterprises
Harish Jayakumar
 
OpenStack Discovery and Networking Assurance - Koren Lev - Meetup
Cloud Native Day Tel Aviv
 
VietOpenStack meetup 7th High Performance VM
Vietnam Open Infrastructure User Group
 
Introduction to the Container Network Interface (CNI)
Weaveworks
 
Flowchain: A case study on building a Blockchain for the IoT
LinuxCon ContainerCon CloudOpen China
 
Odl virtualization-20140520
NEC Corporation
 
Ad

Similar to Proto kubernetes onswitc_hengines_tue100418 (20)

PPTX
MongoDB World 2018: Partner Talk - Red Hat: Deploying to Enterprise Kubernetes
MongoDB
 
PPTX
Container world hybridnetworking_rev2
Prem Sankar Gopannan
 
PDF
Cloud Computing with OpenStack
inside-BigData.com
 
PPTX
KuberNETes - meetup
Nathan Ness
 
PDF
Openstack 101
Kamesh Pemmaraju
 
PDF
Kubernetes for Enterprise DevOps
Jim Bugwadia
 
PDF
DevNetCreate - ACI and Kubernetes Integration
Hank Preston
 
PPTX
Fiware cloud developers week brussels
Fernando Lopez Aguilar
 
PPTX
Microservices & Serverless Architecture Principles Applied - Cisco Live Orlan...
Cisco DevNet
 
PPTX
Platform as a Service with Kubernetes and Mesos
Miguel Zuniga
 
PPTX
Oscon 2017: Build your own container-based system with the Moby project
Patrick Chanezon
 
PDF
DevOps monitoring: Best Practices using OpenShift combined with Icinga & Big ...
Icinga
 
PDF
Contrail integrated with Kubernetes and Openstack
Daisuke Nakajima
 
PDF
OSS Japan 2019 service mesh bridging Kubernetes and legacy
Steve Wong
 
PPTX
Secure Your Containers: What Network Admins Should Know When Moving Into Prod...
Cynthia Thomas
 
PPTX
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
VMUG IT
 
PPTX
OpenStack As A Strategy For Future Growth at Cisco
Lew Tucker
 
PDF
Apache CloudStack 101 - Introduction, What’s New and What’s Coming
ShapeBlue
 
PPTX
Kubernetes meetup bangalore december 2017 - v02
Kumar Gaurav
 
PPTX
Openstack meetup-pune-aug22-overview
rajdeep
 
MongoDB World 2018: Partner Talk - Red Hat: Deploying to Enterprise Kubernetes
MongoDB
 
Container world hybridnetworking_rev2
Prem Sankar Gopannan
 
Cloud Computing with OpenStack
inside-BigData.com
 
KuberNETes - meetup
Nathan Ness
 
Openstack 101
Kamesh Pemmaraju
 
Kubernetes for Enterprise DevOps
Jim Bugwadia
 
DevNetCreate - ACI and Kubernetes Integration
Hank Preston
 
Fiware cloud developers week brussels
Fernando Lopez Aguilar
 
Microservices & Serverless Architecture Principles Applied - Cisco Live Orlan...
Cisco DevNet
 
Platform as a Service with Kubernetes and Mesos
Miguel Zuniga
 
Oscon 2017: Build your own container-based system with the Moby project
Patrick Chanezon
 
DevOps monitoring: Best Practices using OpenShift combined with Icinga & Big ...
Icinga
 
Contrail integrated with Kubernetes and Openstack
Daisuke Nakajima
 
OSS Japan 2019 service mesh bridging Kubernetes and legacy
Steve Wong
 
Secure Your Containers: What Network Admins Should Know When Moving Into Prod...
Cynthia Thomas
 
01 - VMUGIT - Lecce 2018 - Fabio Rapposelli, VMware
VMUG IT
 
OpenStack As A Strategy For Future Growth at Cisco
Lew Tucker
 
Apache CloudStack 101 - Introduction, What’s New and What’s Coming
ShapeBlue
 
Kubernetes meetup bangalore december 2017 - v02
Kumar Gaurav
 
Openstack meetup-pune-aug22-overview
rajdeep
 
Ad

More from inside-BigData.com (20)

PDF
Major Market Shifts in IT
inside-BigData.com
 
PDF
Preparing to program Aurora at Exascale - Early experiences and future direct...
inside-BigData.com
 
PPTX
Transforming Private 5G Networks
inside-BigData.com
 
PDF
The Incorporation of Machine Learning into Scientific Simulations at Lawrence...
inside-BigData.com
 
PDF
How to Achieve High-Performance, Scalable and Distributed DNN Training on Mod...
inside-BigData.com
 
PDF
Evolving Cyberinfrastructure, Democratizing Data, and Scaling AI to Catalyze ...
inside-BigData.com
 
PDF
HPC Impact: EDA Telemetry Neural Networks
inside-BigData.com
 
PDF
Biohybrid Robotic Jellyfish for Future Applications in Ocean Monitoring
inside-BigData.com
 
PDF
Machine Learning for Weather Forecasts
inside-BigData.com
 
PPTX
HPC AI Advisory Council Update
inside-BigData.com
 
PDF
Fugaku Supercomputer joins fight against COVID-19
inside-BigData.com
 
PDF
Energy Efficient Computing using Dynamic Tuning
inside-BigData.com
 
PDF
HPC at Scale Enabled by DDN A3i and NVIDIA SuperPOD
inside-BigData.com
 
PDF
State of ARM-based HPC
inside-BigData.com
 
PDF
Versal Premium ACAP for Network and Cloud Acceleration
inside-BigData.com
 
PDF
Zettar: Moving Massive Amounts of Data across Any Distance Efficiently
inside-BigData.com
 
PDF
Scaling TCO in a Post Moore's Era
inside-BigData.com
 
PDF
CUDA-Python and RAPIDS for blazing fast scientific computing
inside-BigData.com
 
PDF
Introducing HPC with a Raspberry Pi Cluster
inside-BigData.com
 
PDF
Overview of HPC Interconnects
inside-BigData.com
 
Major Market Shifts in IT
inside-BigData.com
 
Preparing to program Aurora at Exascale - Early experiences and future direct...
inside-BigData.com
 
Transforming Private 5G Networks
inside-BigData.com
 
The Incorporation of Machine Learning into Scientific Simulations at Lawrence...
inside-BigData.com
 
How to Achieve High-Performance, Scalable and Distributed DNN Training on Mod...
inside-BigData.com
 
Evolving Cyberinfrastructure, Democratizing Data, and Scaling AI to Catalyze ...
inside-BigData.com
 
HPC Impact: EDA Telemetry Neural Networks
inside-BigData.com
 
Biohybrid Robotic Jellyfish for Future Applications in Ocean Monitoring
inside-BigData.com
 
Machine Learning for Weather Forecasts
inside-BigData.com
 
HPC AI Advisory Council Update
inside-BigData.com
 
Fugaku Supercomputer joins fight against COVID-19
inside-BigData.com
 
Energy Efficient Computing using Dynamic Tuning
inside-BigData.com
 
HPC at Scale Enabled by DDN A3i and NVIDIA SuperPOD
inside-BigData.com
 
State of ARM-based HPC
inside-BigData.com
 
Versal Premium ACAP for Network and Cloud Acceleration
inside-BigData.com
 
Zettar: Moving Massive Amounts of Data across Any Distance Efficiently
inside-BigData.com
 
Scaling TCO in a Post Moore's Era
inside-BigData.com
 
CUDA-Python and RAPIDS for blazing fast scientific computing
inside-BigData.com
 
Introducing HPC with a Raspberry Pi Cluster
inside-BigData.com
 
Overview of HPC Interconnects
inside-BigData.com
 

Recently uploaded (20)

PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
Software Development Methodologies in 2025
KodekX
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Software Development Methodologies in 2025
KodekX
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
The Future of Artificial Intelligence (AI)
Mukul
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 

Proto kubernetes onswitc_hengines_tue100418

  • 1. Š 2018 SWITCH | 1 Saverio Proto [email protected] Lugano Kubernetes on Openstack
  • 2. Š 2018 SWITCH | 2 Infrastructure & Data Services Our offer Our customers Your added value
  • 3. Š 2018 SWITCH | 3 Your added value SWITCH made – Swiss made • Swiss law and data location • Scalable storage and computing power on demand with immediate availability in accordance to the need of – and controlled by – the institutions • Flexible usage and charging model, no up-front investment • Simple administration; integrated into the academic network of SWITCH; security and identity services included • Support for academic use cases • Created together with you
  • 4. Š 2018 SWITCH | 4 Our customers Higher education • Cantonal universities • ETH domain with research institutions • Universities of applied sciences • Universities of teacher education University-related organizations • Spin-Offs • Research institutions • eLearning Center • University hospitals
  • 5. Š 2018 SWITCH | 5 Our offer • SWITCHengines • Virtual Private Cloud (VPC) • SCALE-UP (Project)* * For developing academic services with 9 universities, as part of the „Scientific Information“ projects mandated by swissuniversities.
  • 6. Š 2018 SWITCH | 6 SWITCHengines Customer tailored computing and storage performance for universities, research and teaching –further developed in the SCALE-UP project mandated by swissuniversities. Your benefits • Your data in Switzerland • Integrated network and security • Support for academic use cases • Simple administration and billing • Created together with you Customers • Universities • Research institutions • eLearning Center • University hospitals • Spin-Offs Services • SWITCHengines (IaaS) • Virtual Private Cloud (VPC) • SCALE-UP (academic project)
  • 7. Š 2018 SWITCH | 7 Openstack Cloud Engineer at SWITCH. He works in NRENs since 2011, first in Italy and then in Switzerland. He has significant experience in running critical infrastructures using Open Source software. He works together with the Infrastructure & Data team, to deliver an Openstack based cloud to the Swiss Universities. Saverio Proto
  • 8. Š 2018 SWITCH | 8 Container orchestration. Open Source system to deploy containerized applications. • What you should already know: • Docker, build docker containers • Run your application in a container • What Kubernentes will do for me ? • Manage the lifecycle of containers • Schedule the containers to the hosts • Attach storage volumes to the containers • Setup networking Kubernetes (K8s): what is it ?
  • 9. Š 2018 SWITCH | 9 • K8s can interact with the Openstack API • Use keystone for authentication • Create volumes • Create load balancers • Set routes in Neutron routers Kubernetes on Openstack
  • 10. Š 2018 SWITCH | 10 • https://github.com/switch-ch/k8s-on-openstack/ • Forked from https://github.com/infraly/k8s-on-openstack This ansible playbook will create Openstack instances, and will install Kubernetes on them. export KEY=keyname export IMAGE="Ubuntu Xenial 16.04 (SWITCHengines)" export NETWORK=k8s ( read REAME for complete variables list) ansible-playbook site.yaml Deploy K8s on Openstack
  • 11. Š 2018 SWITCH | 11 ubuntu@k8s-master:~$ kubectl get nodes NAME STATUS AGE VERSION k8s-1 Ready 3m v1.9.4 k8s-2 Ready 3m v1.9.4 k8s-3 Ready 3m v1.9.4 k8s-master Ready 4m v1.9.4 Start !
  • 12. Š 2018 SWITCH | 12 The playbook returns an admin.conf that looks like this: apiVersion: v1 clusters: - cluster: certificate-authority-data: [..CUT..] server: https://<ipaddress>:6443 name: kubernetes contexts: - context: cluster: kubernetes user: kubernetes-admin name: kubernetes-admin@kubernetes current-context: kubernetes-admin@kubernetes kind: Config preferences: {} users: - name: kubernetes-admin user: client-certificate-data: [..CUT..] client-key-data: [..CUT..] Client config
  • 13. Š 2018 SWITCH | 13 • kubectl is the command line tool • ~/.kube/config is the config file • Supports Openstack Keystone authentication • kubectl is able to read usual Openstack OS_ env vars • kubectl config set-credentials osuser --auth-provider=openstack • source ~/openrc Client config
  • 14. Š 2018 SWITCH | 14 Create a context to use the Openstack User kubectl config set-context --cluster=kubernetes --user=osuser osuser@kubernetes Lets use the context kubectl config use-context osuser@kubernetes Client config
  • 15. Š 2018 SWITCH | 15 Keystone authentication for k8s Kubectl client Openstack Keystone KubeApi server WebHook 2. Request with bearer token 1. Token issue 3. Calling WebHook for token validation 4. Token validation with keystone
  • 16. Š 2018 SWITCH | 16 kube-apiserver --authentication-token-webhook-config-file=webhook.kubeconfig.yaml --- apiVersion: v1 clusters: - cluster: insecure-skip-tls-verify: true server: https://localhost:8443/webhook name: webhook contexts: - context: cluster: webhook user: webhook name: webhook current-context: webhook kind: Config preferences: {} users: - name: webhook Configure the webhook
  • 17. Š 2018 SWITCH | 17 It is just a container: https://hub.docker.com/r/zioproto/k8s-keystone-auth/ More recent source code can be found here: https://github.com/kubernetes/cloud-provider-openstack make image-k8s-keystone-auth Start the webhook container
  • 18. Š 2018 SWITCH | 18 • Keystone tested for Authentication • Default RBAC for Kubernetes implements Authorization • Keystone projects are mapped to Kubernetes Groups Authorization via RBAC
  • 19. Š 2018 SWITCH | 19 /etc/kubernetes/cloud-config [Global] auth-url = https://keystone.cloud.switch.ch:5000/v2.0 username = [email protected] password = ****** tenant-name = [email protected] region = ZH [BlockStorage] trust-device-path = false bs-version = v2 [Route] router-id = 3a6cd142-91cd-4a04-9a86-a73455a0155d [LoadBalancer] lb-version = v2 floating-network-id = 3cc83f7d-9119-475b-ba17-f3510c7902e8 subnet-id = 5e18c72c-1902-4846-bd84-ec54cf028375 K8s Master interaction with Openstack
  • 20. Š 2018 SWITCH | 20 /etc/kubernetes/manifests/kube-controller-manager.yaml spec: containers: - command: - kube-controller-manager - --cloud-provider=openstack - --cloud-config=/etc/kubernetes/cloud-config Interaction with Openstack
  • 21. Š 2018 SWITCH | 21 I changed my the way of doing Networking after the Openstack summit in Sydney Use --network-plugin=kubenet • https://github.com/zioproto/k8s-on- openstack/commit/f4506ed202ecc6fc4ff5ac603fd28f3664c b2871 • https://www.openstack.org/videos/sydney- 2017/kubernetes-on-openstack-the-technical-details Kubernetes Neutron Networking
  • 22. Š 2018 SWITCH | 22 Kubernetes Neutron Networking neutron router VM aka k8s node VM aka k8s node Default gateway is the neutron router Has static routes to reach Pod Networks Default gateway is the neutron router Pod Pod Pod network assigned by the k8s master Pod Pod Pod network assigned by the k8s master
  • 23. Š 2018 SWITCH | 23 • Docker containers run into Openstack instances • Persistent storage is cinder volumes • K8s will attach the Cinder Volume to the right Openstack instance were the docker container is scheduled volumes: - name: mysql-persistent-storage cinder: volumeID: <uuid> fsType: ext4 Persistent Storage
  • 24. Š 2018 SWITCH | 24 • This method is not practical • we have to manage Cinder volumes on the side • Export UUID • Solution • Define a Storage Class Persistent storage
  • 25. Š 2018 SWITCH | 25 kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: name: default annotations: storageclass.beta.kubernetes.io/is- default-class: "true" provisioner: kubernetes.io/cinder parameters: type: fast availability: nova Storage Class
  • 26. Š 2018 SWITCH | 26 kind: PersistentVolumeClaim apiVersion: v1 metadata: name: mysql-pvc annotations: volume.beta.kubernetes.io/storage-class: default spec: accessModes: - ReadWriteOnce resources: requests: storage: 30Gi Persistent Storage pvc
  • 27. Š 2018 SWITCH | 27 volumes: - name: mysql-persistent-storage persistentVolumeClaim: claimName: mysql-pvc Persistent Storage with pvc
  • 28. Š 2018 SWITCH | 28 I suggest not to use it, at least in Openstack Newton • Both DNAT and SNAT are necessary • you lose the client IP information • IPv6 support status is unknown to me • It is a pure L4 loadbalancer, cannot terminate TLS connections or rewrite HTTP headers Openstack LBaaSv2 with K8s
  • 29. Š 2018 SWITCH | 29 Openstack LBaaSv2 neutron router VM aka k8s node VM aka k8s node Default gateway is the neutron router Default gateway is the neutron router Pod Pod Pod network assigned by the k8s master Pod Pod Pod network assigned by the k8s master neutron LBaaS Svc FloatingIP configured here Openstack project network Both DNAT and SNAT are necessary here.
  • 30. Š 2018 SWITCH | 30 • An API object that manages external access to the services in a cluster, typically HTTP. • Ingress can provide load balancing, TLS termination and name-based virtual hosting. • https://kubernetes.io/docs/concepts/services- networking/ingress/ • At least two known implementations • Nginx based • HAProxy Kubernetes NGINX Ingress
  • 31. Š 2018 SWITCH | 31 Kubernetes NGINX Ingress VM aka k8s node VM aka k8s node Pod Pod Pod network assigned by the k8s master Pod Pod Pod network assigned by the k8s master VM k8s master Kubernetes-nginx-ingress Default network namespace (docker –net=host) • It is a special privileged Docker container running NGINX • On the k8s master (s) or dedicated VM • Has access to external IP addresses and cluster IP addresses Kubernetes cluster network
  • 32. Š 2018 SWITCH | 32 How I use the Ingress ?
  • 33. Š 2018 SWITCH | 33 Slack channel #sig-openstack • Join via http://slack.k8s.io/ Follow our cloud blog: • https://cloudblog.switch.ch/ Get in touch with me • [email protected] Getting involved
  • 34. Š 2018 SWITCH | 34 Thank you ! Questions ?