SlideShare a Scribd company logo
Rancher 2.X
First Step before Deep Dive
LINE Corporation, Verda2 Yuki Nishiwaki
Who you are?
Name:
● Yuki Nishiwaki
Working Experience:
● Private Cloud Development (OpenStack)
Jan 2015 -> Now
● Kubernetes as a Service Development (Rancher)
July 2018 -> Now
● Function as a Service Development (Knative)
Sep 2018 -> Now
Rancher and Me
● User and Developer
● Have contributed few patches to rancher 2.X related projects
○ rancher/types
■ https://github.com/rancher/types/pull/525
○ rancher/machine
■ https://github.com/rancher/machine/pull/12
○ rancher/norman
■ https://github.com/rancher/norman/pull/201
■ https://github.com/rancher/norman/pull/202
■ https://github.com/rancher/norman/pull/203
○ rancher/rancher
■ https://github.com/rancher/rancher/pull/15909
■ https://github.com/rancher/rancher/pull/15991
■ https://github.com/rancher/rancher/pull/16044
Not so many contributions yet
Today’s scope
● We have only 20-30 min
● Rancher have bunch of features. It will take half of day if I talk all parts
● Try to explain whole picture
● Check following article for more detail
○ https://www.slideshare.net/linecorp/lets-unbox-rancher-20-v200
○ https://github.com/ukinau/rancher-analyse
Rancher 2.X ?
All Data for Rancher are stored in Kubernetes
=> Depend on Kubernetes to run Rancher
1
Manage Kubernetes Cluster by multiple Provider
● Google Container Engine
● Amazon EKS
● Microsoft Azure
● Any VM Provider like OpenStack (RKE)
2
RBAC Configuration
Configure/Deploy
Additional Tools on Cluster
Addon Management
4
Resource
Resource
Resource
Admin member
RBAC Configuration
3
Sync RBAC configuration
Rancher 2.X
Rancher 2.X architecture
API Controller
Cluster Agent
Node Agent
Node Agent
Node Agent
Cluster Agent
Node Agent
Node Agent
Node Agent
Kubernetes Cluster
Kubernetes Cluster
Kubernetes Cluster
Resource Creation process is same as Kubernetes Resource
API Controller
ClusterA
Watch
Kubernetes ClusterReconcile
Get latest
information from
kube-apiserver
Check if any
difference
Between desired and
actual states
Do something to make
actual state desired
Reconcile
Loop
Cluster Agent
Node Agent
Don’t do actual provisioning
Resource Creation process is same as Kubernetes Resource
API Controller
ClusterA
Watch
Kubernetes ClusterReconcile
Get latest
information from
kube-apiserver
Check if any
difference
Between desired and
actual states
Do something to make
actual state desired
Reconcile
Loop
Cluster Agent
Node Agent
Rancher API is just kind of proxy for Kubernetes API
ClusterA NodeA UserA GroupA ・・・
Create Cluster
Store All data as a
Kubernetes by using CRD
CRD for Cluster CRD for Node CRD for User
Call Kubernetes API
Custom Resource Definition(CRD) in Kubernetes?
Kubernetes Native Resource Type Custom Resource Type
CustomResourceDefinition
ConfigMap
Pod
Nginx App A
Nginx Config
Cluster Node
Cluster
Node
Cluster A Cluster B
Node A Node B
Kubernetes allow user to create custom resource type in
addition to natively supported resource.
> kubectl get crd clusters.management.cattle.io -o yaml
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
creationTimestamp: 2018-10-26T13:49:37Z
generation: 1
name: clusters.management.cattle.io
resourceVersion: "1278"
selfLink:
/apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/clusters.management.cattle.io
uid: fa628204-d925-11e8-b840-fa163e305e2c
spec:
group: management.cattle.io
names:
kind: Cluster
listKind: ClusterList
plural: clusters
singular: cluster
scope: Cluster
version: v3
> kubectl get cluster
NAME AGE
local 1d
Example of CRD for Rancher Resource: Cluster
CRD for Cluster
Cluster Resource
Question: Do we really needed to have API server?
Create
Create
Why not Create Cluster Resource directly
?
Resource information tend to be large and some
of the attributes are only needed internally and
don’t have to be exposed to user.
Thus, Rancher mutate resource before try to
create resource in k8s to add some internal
information and also mutate resource before try
to return resource to user in order to drop some
attributes.
Cluster A
Cluster A
Cluster A
some attributes
some attributes
Add
Engineer for Rancher believe their approach is common
● Develop API Server Framework for Kubernetes API(CRD)
○ https://github.com/rancher/norman
● Support
○ Generate API function based on CRD schema
○ Determine path based on CRD schema
○ Override function to do some additional work like overriding attributes, drop attributes…
Resource Creation process is same as Kubernetes Resource
API Controller
ClusterA
Watch
Kubernetes ClusterReconcile
Get latest
information from
kube-apiserver
Check if any
difference
Between desired and
actual states
Do something to make
actual state desired
Reconcile
Loop
Cluster Agent
Node Agent
Rancher Controllers
Management Controllers
Kubernetes Cluster
Kubernetes Cluster
Kubernetes Cluster
User Controllers
User Controllers
User Controllers
Cluster Controller
Node Controller
Catalog Controller
・・・・
Alert Controller
RABC Controller
Endpoint Controller
・・・・
● Run 1 Controller in a Rancher Server
● Do something across Kubernetes Clusters deployed
○ Catalog for Rancher User to deploy helm chart onto Kubernetes Clusters
○ Authentication for Rancher
○ Node Create/Update/Remove
○ Cluster Create/Update/Remove
○ Start User Controller for New Cluster
Management Controllers
Management Controllers
Kubernetes Cluster
Kubernetes Cluster
User Controllers
● Run 1 Controller for each Kubernetes Cluster deployed
● Do something for assigned Kubernetes Cluster
○ Sync data between Rancher Configuration and Kubernetes Cluster deployed
○ Propagate event happening in Kubernetes Cluster deployed to Rancher
○ Watch all workload(Pod...) in Kubernetes Cluster deployed and Do something
User Controllers
Kubernetes Cluster
Kubernetes Cluster
After deployed, How to check/update Node/Cluster state?
kube-apiserver
rancher-server
management controller
user controller
kubelet
Pod A Pod B
Target Resources
Any New Pod?
Anything Change in existing Pod?
Pod A and B is alive!
rancher cluster agent
Target ResourcesTarget Resources
Container
(kubelet)
File
(certificates)
Any change in
Container, Files?
Work as a TCP Proxy
Please check my internal state as you want
rancher node agent
api-server
After deployed, How to check/update Node/Cluster state?
kube-apiserver
rancher-server
management controller
user controller
kubelet
Pod A Pod B
Target Resources
Any New Pod?
Anything Change in existing Pod?
Pod A and B is alive!
rancher cluster agent
Target ResourcesTarget Resources
Container
(kubelet)
File
(certificates)
Any change in
Container, Files?
Work as a TCP Proxy
Please check my internal state as you want
rancher node agent
api-server
Agent TCP Proxy is used when you call k8s API
Please look at endpoint closely
https://<rancher-server-endpoint>/k8s/cluster/local
All requests against k8s cluster are
sent to Rancher first and Rancher
proxy it into correct cluster
How Rancher proxy
Kubernetes Cluster
rancher cluster agent
Kubernetes Cluster
rancher cluster agent
User can not call Kubernetes API
While cluster-agent is down
If rancher cluster agent got down for some reason
Rancher 2.X Updates
Rancher 2.0 -> 2.1: Support multiple Rancher Server
Kubernetes Cluster
Kubernetes Cluster
LB
Rancher Server play very very important role,
if it is down, following features are not available
1. Create/Update/Delete Node, Cluster
2. All management function for Node, Cluster
3. Proxy Kubernetes API request to Cluster
Rancher 2.0 -> 2.1: Support multiple Rancher Server
Kubernetes Cluster
Kubernetes Cluster
LB
Rancher 2.0 is not allowed operator to run
multiple rancher server because of websocket
session handling logic.
Rancher 2.0 -> 2.1: Support multiple Rancher Server
Kubernetes Cluster
Kubernetes Cluster
LB
Leader
From 2.1, Rancher’s websocket session
handling logic got improved and now they
allow us to run multiple rancher server for high
availability and scalability.
Rancher 2.0 -> 2.X: Move User Controllers to...
User Controllers
User Controllers
User Controllers
Kubernetes Cluster
Kubernetes Cluster
Kubernetes Cluster
CPU/Memory Usage increase
every time create cluster
・・・・
・
・
Management Controllers
Rancher 2.0 -> 2.X: Move User Controllers to...
Kubernetes Cluster
Kubernetes Cluster
Kubernetes Cluster
User Controllers
User Controllers
User Controllers
Management Controllers
CPU/Memory increasing ratio by new cluster got
improved than before because new user controller
for new cluster will be running on new cluster itself

More Related Content

PDF
Let’s unbox Rancher 2.0 <v2.0.0>
PDF
Rancher 2.0 Technical Deep Dive
PDF
An Introduction to Kubernetes
PDF
Kubernetes: A Short Introduction (2019)
PDF
What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...
PDF
“How to Secure Your Applications With a Keycloak?
PDF
Everything you want to know about Ingress
PPTX
Kubernetes Introduction
Let’s unbox Rancher 2.0 <v2.0.0>
Rancher 2.0 Technical Deep Dive
An Introduction to Kubernetes
Kubernetes: A Short Introduction (2019)
What Is Kubernetes | Kubernetes Introduction | Kubernetes Tutorial For Beginn...
“How to Secure Your Applications With a Keycloak?
Everything you want to know about Ingress
Kubernetes Introduction

What's hot (20)

PPTX
Secure your app with keycloak
PDF
Secret Management with Hashicorp’s Vault
PPTX
Introduction to helm
PDF
How we can do Multi-Tenancy on Kubernetes
PDF
Architecture Overview: Kubernetes with Red Hat Enterprise Linux 7.1
PDF
Let's build Developer Portal with Backstage
PDF
Ace Up the Sleeve
PDF
Kubernetes
PPTX
Kubernetes PPT.pptx
PDF
Rancher Labs - Your own PaaS in action
PDF
Getting Started with Kubernetes
PDF
Backstage l'Internal Developer Portal Open Source per una migliore Developer ...
PDF
Deploy Application on Kubernetes
PDF
Derbycon - The Unintended Risks of Trusting Active Directory
PDF
MITRE ATT&CKcon 2.0: Lessons in Purple Team Testing with MITRE ATT&CK; Daniel...
PPTX
DevOps Interview Questions Part - 2 | Devops Interview Questions And Answers ...
PPTX
Rest API Security - A quick understanding of Rest API Security
PDF
Kubernetes - A Comprehensive Overview
PDF
Kubernetes Networking | Kubernetes Services, Pods & Ingress Networks | Kubern...
PDF
Podman Overview and internals.pdf
Secure your app with keycloak
Secret Management with Hashicorp’s Vault
Introduction to helm
How we can do Multi-Tenancy on Kubernetes
Architecture Overview: Kubernetes with Red Hat Enterprise Linux 7.1
Let's build Developer Portal with Backstage
Ace Up the Sleeve
Kubernetes
Kubernetes PPT.pptx
Rancher Labs - Your own PaaS in action
Getting Started with Kubernetes
Backstage l'Internal Developer Portal Open Source per una migliore Developer ...
Deploy Application on Kubernetes
Derbycon - The Unintended Risks of Trusting Active Directory
MITRE ATT&CKcon 2.0: Lessons in Purple Team Testing with MITRE ATT&CK; Daniel...
DevOps Interview Questions Part - 2 | Devops Interview Questions And Answers ...
Rest API Security - A quick understanding of Rest API Security
Kubernetes - A Comprehensive Overview
Kubernetes Networking | Kubernetes Services, Pods & Ingress Networks | Kubern...
Podman Overview and internals.pdf
Ad

Similar to Rancher 2.x first step before deep dive (20)

PDF
Introduction of k8s rancher
PDF
LINE's Private Cloud - Meet Cloud Native World
PDF
Introduction of kubernetes rancher
PPTX
Kubernetes #1 intro
PDF
CN Asturias - Stateful application for kubernetes
PDF
An intro to Kubernetes operators
PPTX
Docker Enterprise Workshop - Technical
PDF
Communication Amongst Microservices: Kubernetes, Istio, and Spring Cloud with...
PDF
Lessons learned and challenges faced while running Kubernetes at Scale
PDF
Serverless with Knative - Mete Atamel (Google)
PPTX
Project Gardener - EclipseCon Europe - 2018-10-23
PDF
Kubernetes Clusters as a Service with Gardener
PDF
stackconf 2024 | Ignite: Is rust good for Kubernetes by Natalie Serebryakova ...
PPT
Kubernetes for Cloud-Native Environments
PDF
Introduction to Kubernetes - Docker Global Mentor Week 2016
PPTX
Kubernetes @ Squarespace: Kubernetes in the Datacenter
PDF
Docker on docker leveraging kubernetes in docker ee
PDF
18th Athens Big Data Meetup - 2nd Talk - Run Spark and Flink Jobs on Kubernetes
PPTX
Introduction+to+Kubernetes-Details-D.pptx
PDF
20250617 [KubeCon JP 2025] containerd - Project Update and Deep Dive.pdf
Introduction of k8s rancher
LINE's Private Cloud - Meet Cloud Native World
Introduction of kubernetes rancher
Kubernetes #1 intro
CN Asturias - Stateful application for kubernetes
An intro to Kubernetes operators
Docker Enterprise Workshop - Technical
Communication Amongst Microservices: Kubernetes, Istio, and Spring Cloud with...
Lessons learned and challenges faced while running Kubernetes at Scale
Serverless with Knative - Mete Atamel (Google)
Project Gardener - EclipseCon Europe - 2018-10-23
Kubernetes Clusters as a Service with Gardener
stackconf 2024 | Ignite: Is rust good for Kubernetes by Natalie Serebryakova ...
Kubernetes for Cloud-Native Environments
Introduction to Kubernetes - Docker Global Mentor Week 2016
Kubernetes @ Squarespace: Kubernetes in the Datacenter
Docker on docker leveraging kubernetes in docker ee
18th Athens Big Data Meetup - 2nd Talk - Run Spark and Flink Jobs on Kubernetes
Introduction+to+Kubernetes-Details-D.pptx
20250617 [KubeCon JP 2025] containerd - Project Update and Deep Dive.pdf
Ad

More from LINE Corporation (20)

PDF
JJUG CCC 2018 Fall 懇親会LT
PDF
Reduce dependency on Rx with Kotlin Coroutines
PDF
Kotlin/NativeでAndroidのNativeメソッドを実装してみた
PDF
Use Kotlin scripts and Clova SDK to build your Clova extension
PDF
The Magic of LINE 購物 Testing
PPTX
GA Test Automation
PDF
UI Automation Test with JUnit5
PDF
Feature Detection for UI Testing
PDF
LINE 新星計劃介紹與新創團隊分享
PDF
​LINE 技術合作夥伴與應用分享
PDF
LINE 開發者社群經營與技術推廣
PDF
日本開發者大會短講分享
PDF
LINE Chatbot - 活動報名報到設計分享
PDF
在 LINE 私有雲中使用 Managed Kubernetes
PDF
LINE TODAY高效率的敏捷測試開發技巧
PDF
LINE 區塊鏈平台及代幣經濟 - LINK Chain及LINK介紹
PDF
LINE Things - LINE IoT平台新技術分享
PDF
LINE Pay - 一卡通支付新體驗
PDF
LINE Platform API Update - 打造一個更好的Chatbot服務
PDF
Keynote - ​LINE 的技術策略佈局與跨國產品開發
JJUG CCC 2018 Fall 懇親会LT
Reduce dependency on Rx with Kotlin Coroutines
Kotlin/NativeでAndroidのNativeメソッドを実装してみた
Use Kotlin scripts and Clova SDK to build your Clova extension
The Magic of LINE 購物 Testing
GA Test Automation
UI Automation Test with JUnit5
Feature Detection for UI Testing
LINE 新星計劃介紹與新創團隊分享
​LINE 技術合作夥伴與應用分享
LINE 開發者社群經營與技術推廣
日本開發者大會短講分享
LINE Chatbot - 活動報名報到設計分享
在 LINE 私有雲中使用 Managed Kubernetes
LINE TODAY高效率的敏捷測試開發技巧
LINE 區塊鏈平台及代幣經濟 - LINK Chain及LINK介紹
LINE Things - LINE IoT平台新技術分享
LINE Pay - 一卡通支付新體驗
LINE Platform API Update - 打造一個更好的Chatbot服務
Keynote - ​LINE 的技術策略佈局與跨國產品開發

Recently uploaded (20)

PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
A novel scalable deep ensemble learning framework for big data classification...
PDF
1 - Historical Antecedents, Social Consideration.pdf
PPTX
A Presentation on Artificial Intelligence
PPTX
Tartificialntelligence_presentation.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
Hindi spoken digit analysis for native and non-native speakers
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Approach and Philosophy of On baking technology
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
August Patch Tuesday
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Encapsulation theory and applications.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
TLE Review Electricity (Electricity).pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
DP Operators-handbook-extract for the Mautical Institute
A novel scalable deep ensemble learning framework for big data classification...
1 - Historical Antecedents, Social Consideration.pdf
A Presentation on Artificial Intelligence
Tartificialntelligence_presentation.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Hindi spoken digit analysis for native and non-native speakers
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Approach and Philosophy of On baking technology
SOPHOS-XG Firewall Administrator PPT.pptx
August Patch Tuesday
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Encapsulation_ Review paper, used for researhc scholars
Group 1 Presentation -Planning and Decision Making .pptx
Encapsulation theory and applications.pdf
A comparative analysis of optical character recognition models for extracting...
TLE Review Electricity (Electricity).pptx
NewMind AI Weekly Chronicles - August'25-Week II

Rancher 2.x first step before deep dive

  • 1. Rancher 2.X First Step before Deep Dive LINE Corporation, Verda2 Yuki Nishiwaki
  • 2. Who you are? Name: ● Yuki Nishiwaki Working Experience: ● Private Cloud Development (OpenStack) Jan 2015 -> Now ● Kubernetes as a Service Development (Rancher) July 2018 -> Now ● Function as a Service Development (Knative) Sep 2018 -> Now
  • 3. Rancher and Me ● User and Developer ● Have contributed few patches to rancher 2.X related projects ○ rancher/types ■ https://github.com/rancher/types/pull/525 ○ rancher/machine ■ https://github.com/rancher/machine/pull/12 ○ rancher/norman ■ https://github.com/rancher/norman/pull/201 ■ https://github.com/rancher/norman/pull/202 ■ https://github.com/rancher/norman/pull/203 ○ rancher/rancher ■ https://github.com/rancher/rancher/pull/15909 ■ https://github.com/rancher/rancher/pull/15991 ■ https://github.com/rancher/rancher/pull/16044 Not so many contributions yet
  • 4. Today’s scope ● We have only 20-30 min ● Rancher have bunch of features. It will take half of day if I talk all parts ● Try to explain whole picture ● Check following article for more detail ○ https://www.slideshare.net/linecorp/lets-unbox-rancher-20-v200 ○ https://github.com/ukinau/rancher-analyse
  • 5. Rancher 2.X ? All Data for Rancher are stored in Kubernetes => Depend on Kubernetes to run Rancher 1 Manage Kubernetes Cluster by multiple Provider ● Google Container Engine ● Amazon EKS ● Microsoft Azure ● Any VM Provider like OpenStack (RKE) 2 RBAC Configuration Configure/Deploy Additional Tools on Cluster Addon Management 4 Resource Resource Resource Admin member RBAC Configuration 3 Sync RBAC configuration
  • 7. Rancher 2.X architecture API Controller Cluster Agent Node Agent Node Agent Node Agent Cluster Agent Node Agent Node Agent Node Agent Kubernetes Cluster Kubernetes Cluster Kubernetes Cluster
  • 8. Resource Creation process is same as Kubernetes Resource API Controller ClusterA Watch Kubernetes ClusterReconcile Get latest information from kube-apiserver Check if any difference Between desired and actual states Do something to make actual state desired Reconcile Loop Cluster Agent Node Agent Don’t do actual provisioning
  • 9. Resource Creation process is same as Kubernetes Resource API Controller ClusterA Watch Kubernetes ClusterReconcile Get latest information from kube-apiserver Check if any difference Between desired and actual states Do something to make actual state desired Reconcile Loop Cluster Agent Node Agent
  • 10. Rancher API is just kind of proxy for Kubernetes API ClusterA NodeA UserA GroupA ・・・ Create Cluster Store All data as a Kubernetes by using CRD CRD for Cluster CRD for Node CRD for User Call Kubernetes API
  • 11. Custom Resource Definition(CRD) in Kubernetes? Kubernetes Native Resource Type Custom Resource Type CustomResourceDefinition ConfigMap Pod Nginx App A Nginx Config Cluster Node Cluster Node Cluster A Cluster B Node A Node B Kubernetes allow user to create custom resource type in addition to natively supported resource.
  • 12. > kubectl get crd clusters.management.cattle.io -o yaml apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: creationTimestamp: 2018-10-26T13:49:37Z generation: 1 name: clusters.management.cattle.io resourceVersion: "1278" selfLink: /apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions/clusters.management.cattle.io uid: fa628204-d925-11e8-b840-fa163e305e2c spec: group: management.cattle.io names: kind: Cluster listKind: ClusterList plural: clusters singular: cluster scope: Cluster version: v3 > kubectl get cluster NAME AGE local 1d Example of CRD for Rancher Resource: Cluster CRD for Cluster Cluster Resource
  • 13. Question: Do we really needed to have API server? Create Create Why not Create Cluster Resource directly ? Resource information tend to be large and some of the attributes are only needed internally and don’t have to be exposed to user. Thus, Rancher mutate resource before try to create resource in k8s to add some internal information and also mutate resource before try to return resource to user in order to drop some attributes. Cluster A Cluster A Cluster A some attributes some attributes Add
  • 14. Engineer for Rancher believe their approach is common ● Develop API Server Framework for Kubernetes API(CRD) ○ https://github.com/rancher/norman ● Support ○ Generate API function based on CRD schema ○ Determine path based on CRD schema ○ Override function to do some additional work like overriding attributes, drop attributes…
  • 15. Resource Creation process is same as Kubernetes Resource API Controller ClusterA Watch Kubernetes ClusterReconcile Get latest information from kube-apiserver Check if any difference Between desired and actual states Do something to make actual state desired Reconcile Loop Cluster Agent Node Agent
  • 16. Rancher Controllers Management Controllers Kubernetes Cluster Kubernetes Cluster Kubernetes Cluster User Controllers User Controllers User Controllers Cluster Controller Node Controller Catalog Controller ・・・・ Alert Controller RABC Controller Endpoint Controller ・・・・
  • 17. ● Run 1 Controller in a Rancher Server ● Do something across Kubernetes Clusters deployed ○ Catalog for Rancher User to deploy helm chart onto Kubernetes Clusters ○ Authentication for Rancher ○ Node Create/Update/Remove ○ Cluster Create/Update/Remove ○ Start User Controller for New Cluster Management Controllers Management Controllers Kubernetes Cluster Kubernetes Cluster
  • 18. User Controllers ● Run 1 Controller for each Kubernetes Cluster deployed ● Do something for assigned Kubernetes Cluster ○ Sync data between Rancher Configuration and Kubernetes Cluster deployed ○ Propagate event happening in Kubernetes Cluster deployed to Rancher ○ Watch all workload(Pod...) in Kubernetes Cluster deployed and Do something User Controllers Kubernetes Cluster Kubernetes Cluster
  • 19. After deployed, How to check/update Node/Cluster state? kube-apiserver rancher-server management controller user controller kubelet Pod A Pod B Target Resources Any New Pod? Anything Change in existing Pod? Pod A and B is alive! rancher cluster agent Target ResourcesTarget Resources Container (kubelet) File (certificates) Any change in Container, Files? Work as a TCP Proxy Please check my internal state as you want rancher node agent api-server
  • 20. After deployed, How to check/update Node/Cluster state? kube-apiserver rancher-server management controller user controller kubelet Pod A Pod B Target Resources Any New Pod? Anything Change in existing Pod? Pod A and B is alive! rancher cluster agent Target ResourcesTarget Resources Container (kubelet) File (certificates) Any change in Container, Files? Work as a TCP Proxy Please check my internal state as you want rancher node agent api-server
  • 21. Agent TCP Proxy is used when you call k8s API
  • 22. Please look at endpoint closely https://<rancher-server-endpoint>/k8s/cluster/local All requests against k8s cluster are sent to Rancher first and Rancher proxy it into correct cluster
  • 23. How Rancher proxy Kubernetes Cluster rancher cluster agent Kubernetes Cluster rancher cluster agent User can not call Kubernetes API While cluster-agent is down If rancher cluster agent got down for some reason
  • 25. Rancher 2.0 -> 2.1: Support multiple Rancher Server Kubernetes Cluster Kubernetes Cluster LB Rancher Server play very very important role, if it is down, following features are not available 1. Create/Update/Delete Node, Cluster 2. All management function for Node, Cluster 3. Proxy Kubernetes API request to Cluster
  • 26. Rancher 2.0 -> 2.1: Support multiple Rancher Server Kubernetes Cluster Kubernetes Cluster LB Rancher 2.0 is not allowed operator to run multiple rancher server because of websocket session handling logic.
  • 27. Rancher 2.0 -> 2.1: Support multiple Rancher Server Kubernetes Cluster Kubernetes Cluster LB Leader From 2.1, Rancher’s websocket session handling logic got improved and now they allow us to run multiple rancher server for high availability and scalability.
  • 28. Rancher 2.0 -> 2.X: Move User Controllers to... User Controllers User Controllers User Controllers Kubernetes Cluster Kubernetes Cluster Kubernetes Cluster CPU/Memory Usage increase every time create cluster ・・・・ ・ ・ Management Controllers
  • 29. Rancher 2.0 -> 2.X: Move User Controllers to... Kubernetes Cluster Kubernetes Cluster Kubernetes Cluster User Controllers User Controllers User Controllers Management Controllers CPU/Memory increasing ratio by new cluster got improved than before because new user controller for new cluster will be running on new cluster itself