This document summarizes a presentation by two engineers from DENSO Corporation about their development of a Kubernetes-based connected vehicle platform prototype called Misaki. They introduce Misaki's orchestrator for deploying and managing applications across edge and cloud, as well as its service mesh for handling network issues. While Misaki addresses many challenges of developing vehicle applications, the engineers note there is still work needed to support additional protocols, improve flexibility, and minimize resource usage on edge devices. They invite the audience to follow their continued work on Misaki.
DC MACHINE-Motoring and generation, Armature circuit equation
Integrating Service Mesh with Kubernetes-based connected vehicle platform
1. June 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Integrating Service Mesh
with Kubernetes-based
connected vehicle platform
DENSO CORPORATION Digital Innovation Div
JunKai Yong / Tomoya Amachi
2. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Agenda
2
Introduction of DENSO and our team
What we are building
Technical details and demonstration
3. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Introduction
JunKai Yong/@yjk_miloaddict
3
Software Engineer@DENSO CORPORATION
Digital Innovation Div.
Graduated from Nanyang Technological University
(NTU) in May 2018
Joined DENSO in Oct 2018.
Working on IoT and Service-Mesh related
topics
4. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Introduction
Tomoya Amachi/@tomoyamachi
4
Software Engineer
Joined misaki project as part of CREATIONLINE team
5. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
About DENSO
5
https://www.denso.com/global/en/
6. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
6
As a global manufacturer of automotive parts, DENSO is expanding its
business operations around the world.
DENSO supplies a wide range of products and systems
as a Tier 1* supplier trusted by the world’s automobile manufacturers.
World’s No.2
Consolidated net sales of 5.2 trillion yen.
About DENSO
7. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Our team
DENSO + Creationline = Our team!
7
8. June 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Abstracts of the Misaki
9. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
9
Why it is difficult to develop vehicle applications?
Applications on vehicle is becoming more and more important!
Develop application on
vehicles
10. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Develop application on
vehicles
10
There are many ECU(Electric control unit)s in a
car.
rader
accessmete
r
rain
sensor
camer
a
battery sensor
EC
U
Difficult to Develop - Need to learn about embedded systems.
11. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Difficult to Develop - Need to learn about embedded systems.
11
There are many ECU(Electric control unit)s in a
car.
Not using linux in most
cases.
CPU/Memory resources are limited and distributed.
Develop application on
vehicles
12. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
No easy way to update applications on many cars
simultaneously.
12
It's not always possible to run the application on your
PC as it is.
Develop application on
vehicles
Difficult to Develop - Need to learn about embedded systems.
13. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Network connection can be unstable
Because cars are moving around!
13
If connection
breaks..
Cars are like highly distributed system.
Developers have to deal with network
disconnection for their apps.
(retries/store data locally…)
Develop application on
vehicles
Difficult to Develop - Unstable Network.
14. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
But application on vehicle is becoming more and more important!
14
It’s important to handle data on edge and and keep updating the application
to minimize communications expenses.
e.g: Picture / Video / Traffic Data / Metadata
The Global Connected Car Market size is projected to reach USD 212.7 billion by
2027, from an estimated value of USD 42.6 billion in 2019, at a CAGR of 22.3%.
Current vehicles are like feature phone at 2000s. Smart "vehicle" era is coming soon.
"Applications" will be a selling point of smart vehicles same as smart phone.
Develop application on
vehicles
https://www.marketsandmarkets.com/Market-Reports/connected-car-market-102580117.html
15. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
What we are building?
Kubernetes based connected vehicle platform!
15
Minimize the need to learn about embedded
systems.
Easy to deploy/update application to vehicles.
Remove the need for application developers to
handle network issues.
It's still a prototype.
16. June 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Architecture Overview
17. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Architecture Overview
17
App
Edge Cloud
App
K8s
Agent
VP
N
VP
N
Applying
Manifest
Choos
e
HELM
Chart
Generat
e
K8s
Manifest
List
Share
Ideal
Manifest
b/w Edge and
Cloud
DigitalTwin API UI
K8s
Agent
18. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Why Kubernetes?
Flexibility of resources
18
radar
accessmete
r
rain
sensor
battery sensor
EC
U
ECUs will unified into several High Performance ECU in the future. We can use it
as k8s worker node.
19. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Flexibility of resources
19
radar
accessmete
r
rain
sensor
battery sensor
High Performance
ECU
Easy to orchestrate and manage ECU resources.
These ECUs will be separated from the basic operation of the car (running, stopping,
turning)
Why Kubernetes?
20. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
High performance ECU:
NVIDIA Jetson AGX Xavier Developer Kit
20
https://www.nvidia.com/en-us/autonomous-machines/embedded-systems/jetson-xavier-nx/
Why Kubernetes?
21. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
21
Edge
A
Cloud
High Spec Car
We can use resources on
cloud.
We can run same applications
even if edge resources are not enough
We can run container image
in different vehicles and cloud.
Flexibility of resources
B C
VP
N
A
Low Spec Car
B C
VP
N
Why Kubernetes?
22. June 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Technical Details
23. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Components of Misaki
Misaki
23
Misaki Orchestrator
Misaki Service mesh
24. June 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Misaki Orchestrator
For more information:
https://youtu.be/2x7jQTBUT5w
25. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Technical details about
Misaki orchestrator
25
App
Edge Cloud
App
K8s
Agent
VP
N
Apply
Manifest
To
Cluster
Choos
e
HELM
Chart
Generat
e
K8s
Manifest
List
Share
Ideal
Manifest
b/w Edge and
Cloud
DigitalTwin API UI
4 3 2 1
4 components
26. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
26
Misaki orchestrator
Applications
Repository
Data
Processcor
Data
Uploader
Sensory data
APP1
APP2
APP3
APP4
APP1
APP2
APP3
APP4
https://www.flaticon.com/authors/vitaly-gorbachev
https://www.flaticon.com/authors/xnimrodx
https://www.flaticon.com/authors/good-ware
How it works:
27. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
27
Demo: Misaki orchestrator Video scenario
GPS managerCan manager
Deleted Service:
CAN-uploader-for-prius-phv
Pod 3 Pod 4
Pod 1 Pod 2
Local Broker Redis to Ambass
GPS managerCan manager
New service deployed:
via-containers-for-prius
Pod 3
Pod 4
Pod 1 Pod 2
Local Broker
Redis to Ambass
Pod 5
File uploader
Pod 6
Ring Buffer
Pod 7
Steady video
Pod 8
Video
segment
28. June 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
DEMO VIDEO (orchestrator)
https://www.youtube.com/watch?v=2x7jQTBUT5w&t=1145s
29. June 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Misaki Service-Mesh
30. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
What is Service
Mesh?
30
Traffic control (load balancing, routing rules, failovers etc...)
Policy control
Secure communications
Service monitoring (metrics, logs, traces)
https://www.abhishek-tiwari.com/a-sidecar-for-your-service-mesh/
A dedicated infrastructure layer mainly for microservices
31. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Service Mesh
Architecture
31
https://servicemesh.es/
32. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Why Service Mesh?
32
App Proxy
Service-mesh decouples network concerns
from applications.
https://philcalcado.com/img/service-mesh/mesh1.png
https://qiita.com/Ladicle/items/4ba57078128d6affadd5
Application developers can focus on their
business values/logics
Applications no longer needs to implement
distributed system practices (i.e timeouts, service
discoveries etc.)
33. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Technical Detail about
Misaki Service Mesh
Overview
33
Misaki Control Plane
Misaki Data Plane
34. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Technical Detail about
Misaki Service Mesh
Architecture
34
• Provides policies
and configurations
to each Envoy
• Connects individual
envoys into a
distributed system.
Routing the application
to appropriate service(s)
Envoy:
Cloud node
Edge node
Queue
Filter
Queue
Filter
Misaki Control
Plane
App A App B
App C
Proxy
35. June 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Misaki Control Plane
36. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Technical Detail about
Misaki Control Plane
What is needed to deploy an app?
36
K8s deployment manifest
Envoy Custom Resource Definitions (CRD)
37. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Technical Detail about
Misaki Control Plane
Deployment Manifest
37
Create, modify or delete K8s resources
(i.e pods, deployment)
Commonly written in .yaml
- App
- Envoy side-car
- Control plane configmap
- Initialization settings
38. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Technical Detail about
Misaki Control Plane
Custom Resource Definition
(CRD)
38
Custom k8s API endpoint that stores a collection of API objects
I.E route CRD contains route CRD contains all the route information values
39. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Technical Detail about
Misaki Control Plane
Misaki Control Plane
39
Custom k8s controller
Assign appropriate settings to envoy side-car of newly deployed application, or
when changes are made to an existing application
40. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Technical Detail about
Misaki Control Plane
Misaki Control Plane
40
App C
Prox
y
New k8s
deployment
Misaki Control
Plane
App C
CRD
Obtain Pod.Spec
information1
Retrieve App C’s CRD
Generates envoy setting
snapshot and sets it to the
envoy side-car of the new app
3
2
App B
Prox
y
App A
Prox
y
41. June 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Misaki Data Plane
42. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
What’s going on
normal service-mesh Data Plane?
42
https://www.slideshare.net/ThomasGraf5/accelerating-envoy-and-istio-with-cilium-and-the-linux-kernel
43. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
What’s going on
Misaki Data Plane?
43
Buffering HTTP Request from application when network disconnect or not
applicable network interface(3g, 4g, wifi etc).
Re-sends the HTTP Request/streaming-data to server when network available
again.
Store HTTP Request from application if network did not recover during buffering
duration.
44. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Prototype Outbounds
on Misaki Data Plane
44
volume
App
Prox
y
Prox
y
Server
Online1 Offline2
volume
App
Prox
y
Prox
y
Server
Name resolve
in /etc/hosts
Recover3
volume
App
Prox
y
Prox
y
Server
45. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Problems
45
Server footprint is not small
Not supported Dynamic DNS resolve
Network security problems
46. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Current Outbounds
on Misaki Data Plane
46
volume
App Proxy
volume
App Proxy
Local
DNS
Local
DNS
Online1 Offline2 Recover during buffering time3
App Proxy
Local
DNS
47. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Current Outbounds
on Misaki Data Plane
47
Recover after buffering time4
volume
App Proxy
Local
DNS
Replay
Async
response
volume
App Proxy
Local
DNS
Replay
Next request5
48. June 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
DEMO VIDEO (service mesh)
https://www.youtube.com/watch?v=2x7jQTBUT5w&t=1630s
49. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Troubles
49
Envoy does not suppose offline communications.
We need to customize Envoy code (written by C++11).
Network security problems
Create an original DNS Resolver (based on tomoyamachi/go-dnsmasq)
All component images need to build for cross platforms(ARM, AMD etc).
50. June 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Summary
51. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Summary
51
We developed a k8s-based connected vehicle platform prototype
Misaki service-mesh removes the need for developers to
handle network problems
But there is still many challenges to be solved.
52. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Challenges
52
Misaki service-mesh currently only support simple HTTP/1.1 and HTTP/2.0.
We want it to support more protocols (WebSocket, gRPC etc)
Misaki control plane needs to be more flexible
Our journey is just beginning!
Minimizing cpu/memory usage on edge devices.
53. May 2020 / Digital Innovation, Engineering Research & Development
ゥ DENSO CORPORATION All Rights Reserved.
Visit us
53
misaki-io
currently empty, but
we have a plan to
make it open source
this year
Thank You
Editor's Notes
こんにちは、デンソーのヨンと申します。
今日は「Kubernetesを用いた車両用クラスタ管理とvehicle service mesh」で発表いたします。
よろしくお願いいたします
Before I present on the technical details of Misaki, I would like to briefly talk about the architecture overview.
Our vehicle cluster consists of an Edge side and Cloud side.
The Edge side, would be your devices on board the vehicle. This is where we have the worker nodes.
On the cloud side, we have the master node and the k8s agent
On the right we have the orchestration components.
I will provide more details later.
So why have we chose to use K8s?
The main reason for using k8s, is so that we can better manage the resources we have in the vehicle
such as the high performance ECUs that will be made more available in the future.
We can do so by treating the ECU as k8s worker nodes
Of course, these ECUs will not be able to influence the basic operations such as driving and braking.
One such possible high-spec ECU would be the nvida jetson AGX Xavier.
We will be using this in our demonstration today.
K8s provides us with more flexibility in resource management.
In a scenario where you have a high-spec car with very power on-vehicle devices, you would be able to run all 3 application, A B C on the vehicle, or edge side.
But what if we want to bring this experience down to a low-spec car that would not have a powerful on-vehicle device?
With k8s, we can harness the resource on the cloud.
For the low-spec car, we can deploy only application A which could be the minimum requirement.
Apps B and C could be deployed to the cloud server instead.
We can run the same applications for both the high-spec and low-spec cars, even if the edge resources are not enough
Using this idea, we can also change the type of vehicle that we are deploying the applications to, and even the cloud servers that we would want to run on, such as AWS, Azure, Google, etc.
Now, I would like to present about the technical details of Misaki.
Misaki comprises two major components
Misaki Orchestrator
And the Misaki Service Mesh
Misaki Orchestrator
The orchestrator comprises 4 components
UI, API, Digital Twin and K8s agent
Misaki UI is user interface where users can deploy, modify and remove applications in the vehicle by choosing a helm chart.
The API will then generate a k8s manifest list based on the helm chart chosen.
We then have a digital twin that will synchronize the changes made on the UI and the vehicle.
This ensures that both Edge and Cloud sides will have the exact same state, hence the name Digital Twin.
Lastly, the k8s agent will apply the manifest to the cluster based on what is reflected on the digital twin.
Through this implementation, we will be able to do an intuitive application deployment without directly accessing the devices in the vehicle.
Now, I would like to show a demonstration on Misaki Ochestrator
Before that, allow me to briefly explain to you the operations of the UI.
In this scenario,
We currently have a service called CAN-uploader for prius HV deployed
We will be deleting this service from the UI and deploying a new service
The new service will be uploading video files to a S3 bucket
すでにデプロイされてるセットがあって、まずそれを削除します
削除すると、Terminatingになりました。
画面にも何も表示されません
video upload用のセットをdeployします。
misakiではhelmというツールをつかってdeployを管理しています。いまはバージョンの指定や、設定値の変更をしてます
workingになったので確認すると、kubernetes cluster上にコンテナが増えて、事前に設定したセットがWebの画面上に表示されます
リロードすると、動画が正常にアップロードされました
ダウンロードしたファイルを確認すると車載器からの動画データが確認できます
Before jumping in to the technical details, allow me to give you a brief introduction to service mesh.
So what is a service mesh?
It is a dedicated infrastructure layer mainly for microservices that has the following purpose
Traffic control, such as load balancing, routing, failover etc
Policy control
Service monitoring such as metric logging
And most importantly, providing secure communication
Before jumping in to the technical details, allow me to give you a brief introduction to service mesh.
So what is a service mesh?
It is a dedicated infrastructure layer mainly for microservices that has the following purpose
Traffic control, such as load balancing, routing, failover etc
Policy control
Service monitoring such as metric logging
And most importantly, providing secure communication
I will now present about the Misaki Service Mesh
The Misaki service mesh comprises two components
Misaki Control plane
And Misaki Proxy
The following is our architecture overview for Misaki-service mesh
We have a control plane, which will provide policies and configuration to the each envoy
The envoy is deployed together with the application as a side-car
This envoy sidecar will handle all the routing.
In addition, we have a queue filter that handles request in event of disconnection.
In our implementation, we require a few components before an app can be deployed successfully
Firstly, a k8s deployment manifest
As well as the envoy custom resource definition yaml
The deployment manifest is used to create, modify or delete k8s resources such as pods and deployment
It is usually written in .yaml
For our implementation, the manifest should contain the application you wish to deploy, the envoy side-car, a configmap for Misaki control plane and the container initialization settings
The custom resource definition or CRD is a custom k8s api endpoint that stores a collection of API objects
For example, the route CRD contains all the route information value such as route name, and virtual hosts names.
I will now present about the Misaki Control plane.
Misaki control plane is a custom k8s controller that uses the Envoy CRD
Its main purpose is to automatically assign the appropriate envoy settings to a newly deployed application, or when a new envoy CRD is applied for an existing app
As such, users no longer need to manually assign the envoy settings such as Pod IP every time an app is deployed or changes are made
I will now hand over the time to my colleague, Amachi-san, who will be explaining about Queue Filter.