SlideShare a Scribd company logo
1 of 38
Download to read offline
Slide 1 of 38
Reference: Meetup Kubernetes
a passion for technology
Date:
Reference:
Author(s):
Distribution:
Attendees marked with *
Template date: 06-07-2017
Template PN: 6001-1246-5511
Building a Kubernetes cluster
for a large organisation 101
Meetup Kubernetes
Ed Schouten
Prodrive Tech Talk
2018-06-27
Slide 2 of 38
Reference: Meetup Kubernetes
Prodrive Technologies
- Who are we and what do we do?
- What do I do?
Kubernetes
- What is it?
Kubernetes at Prodrive Technologies
- Why do we want it?
- What kind of automation have we designed to go along?
- What are we going to work on next?
Outline of today’s talk
Slide 3 of 38
Reference: Meetup Kubernetes
Prodrive Technologies
Slide 4 of 38
Reference: Meetup Kubernetes
Ready-to-use products
Technology solutions
Manufacturing services
Design of electronics, software
and mechanics
Manufacturing
Added value services
We focus on autonomous growth and a solid preservation of our
company culture
Slide 5 of 38
Reference: Meetup Kubernetes
Company presence
Prodrive Technologies Netherlands (HQ)
- R&D
- Manufacturing
- Service
- Sales
China
- Sales
- Supply Chain
- Manufacturing
- Service
USA
- Sales
- Manufacturing (Q4-2018)
Germany
- Sales
Israel
- Sales
Expansion of NL facility (Q2-2018)
USA manufacturing (2019)
Suzhou facility
Slide 6 of 38
Reference: Meetup Kubernetes
‣ Area- and line-scan cameras
‣ Integrated optics, scintillators, FOPs
‣ VIS, NIR, DUV, LWIR, E-beam
‣ Particle Measurement Systems
‣ PMP (Prodrive Motion Platform)
‣ High Performance Actuators
‣ Various motion drives
‣ Mechatronic systems
‣ Variable frequency drives
‣ Wireless Energy (20kW)
‣ Power Converters (100kW+)
‣ Intelligent Power Distribution
‣ Motion control platforms
‣ Image processing platforms
‣ Industrial PC/server
‣ Home automation systems
‣ Gateways and cloud solutions
‣ Smart Thermostats
‣ Professional Audio/Video Distribution
‣ Controllers and I/O
‣ Displays, touch screens, HMI
‣ Automated production
equipment
‣ AGV’s
Slide 8 of 38
Reference: Meetup Kubernetes
Part of the IT Services team.
• Responsible for Linux-based infrastructure (source control, builds).
• Involved in shaping the future direction of our internal IT.
Part of the High-End Computing (HEC) program.
• Software architecture for our industrial computing products.
What do I do at Prodrive Technologies?
Slide 9 of 38
Reference: Meetup Kubernetes
Kubernetes
Slide 10 of 38
Reference: Meetup Kubernetes
Kubernetes is…
• A cluster management/orchestration tool.
• Based on the design of Borg (Google).
• Capable of scheduling Docker containers.
• Open Source: Apache 2.0 licensed.
Kubernetes
Slide 11 of 38
Reference: Meetup Kubernetes
Kubernetes in a nutshell
Slide 12 of 38
Reference: Meetup Kubernetes
kubectl: command line tool for managing clusters.
• Talks to the API server over a documented REST API.
• Exposes the cluster as objects of different classes.
• Each object has a JSON/YAML configuration/state.
• Easy to learn syntax: kubectl ${verb} ${class} ${instance}
• ‘Bottom half’ is also available as a Golang library.
Managing a Kubernetes cluster: kubectl
Slide 13 of 38
Reference: Meetup Kubernetes
• Node: Linux (or Windows) server that is part of the cluster.
• Pod: Unit of work that is scheduled by Kubernetes on a node.
• Consists of one or more containers. (‘Sidecars’)
• Deployment: Template for starting a fixed number of identical pods.
• Good for starting stateless web frontends.
• Service: Places a (TCP) load balancer address in front of pods.
• Other interesting ones: StatefulSet, DaemonSet, CronJob.
Commonly used object classes
Slide 14 of 38
Reference: Meetup Kubernetes
• List all nodes (i.e., servers) in a cluster:
$ kubectl get nodes
• Start an Nginx pod that is automatically restarted/migrated:
$ kubectl create deployment nginx --image=nginx:1.15
• Edit the deployment to increase the number of replicas:
$ kubectl edit deployment
• Delete a single pod that is misbehaving (and create a new one):
$ kubectl delete pod nginx-9db896598-pj5lz
Example invocations of kubectl
Slide 15 of 38
Reference: Meetup Kubernetes
Objects in the cluster are partitioned into namespaces.
• No referencing across namespaces.
• Deployments start pods in the same namespace.
• Services can only match pods in the same namespace.
• Use case #1: Production vs. development setups.
• kubectl edit deployment -n wiki-prod nginx
• kubectl edit deployment -n wiki-dev nginx
• Reduces risk of accidentally mixing up traffic.
• Use case #2: Multi-tenant clusters.
• Exception: nodes don’t have a namespace.
Namespaces
Slide 16 of 38
Reference: Meetup Kubernetes
From outside of the cluster:
• Basic authentication (username & password).
• SSL client certificates.
• OpenID Connect.
From within the cluster:
• Every pod runs under a ServiceAccount.
• Built-in CA generates SSL client certificates for pods.
• Accessible through /var/run/secrets/… inside containers.
API server authentication
Slide 17 of 38
Reference: Meetup Kubernetes
Kubernetes implements Role-Based Access Controls (RBAC):
• Subject: either an external user or a ServiceAccount.
• Roles: gives a name to a set of rights: ${verb} ${class}.
• ‘release-pusher’ = {‘edit deployments’, ‘get pods’}.
• RoleBinding: grants a subject access to a role in a namespace.
• Grant ‘jenkins’ the role ‘release-pusher’ in namespace ‘wiki-prod’.
• ClusterRoleBinding: grants access to a role in all namespaces.
• Grant ‘prometheus‘ the role ‘node-viewer’.
API server authorisation
Slide 18 of 38
Reference: Meetup Kubernetes
Authorisation class diagram
Slide 19 of 38
Reference: Meetup Kubernetes
Kubernetes at
Prodrive Technologies
Slide 20 of 38
Reference: Meetup Kubernetes
Whole fleet of systems to which people currently SSH/X11/….
• Every project has different requirements for development tools.
• Many tickets for IT to install software.
• Separate systems to deal with contradicting version requirements.
• Strong imbalance in system utilisation.
• Lack of reproducible build environments when reviving old projects.
The existing Prodrive development infrastructure
Slide 21 of 38
Reference: Meetup Kubernetes
1. IT creates a Docker image called ‘Prodrivian’.
- Debian with common Prodrive configuration on top.
2. Development team inherits and creates a custom Docker image.
- Adds project specific tools (cross compilers, commercial tools) on top.
3. Development team fires up containers on Kubernetes.
- For interactive use.
- Through CI systems for automated builds.
The future Prodrive development infrastructure?
Slide 22 of 38
Reference: Meetup Kubernetes
Goal:
• Develop a centralised cluster usable by all developers.
• For both batch/interactive use, but also for running services.
Problem:
• Lots of material on using single-tenant Kubernetes clusters.
• Some material on multi-tenant clusters.
• No material on easy, maintainable multi-tenant clusters.
Crux
Slide 23 of 38
Reference: Meetup Kubernetes
Problem: Full Kubernetes RBAC is too hard to get right.
Solution: Subset it to a simplified authorisation model.
• Every employee has a personal namespace.
• Rights for user == rights of namespace’s default service account.
• kubectl on your laptop behaves the same way as on the cluster.
• Employees can create groups.
• Every group automatically gets a namespace in the cluster.
• Group members have read/write access to the namespace.
• Transitive: edsch ➜ it-services-linux ➜ wiki-{prod,qa,dev}
Authorisation
Slide 24 of 38
Reference: Meetup Kubernetes
Group management tool
Slide 25 of 38
Reference: Meetup Kubernetes
$ kubectl describe clusterrole corpdb:group-membership
…
configmaps [create delete get list patch update watch]
cronjobs.batch [create delete get list patch update watch]
deployments.apps [create delete get list patch update watch]
deployments.extensions [create delete get list patch update watch]
…
$ kubectl describe rolebinding -n wiki-prod corpdb:group-membership
…
User https://login.prodrive-technologies.com/#edsch
ServiceAccount default edsch
…
RBAC configuration for a group
Slide 26 of 38
Reference: Meetup Kubernetes
Problem: By default, all pods can connect to each other.
• Ideally, should be restricted by having auth at the application level
(e.g., let everything use credentials or SSL client/server certs).
• Too complex to realise at our scale for now.
• (Interesting project: Istio)
Solution: Also use groups to automatically set up in-cluster firewalling.
• Transitive: edsch ➜ it-services-linux ➜ wiki-{prod,qa,dev}
Network policies
Slide 27 of 38
Reference: Meetup Kubernetes
$ kubectl describe namespace edsch
Labels: …
corpdb-can-access-namespace-wiki-prod=true
…
$ kubectl describe networkpolicy -n wiki-prod corpdb-allow-members-ingress
Spec:
Allowing ingress traffic:
To Port: <any> (traffic allowed to all ports)
From NamespaceSelector: corpdb-can-access-namespace-wiki-prod=true
…
Network policy for a group
Slide 28 of 38
Reference: Meetup Kubernetes
Problem: Nodes in cluster become overloaded due to containers
consuming too much CPU & memory.
Solution: Configure resource limits.
• Give employees a ‘freebie quota’.
• For group namespaces, have a resource allocation procedure.
Resource quotas #1
Slide 29 of 38
Reference: Meetup Kubernetes
$ kubectl describe resourcequota -n edsch corpdb
Name: corpdb
Namespace: edsch
Resource Used Hard
-------- ---- ----
requests.cpu 0 1
requests.memory 0 1Gi
Resource quota for a namespace
Slide 30 of 38
Reference: Meetup Kubernetes
Problem: Providing resource limits for containers is optional.
Omitting them will create containers that are exempt from quotas.
Solution: Automatically inject resource limits for such containers.
• Provided LimitRanger admission controller can do this.
Resource quotas #2
Slide 31 of 38
Reference: Meetup Kubernetes
$ kubectl describe limitrange -n edsch corpdb
Name: corpdb
Namespace: edsch
Type Resource Min Max Default Request Default Limit Max Limit/Request Ratio
---- -------- --- --- --------------- ------------- -----------------------
Container memory 16Mi - 16Mi 64Mi 4
Container cpu 10m - 10m 40m 4
LimitRange configuration
Slide 32 of 38
Reference: Meetup Kubernetes
Problem: We want to allow people to create services that are available
inside the cluster, but oftentimes not ones that are public.
• Type ‘ClusterIP’ vs. ‘LoadBalancer’.
• Kubernetes RBAC is too weak to solve this.
Solution: Set up a ValidatingAdmissionWebhook.
• Lets the API server send ‘kubectl create service’ requests through a
helper process using HTTP calls.
• Helper process can accept/reject the request.
• Groups that should create load balancers can be whitelisted.
Preventing security foot-shooting
Slide 33 of 38
Reference: Meetup Kubernetes
$ kubectl describe validatingwebhookconfiguration corpdb-web-kubernetes-validator
…
Service:
Name: corpdb-web-kubernetes-validator
Namespace: corpdb-prod
Failure Policy: Fail
Rules:
Operations:
*
Resources:
services
…
Validating webhook configuration example
Slide 34 of 38
Reference: Meetup Kubernetes
Problem: How can users easily configure kubectl on their system?
• Setting it up initially (API server hostname, default namespace).
• Obtaining a temporary access token.
Solution: Build a ‘kubeaccess’ web page.
• Generates commands that can be copy-pasted to a terminal.
• Generates OpenID Connect tokens with 20 hour validity on the fly.
• Relies on an OpenID Identity Provider on the same dataset.
External access
Slide 35 of 38
Reference: Meetup Kubernetes
Kubeaccess web page
Slide 36 of 38
Reference: Meetup Kubernetes
CorpDB overview
Slide 37 of 38
Reference: Meetup Kubernetes
• Distributed storage: Ceph/Rook.
• Extend CorpDB to track storage resource limits as well.
• Prodrive globalisation effort: automatically set up replicated storage?
• Continuous Build/Integration: Let Bamboo spawn pods.
• Atlassian offers a per-build-container extension.
• Integrate Kubernetes into High-End Computing products.
• Scale of computing needed in industrial automation is increasing.
• Work along with the Open Source community.
• Contribute in both directions (e.g., Traefik OIDC support).
Future work
Slide 38 of 38
Reference: Meetup Kubernetes
• Lots of awesome projects at Prodrive.
• Nice company culture.
• Chat with us after this talk!
• https://prodrive-technologies.com/careers/
Help!
Slide 39 of 38
Reference: Meetup Kubernetes
a passion for technology
Prodrive Technologies
T +31 40 2676200
E contact@prodrive-technologies.com
I www.prodrive-technologies.com

More Related Content

What's hot

CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018Krishna-Kumar
 
Revolutionizing WSO2 PaaS with Kubernetes & App Factory
Revolutionizing WSO2 PaaS with Kubernetes & App FactoryRevolutionizing WSO2 PaaS with Kubernetes & App Factory
Revolutionizing WSO2 PaaS with Kubernetes & App FactoryImesh Gunaratne
 
Kubernetes: An Introduction to the Open Source Container Orchestration Platform
Kubernetes: An Introduction to the Open Source Container Orchestration PlatformKubernetes: An Introduction to the Open Source Container Orchestration Platform
Kubernetes: An Introduction to the Open Source Container Orchestration PlatformMichael O'Sullivan
 
Microservices DevOps on Google Cloud Platform
Microservices DevOps on Google Cloud PlatformMicroservices DevOps on Google Cloud Platform
Microservices DevOps on Google Cloud PlatformSunnyvale
 
Secure Your Containers: What Network Admins Should Know When Moving Into Prod...
Secure Your Containers: What Network Admins Should Know When Moving Into Prod...Secure Your Containers: What Network Admins Should Know When Moving Into Prod...
Secure Your Containers: What Network Admins Should Know When Moving Into Prod...Cynthia Thomas
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes IntroductionEric Gustafson
 
Docker Indy: Dockercon 2019 Recap and Docker CLI Plugins
Docker Indy: Dockercon 2019 Recap and Docker CLI PluginsDocker Indy: Dockercon 2019 Recap and Docker CLI Plugins
Docker Indy: Dockercon 2019 Recap and Docker CLI Pluginsehazlett
 
.docker : how to deploy Digital Experience in a container drinking a cup of c...
.docker : how to deploy Digital Experience in a container drinking a cup of c....docker : how to deploy Digital Experience in a container drinking a cup of c...
.docker : how to deploy Digital Experience in a container drinking a cup of c...Andrea Fontana
 
Introduction to containers, k8s, Microservices & Cloud Native
Introduction to containers, k8s, Microservices & Cloud NativeIntroduction to containers, k8s, Microservices & Cloud Native
Introduction to containers, k8s, Microservices & Cloud NativeTerry Wang
 
Kubernetes with docker
Kubernetes with dockerKubernetes with docker
Kubernetes with dockerDocker, Inc.
 
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
Building Cloud-Native Applications with Kubernetes, Helm and KubelessBuilding Cloud-Native Applications with Kubernetes, Helm and Kubeless
Building Cloud-Native Applications with Kubernetes, Helm and KubelessBitnami
 
Kubernetes Basics & Monitoring
Kubernetes Basics & MonitoringKubernetes Basics & Monitoring
Kubernetes Basics & MonitoringMist.io
 
Docker containers : introduction
Docker containers : introductionDocker containers : introduction
Docker containers : introductionrinnocente
 
Kubernetes architecture
Kubernetes architectureKubernetes architecture
Kubernetes architectureJanakiram MSV
 
Beyond Ingresses - Better Traffic Management in Kubernetes
Beyond Ingresses - Better Traffic Management in KubernetesBeyond Ingresses - Better Traffic Management in Kubernetes
Beyond Ingresses - Better Traffic Management in KubernetesMark McBride
 
Meteor South Bay Meetup - Kubernetes & Google Container Engine
Meteor South Bay Meetup - Kubernetes & Google Container EngineMeteor South Bay Meetup - Kubernetes & Google Container Engine
Meteor South Bay Meetup - Kubernetes & Google Container EngineKit Merker
 

What's hot (20)

CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018
 
Revolutionizing WSO2 PaaS with Kubernetes & App Factory
Revolutionizing WSO2 PaaS with Kubernetes & App FactoryRevolutionizing WSO2 PaaS with Kubernetes & App Factory
Revolutionizing WSO2 PaaS with Kubernetes & App Factory
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Kubernetes: An Introduction to the Open Source Container Orchestration Platform
Kubernetes: An Introduction to the Open Source Container Orchestration PlatformKubernetes: An Introduction to the Open Source Container Orchestration Platform
Kubernetes: An Introduction to the Open Source Container Orchestration Platform
 
Microservices DevOps on Google Cloud Platform
Microservices DevOps on Google Cloud PlatformMicroservices DevOps on Google Cloud Platform
Microservices DevOps on Google Cloud Platform
 
Secure Your Containers: What Network Admins Should Know When Moving Into Prod...
Secure Your Containers: What Network Admins Should Know When Moving Into Prod...Secure Your Containers: What Network Admins Should Know When Moving Into Prod...
Secure Your Containers: What Network Admins Should Know When Moving Into Prod...
 
Kubernetes Introduction
Kubernetes IntroductionKubernetes Introduction
Kubernetes Introduction
 
Docker Indy: Dockercon 2019 Recap and Docker CLI Plugins
Docker Indy: Dockercon 2019 Recap and Docker CLI PluginsDocker Indy: Dockercon 2019 Recap and Docker CLI Plugins
Docker Indy: Dockercon 2019 Recap and Docker CLI Plugins
 
.docker : how to deploy Digital Experience in a container drinking a cup of c...
.docker : how to deploy Digital Experience in a container drinking a cup of c....docker : how to deploy Digital Experience in a container drinking a cup of c...
.docker : how to deploy Digital Experience in a container drinking a cup of c...
 
Introduction to containers, k8s, Microservices & Cloud Native
Introduction to containers, k8s, Microservices & Cloud NativeIntroduction to containers, k8s, Microservices & Cloud Native
Introduction to containers, k8s, Microservices & Cloud Native
 
Kubernetes with docker
Kubernetes with dockerKubernetes with docker
Kubernetes with docker
 
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
Building Cloud-Native Applications with Kubernetes, Helm and KubelessBuilding Cloud-Native Applications with Kubernetes, Helm and Kubeless
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
 
Kubernetes Basics & Monitoring
Kubernetes Basics & MonitoringKubernetes Basics & Monitoring
Kubernetes Basics & Monitoring
 
Jenkins 1
Jenkins 1Jenkins 1
Jenkins 1
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
Docker containers : introduction
Docker containers : introductionDocker containers : introduction
Docker containers : introduction
 
Kubernetes architecture
Kubernetes architectureKubernetes architecture
Kubernetes architecture
 
Beyond Ingresses - Better Traffic Management in Kubernetes
Beyond Ingresses - Better Traffic Management in KubernetesBeyond Ingresses - Better Traffic Management in Kubernetes
Beyond Ingresses - Better Traffic Management in Kubernetes
 
Gdg izmir kubernetes
Gdg izmir kubernetesGdg izmir kubernetes
Gdg izmir kubernetes
 
Meteor South Bay Meetup - Kubernetes & Google Container Engine
Meteor South Bay Meetup - Kubernetes & Google Container EngineMeteor South Bay Meetup - Kubernetes & Google Container Engine
Meteor South Bay Meetup - Kubernetes & Google Container Engine
 

Similar to Building Kubernetes for Large Organizations

Successful K8S Platforms in Airgapped Environments
Successful K8S Platforms in Airgapped EnvironmentsSuccessful K8S Platforms in Airgapped Environments
Successful K8S Platforms in Airgapped EnvironmentsKubernetesCommunityD
 
Dev opsec dockerimage_patch_n_lifecyclemanagement_
Dev opsec dockerimage_patch_n_lifecyclemanagement_Dev opsec dockerimage_patch_n_lifecyclemanagement_
Dev opsec dockerimage_patch_n_lifecyclemanagement_kanedafromparis
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Ryan Jarvinen
 
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事smalltown
 
Kubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CDKubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CDStfalcon Meetups
 
給 RD 的 Kubernetes 初體驗
給 RD 的 Kubernetes 初體驗給 RD 的 Kubernetes 初體驗
給 RD 的 Kubernetes 初體驗William Yeh
 
Oscon 2017: Build your own container-based system with the Moby project
Oscon 2017: Build your own container-based system with the Moby projectOscon 2017: Build your own container-based system with the Moby project
Oscon 2017: Build your own container-based system with the Moby projectPatrick Chanezon
 
OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...
OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...
OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...NETWAYS
 
OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...
OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...
OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...NETWAYS
 
K8sfor dev parisoss-summit-microsoft-5-decembre-short
K8sfor dev parisoss-summit-microsoft-5-decembre-shortK8sfor dev parisoss-summit-microsoft-5-decembre-short
K8sfor dev parisoss-summit-microsoft-5-decembre-shortGabriel Bechara
 
A hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stackA hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stackQAware GmbH
 
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17Mario-Leander Reimer
 
Kubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containersKubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containersinovex GmbH
 
Develop and deploy Kubernetes applications with Docker - IBM Index 2018
Develop and deploy Kubernetes  applications with Docker - IBM Index 2018Develop and deploy Kubernetes  applications with Docker - IBM Index 2018
Develop and deploy Kubernetes applications with Docker - IBM Index 2018Patrick Chanezon
 
Weave User Group Talk - DockerCon 2017 Recap
Weave User Group Talk - DockerCon 2017 RecapWeave User Group Talk - DockerCon 2017 Recap
Weave User Group Talk - DockerCon 2017 RecapPatrick Chanezon
 
Making Cloud Native CI_CD Services.pdf
Making Cloud Native CI_CD Services.pdfMaking Cloud Native CI_CD Services.pdf
Making Cloud Native CI_CD Services.pdfRakuten Group, Inc.
 
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Ambassador Labs
 

Similar to Building Kubernetes for Large Organizations (20)

Successful K8S Platforms in Airgapped Environments
Successful K8S Platforms in Airgapped EnvironmentsSuccessful K8S Platforms in Airgapped Environments
Successful K8S Platforms in Airgapped Environments
 
Dev opsec dockerimage_patch_n_lifecyclemanagement_
Dev opsec dockerimage_patch_n_lifecyclemanagement_Dev opsec dockerimage_patch_n_lifecyclemanagement_
Dev opsec dockerimage_patch_n_lifecyclemanagement_
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17
 
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事
 
Kubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CDKubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CD
 
給 RD 的 Kubernetes 初體驗
給 RD 的 Kubernetes 初體驗給 RD 的 Kubernetes 初體驗
給 RD 的 Kubernetes 初體驗
 
Remote debugging of Application in Kubernetes
Remote debugging of Application in KubernetesRemote debugging of Application in Kubernetes
Remote debugging of Application in Kubernetes
 
Oscon 2017: Build your own container-based system with the Moby project
Oscon 2017: Build your own container-based system with the Moby projectOscon 2017: Build your own container-based system with the Moby project
Oscon 2017: Build your own container-based system with the Moby project
 
OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...
OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...
OSDC 2017: Automating Kubernetes Cluster Operations with Operators by Timo De...
 
OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...
OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...
OSDC 2017 - Timo Derstappen - Automating kubernetes cluster operations with o...
 
K8sfor dev parisoss-summit-microsoft-5-decembre-short
K8sfor dev parisoss-summit-microsoft-5-decembre-shortK8sfor dev parisoss-summit-microsoft-5-decembre-short
K8sfor dev parisoss-summit-microsoft-5-decembre-short
 
A hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stackA hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stack
 
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
 
Kubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containersKubernetes - how to orchestrate containers
Kubernetes - how to orchestrate containers
 
Develop and deploy Kubernetes applications with Docker - IBM Index 2018
Develop and deploy Kubernetes  applications with Docker - IBM Index 2018Develop and deploy Kubernetes  applications with Docker - IBM Index 2018
Develop and deploy Kubernetes applications with Docker - IBM Index 2018
 
Containers kuberenetes
Containers kuberenetesContainers kuberenetes
Containers kuberenetes
 
Containers kuberenetes
Containers kuberenetesContainers kuberenetes
Containers kuberenetes
 
Weave User Group Talk - DockerCon 2017 Recap
Weave User Group Talk - DockerCon 2017 RecapWeave User Group Talk - DockerCon 2017 Recap
Weave User Group Talk - DockerCon 2017 Recap
 
Making Cloud Native CI_CD Services.pdf
Making Cloud Native CI_CD Services.pdfMaking Cloud Native CI_CD Services.pdf
Making Cloud Native CI_CD Services.pdf
 
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
Velocity NYC 2017: Building Resilient Microservices with Kubernetes, Docker, ...
 

Recently uploaded

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Recently uploaded (20)

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

Building Kubernetes for Large Organizations

  • 1. Slide 1 of 38 Reference: Meetup Kubernetes a passion for technology Date: Reference: Author(s): Distribution: Attendees marked with * Template date: 06-07-2017 Template PN: 6001-1246-5511 Building a Kubernetes cluster for a large organisation 101 Meetup Kubernetes Ed Schouten Prodrive Tech Talk 2018-06-27
  • 2. Slide 2 of 38 Reference: Meetup Kubernetes Prodrive Technologies - Who are we and what do we do? - What do I do? Kubernetes - What is it? Kubernetes at Prodrive Technologies - Why do we want it? - What kind of automation have we designed to go along? - What are we going to work on next? Outline of today’s talk
  • 3. Slide 3 of 38 Reference: Meetup Kubernetes Prodrive Technologies
  • 4. Slide 4 of 38 Reference: Meetup Kubernetes Ready-to-use products Technology solutions Manufacturing services Design of electronics, software and mechanics Manufacturing Added value services We focus on autonomous growth and a solid preservation of our company culture
  • 5. Slide 5 of 38 Reference: Meetup Kubernetes Company presence Prodrive Technologies Netherlands (HQ) - R&D - Manufacturing - Service - Sales China - Sales - Supply Chain - Manufacturing - Service USA - Sales - Manufacturing (Q4-2018) Germany - Sales Israel - Sales Expansion of NL facility (Q2-2018) USA manufacturing (2019) Suzhou facility
  • 6. Slide 6 of 38 Reference: Meetup Kubernetes ‣ Area- and line-scan cameras ‣ Integrated optics, scintillators, FOPs ‣ VIS, NIR, DUV, LWIR, E-beam ‣ Particle Measurement Systems ‣ PMP (Prodrive Motion Platform) ‣ High Performance Actuators ‣ Various motion drives ‣ Mechatronic systems ‣ Variable frequency drives ‣ Wireless Energy (20kW) ‣ Power Converters (100kW+) ‣ Intelligent Power Distribution ‣ Motion control platforms ‣ Image processing platforms ‣ Industrial PC/server ‣ Home automation systems ‣ Gateways and cloud solutions ‣ Smart Thermostats ‣ Professional Audio/Video Distribution ‣ Controllers and I/O ‣ Displays, touch screens, HMI ‣ Automated production equipment ‣ AGV’s
  • 7. Slide 8 of 38 Reference: Meetup Kubernetes Part of the IT Services team. • Responsible for Linux-based infrastructure (source control, builds). • Involved in shaping the future direction of our internal IT. Part of the High-End Computing (HEC) program. • Software architecture for our industrial computing products. What do I do at Prodrive Technologies?
  • 8. Slide 9 of 38 Reference: Meetup Kubernetes Kubernetes
  • 9. Slide 10 of 38 Reference: Meetup Kubernetes Kubernetes is… • A cluster management/orchestration tool. • Based on the design of Borg (Google). • Capable of scheduling Docker containers. • Open Source: Apache 2.0 licensed. Kubernetes
  • 10. Slide 11 of 38 Reference: Meetup Kubernetes Kubernetes in a nutshell
  • 11. Slide 12 of 38 Reference: Meetup Kubernetes kubectl: command line tool for managing clusters. • Talks to the API server over a documented REST API. • Exposes the cluster as objects of different classes. • Each object has a JSON/YAML configuration/state. • Easy to learn syntax: kubectl ${verb} ${class} ${instance} • ‘Bottom half’ is also available as a Golang library. Managing a Kubernetes cluster: kubectl
  • 12. Slide 13 of 38 Reference: Meetup Kubernetes • Node: Linux (or Windows) server that is part of the cluster. • Pod: Unit of work that is scheduled by Kubernetes on a node. • Consists of one or more containers. (‘Sidecars’) • Deployment: Template for starting a fixed number of identical pods. • Good for starting stateless web frontends. • Service: Places a (TCP) load balancer address in front of pods. • Other interesting ones: StatefulSet, DaemonSet, CronJob. Commonly used object classes
  • 13. Slide 14 of 38 Reference: Meetup Kubernetes • List all nodes (i.e., servers) in a cluster: $ kubectl get nodes • Start an Nginx pod that is automatically restarted/migrated: $ kubectl create deployment nginx --image=nginx:1.15 • Edit the deployment to increase the number of replicas: $ kubectl edit deployment • Delete a single pod that is misbehaving (and create a new one): $ kubectl delete pod nginx-9db896598-pj5lz Example invocations of kubectl
  • 14. Slide 15 of 38 Reference: Meetup Kubernetes Objects in the cluster are partitioned into namespaces. • No referencing across namespaces. • Deployments start pods in the same namespace. • Services can only match pods in the same namespace. • Use case #1: Production vs. development setups. • kubectl edit deployment -n wiki-prod nginx • kubectl edit deployment -n wiki-dev nginx • Reduces risk of accidentally mixing up traffic. • Use case #2: Multi-tenant clusters. • Exception: nodes don’t have a namespace. Namespaces
  • 15. Slide 16 of 38 Reference: Meetup Kubernetes From outside of the cluster: • Basic authentication (username & password). • SSL client certificates. • OpenID Connect. From within the cluster: • Every pod runs under a ServiceAccount. • Built-in CA generates SSL client certificates for pods. • Accessible through /var/run/secrets/… inside containers. API server authentication
  • 16. Slide 17 of 38 Reference: Meetup Kubernetes Kubernetes implements Role-Based Access Controls (RBAC): • Subject: either an external user or a ServiceAccount. • Roles: gives a name to a set of rights: ${verb} ${class}. • ‘release-pusher’ = {‘edit deployments’, ‘get pods’}. • RoleBinding: grants a subject access to a role in a namespace. • Grant ‘jenkins’ the role ‘release-pusher’ in namespace ‘wiki-prod’. • ClusterRoleBinding: grants access to a role in all namespaces. • Grant ‘prometheus‘ the role ‘node-viewer’. API server authorisation
  • 17. Slide 18 of 38 Reference: Meetup Kubernetes Authorisation class diagram
  • 18. Slide 19 of 38 Reference: Meetup Kubernetes Kubernetes at Prodrive Technologies
  • 19. Slide 20 of 38 Reference: Meetup Kubernetes Whole fleet of systems to which people currently SSH/X11/…. • Every project has different requirements for development tools. • Many tickets for IT to install software. • Separate systems to deal with contradicting version requirements. • Strong imbalance in system utilisation. • Lack of reproducible build environments when reviving old projects. The existing Prodrive development infrastructure
  • 20. Slide 21 of 38 Reference: Meetup Kubernetes 1. IT creates a Docker image called ‘Prodrivian’. - Debian with common Prodrive configuration on top. 2. Development team inherits and creates a custom Docker image. - Adds project specific tools (cross compilers, commercial tools) on top. 3. Development team fires up containers on Kubernetes. - For interactive use. - Through CI systems for automated builds. The future Prodrive development infrastructure?
  • 21. Slide 22 of 38 Reference: Meetup Kubernetes Goal: • Develop a centralised cluster usable by all developers. • For both batch/interactive use, but also for running services. Problem: • Lots of material on using single-tenant Kubernetes clusters. • Some material on multi-tenant clusters. • No material on easy, maintainable multi-tenant clusters. Crux
  • 22. Slide 23 of 38 Reference: Meetup Kubernetes Problem: Full Kubernetes RBAC is too hard to get right. Solution: Subset it to a simplified authorisation model. • Every employee has a personal namespace. • Rights for user == rights of namespace’s default service account. • kubectl on your laptop behaves the same way as on the cluster. • Employees can create groups. • Every group automatically gets a namespace in the cluster. • Group members have read/write access to the namespace. • Transitive: edsch ➜ it-services-linux ➜ wiki-{prod,qa,dev} Authorisation
  • 23. Slide 24 of 38 Reference: Meetup Kubernetes Group management tool
  • 24. Slide 25 of 38 Reference: Meetup Kubernetes $ kubectl describe clusterrole corpdb:group-membership … configmaps [create delete get list patch update watch] cronjobs.batch [create delete get list patch update watch] deployments.apps [create delete get list patch update watch] deployments.extensions [create delete get list patch update watch] … $ kubectl describe rolebinding -n wiki-prod corpdb:group-membership … User https://login.prodrive-technologies.com/#edsch ServiceAccount default edsch … RBAC configuration for a group
  • 25. Slide 26 of 38 Reference: Meetup Kubernetes Problem: By default, all pods can connect to each other. • Ideally, should be restricted by having auth at the application level (e.g., let everything use credentials or SSL client/server certs). • Too complex to realise at our scale for now. • (Interesting project: Istio) Solution: Also use groups to automatically set up in-cluster firewalling. • Transitive: edsch ➜ it-services-linux ➜ wiki-{prod,qa,dev} Network policies
  • 26. Slide 27 of 38 Reference: Meetup Kubernetes $ kubectl describe namespace edsch Labels: … corpdb-can-access-namespace-wiki-prod=true … $ kubectl describe networkpolicy -n wiki-prod corpdb-allow-members-ingress Spec: Allowing ingress traffic: To Port: <any> (traffic allowed to all ports) From NamespaceSelector: corpdb-can-access-namespace-wiki-prod=true … Network policy for a group
  • 27. Slide 28 of 38 Reference: Meetup Kubernetes Problem: Nodes in cluster become overloaded due to containers consuming too much CPU & memory. Solution: Configure resource limits. • Give employees a ‘freebie quota’. • For group namespaces, have a resource allocation procedure. Resource quotas #1
  • 28. Slide 29 of 38 Reference: Meetup Kubernetes $ kubectl describe resourcequota -n edsch corpdb Name: corpdb Namespace: edsch Resource Used Hard -------- ---- ---- requests.cpu 0 1 requests.memory 0 1Gi Resource quota for a namespace
  • 29. Slide 30 of 38 Reference: Meetup Kubernetes Problem: Providing resource limits for containers is optional. Omitting them will create containers that are exempt from quotas. Solution: Automatically inject resource limits for such containers. • Provided LimitRanger admission controller can do this. Resource quotas #2
  • 30. Slide 31 of 38 Reference: Meetup Kubernetes $ kubectl describe limitrange -n edsch corpdb Name: corpdb Namespace: edsch Type Resource Min Max Default Request Default Limit Max Limit/Request Ratio ---- -------- --- --- --------------- ------------- ----------------------- Container memory 16Mi - 16Mi 64Mi 4 Container cpu 10m - 10m 40m 4 LimitRange configuration
  • 31. Slide 32 of 38 Reference: Meetup Kubernetes Problem: We want to allow people to create services that are available inside the cluster, but oftentimes not ones that are public. • Type ‘ClusterIP’ vs. ‘LoadBalancer’. • Kubernetes RBAC is too weak to solve this. Solution: Set up a ValidatingAdmissionWebhook. • Lets the API server send ‘kubectl create service’ requests through a helper process using HTTP calls. • Helper process can accept/reject the request. • Groups that should create load balancers can be whitelisted. Preventing security foot-shooting
  • 32. Slide 33 of 38 Reference: Meetup Kubernetes $ kubectl describe validatingwebhookconfiguration corpdb-web-kubernetes-validator … Service: Name: corpdb-web-kubernetes-validator Namespace: corpdb-prod Failure Policy: Fail Rules: Operations: * Resources: services … Validating webhook configuration example
  • 33. Slide 34 of 38 Reference: Meetup Kubernetes Problem: How can users easily configure kubectl on their system? • Setting it up initially (API server hostname, default namespace). • Obtaining a temporary access token. Solution: Build a ‘kubeaccess’ web page. • Generates commands that can be copy-pasted to a terminal. • Generates OpenID Connect tokens with 20 hour validity on the fly. • Relies on an OpenID Identity Provider on the same dataset. External access
  • 34. Slide 35 of 38 Reference: Meetup Kubernetes Kubeaccess web page
  • 35. Slide 36 of 38 Reference: Meetup Kubernetes CorpDB overview
  • 36. Slide 37 of 38 Reference: Meetup Kubernetes • Distributed storage: Ceph/Rook. • Extend CorpDB to track storage resource limits as well. • Prodrive globalisation effort: automatically set up replicated storage? • Continuous Build/Integration: Let Bamboo spawn pods. • Atlassian offers a per-build-container extension. • Integrate Kubernetes into High-End Computing products. • Scale of computing needed in industrial automation is increasing. • Work along with the Open Source community. • Contribute in both directions (e.g., Traefik OIDC support). Future work
  • 37. Slide 38 of 38 Reference: Meetup Kubernetes • Lots of awesome projects at Prodrive. • Nice company culture. • Chat with us after this talk! • https://prodrive-technologies.com/careers/ Help!
  • 38. Slide 39 of 38 Reference: Meetup Kubernetes a passion for technology Prodrive Technologies T +31 40 2676200 E contact@prodrive-technologies.com I www.prodrive-technologies.com