Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Bootes - Envoy Control Plane Kubernetes Control...
Search
Yuki Ito
June 20, 2020
Technology
1.1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Bootes - Envoy Control Plane Kubernetes Controller -
Yuki Ito
June 20, 2020
More Decks by Yuki Ito
See All by Yuki Ito
newmo の創業を支える Software Architecture と Platform Engineering
110y
5
3.8k
Modular Monolith Go Server with GraphQL Federation + gRPC
110y
1
1.2k
Modular Monolith + Go @ newmo
110y
1
1.3k
Go + GraphQL @ newmo
110y
3
1k
Architect / Platform Team at KAUCHE
110y
1
730
Cloud Run + Observability / Reliability @ KAUCHE
110y
0
690
Cloud Run CI/CD + QA @ KAUCHE
110y
1
690
Microservices on Cloud Run @ KAUCHE
110y
0
340
KAUCHE Loves Go
110y
0
550
Other Decks in Technology
See All in Technology
SDDの運用にめげずに向き合った話
sansantech
PRO
1
130
SREでアラート疲れを 解決しよう!
kairim0
1
200
生成AIを使って「人が」考える技術 ― AI時代の人機共想と実践ノウハウ|UNITT AC2026
ishiirikie
0
550
自主式軟體工廠
philipz
0
220
Incremental HTTP
kazuho
5
2.1k
Snapshot Testing in Practice: Predictable and Reliable SwiftUI Views
fespinoza
0
120
[2026 Oracle Technical Deep Dive] VMwareワークロードのOCI移行実践ガイド - OCVSでの継続利用からOCIコンピュートへの移行まで (2026年9月17日開催)
oracle4engineer
PRO
0
120
AI駆動開発、viviONの1年 ── うまくいったこと・いかなかったこと
vivion
0
260
AI時代に必要な脅威モデリング― 変化の速度に負けない理解とリスク判断
masakane55
4
1k
20260930_Gemma4_Hands-on
tsho
0
230
The seven pitfalls of AI (revised version)
ufried
0
270
[2026 Oracle Technical Deep Dive] AI時代のデータベース基盤をどう選ぶ? Exadata Database Serviceの選択肢と使い分け (2026年9月17日開催)
oracle4engineer
PRO
0
220
Featured
See All Featured
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
550
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
270
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
66k
How STYLIGHT went responsive
nonsquared
100
6.3k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
The browser strikes back
jonoalderson
0
1.8k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
390
How to build a perfect <img>
jonoalderson
1
6.1k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.1k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Transcript
Bootes - Envoy Control Plane Kubernetes Controller - Envoy Meetup
Tokyo #2 Yuki Ito
Merpay Architect Team Backend Engineer Yuki Ito
Agenda •What is Bootes? •Implementation •Use Case
Agenda •What is Bootes? •Implementation •Use Case
Bootes https://github.com/110y/bootes
Bootes Envoy Control Plane implemented as a... Kubernetes Custom Controller
Bootes: Overview Bootes Config Config Config
Bootes: Overview Bootes Config Config Config kube-apiserver ! kubectl
Motivation •Simple Control Plane •Full Envoy features •Kubernetes Custom Resource
Movement
e.g. Service Mesh Interface kind: TrafficSplit metadata: name: canary spec:
service: website backends: - service: website-v1 weight: 90 - service: website-v2 weight: 10
e.g. Crossplane apiVersion: database.gcp.crossplane.io/v1beta1 kind: CloudSQLInstance metadata: name: cloudsqlpostgresql spec:
forProvider: databaseVersion: POSTGRES_9_6 region: us-central1 settings: tier: db-custom-1-3840 dataDiskType: PD_SSD dataDiskSizeGb: 10
Agenda •What is Bootes? •Implementation •Use Case
Agenda •What is Bootes? •Implementation •Use Case
Implementation Envoy Control Plane Kubernetes Custom Controller " How Bootes
works
Implementation Envoy Control Plane Kubernetes Custom Controller " How Bootes
works
Envoy Control Plane Control Plane Config Config Config xDS API
Envoy Configurations •Listener •Route •Cluster •Endpoint
Envoy Configurations Listener Route Cluster Endpoint Endpoint Endpoint Endpoint Cluster
Envoy Configurations 0.0.0.0:5000 Listener Route Service-1 Cluster 10.28.1.11 10.28.1.12 10.28.1.13
10.28.1.14 Service-2 Cluster Path: /service-1 Path: /service-2
Static Configurations static_resources: listeners: - address: socket_address: protocol: TCP address:
0.0.0.0 port_value: 5000 #... clusters: - name: service-1 connect_timeout: 1s type: STRICT_DNS lb_policy: ROUND_ROBIN #... envoy.yaml
Static Configurations > envoy -c envoy.yaml
Problem of Static Configurations Though simplistic, fairly complicated deployments can
be created using static configurations and graceful hot restarts. https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/operations/dynamic_configuration
Dynamic Configurations Control Plane Route Listener Cluster xDS API
x Discovery Service API •Listener Discovery Service •Route Discovery Service
•Cluster Discovery Service •Endpoint Discovery Service
x Discovery Service API •Listener Discovery Service •Route Discovery Service
•Cluster Discovery Service •Endpoint Discovery Service
x Discovery Service API Control Plane Listener Listener Listener Listener
Discovery Service
x Discovery Service API Control Plane Cluster Cluster Cluster Cluster
Discovery Service
e.g. Cluster Discovery Service service ClusterDiscoveryService { rpc StreamClusters(stream discovery.v3.DiscoveryRequest)
returns (stream discovery.v3.DiscoveryResponse) { } rpc DeltaClusters(stream discovery.v3.DeltaDiscoveryRequest) returns (stream discovery.v3.DeltaDiscoveryResponse) { } rpc FetchClusters(discovery.v3.DiscoveryRequest) returns (discovery.v3.DiscoveryResponse) { } } https://github.com/envoyproxy/envoy/blob/master/api/envoy/service/cluster/v3/cds.proto cds.proto
x Discovery Service API •Listener Discovery Service •Route Discovery Service
•Cluster Discovery Service •Endpoint Discovery Service
Dynamic Configurations dynamic_resources: lds_config: api_config_source: api_type: GRPC grpc_services: - envoy_grpc:
cluster_name: lds-server cds_config: #... envoy.yaml
Dynamic Configurations dynamic_resources: lds_config: api_config_source: api_type: GRPC grpc_services: - envoy_grpc:
cluster_name: lds-server cds_config: #... envoy.yaml
Dynamic Configurations envoy.yaml static_resources: clusters: - name: lds-server connect_timeout: 1s
type: STRICT_DNS http2_protocol_options: {} load_assignment: cluster_name: lds-server endpoints: - lb_endpoints: - endpoint: address: socket_address: address: ... port_value: ...
Dynamic Configurations dynamic_resources: lds_config: api_config_source: api_type: gRPC grpc_services: - envoy_grpc:
cluster_name: lds-server cds_config: #... static_resources: clusters: - name: lds-server connect_timeout: 1s type: LOGICAL_DNS http2_protocol_options: {} load_assignment: cluster_name: lds-server endpoints: - lb_endpoints: - endpoint: address: socket_address: address: ... port_value: ... envoy.yaml
x Discovery Service API Control Plane Route Listener CDS LDS
RDS CDS
Problem of xDS API 0.0.0.0:5000 Listener Route Service-1 Cluster 10.28.1.11
10.28.1.12
Problem of xDS API 0.0.0.0:5000 Listener Route Service-1 Cluster 10.28.1.11
10.28.1.12 10.28.1.13 10.28.1.14 Service-2 Cluster
Problem of xDS API 0.0.0.0:5000 Listener Route Service-1 Cluster 10.28.1.11
10.28.1.12 10.28.1.13 10.28.1.14 Service-2 Cluster RDS CDS
Problem of xDS API 0.0.0.0:5000 Listener Route Service-1 Cluster 10.28.1.11
10.28.1.12 ❌ RDS
Problem of xDS API 0.0.0.0:5000 Listener Route Service-1 Cluster 10.28.1.11
10.28.1.12 10.28.1.13 10.28.1.14 Service-2 Cluster CDS
Problem of xDS API 0.0.0.0:5000 Listener Route Service-1 Cluster 10.28.1.11
10.28.1.12 10.28.1.13 10.28.1.14 Service-2 Cluster CDS RDS
Problem of xDS API To avoid downtime... 1. Cluster 2.
Endpoint 3. Listener 4. Route
Problem of xDS API Control Plane Route Listener CDS LDS
RDS CDS
Aggregated Discovery Service Control Plane Listener / Route / Cluster
/ Endpoint Aggregated Discovery Service
Aggregated Discovery Service service AggregatedDiscoveryService { rpc StreamAggregatedResources(stream DiscoveryRequest) returns
(stream DiscoveryResponse) { } rpc DeltaAggregatedResources(stream DeltaDiscoveryRequest) returns (stream DeltaDiscoveryResponse) { } } ads.proto https://github.com/envoyproxy/envoy/blob/master/api/envoy/service/discovery/v3/ads.proto
Aggregated Discovery Service dynamic_resources: cds_config: ads: {} lds_config: ads: {}
ads_config: api_type: GRPC grpc_services: - envoy_grpc: cluster_name: ads-server envoy.yaml
Aggregated Discovery Service dynamic_resources: cds_config: ads: {} lds_config: ads: {}
ads_config: api_type: GRPC grpc_services: - envoy_grpc: cluster_name: ads-server envoy.yaml
Aggregated Discovery Service Control Plane Listener / Route / Cluster
/ Endpoint Aggregated Discovery Service
Bootes uses ADS Bootes Route Listener Cluster kube-apiserver Aggregated Discovery
Service
go-control-plane envoyproxy/go-control-plane
go-control-plane import ( cache ".../go-control-plane/pkg/cache/v3" server ".../go-control-plane/pkg/server/v3" discovery ".../go-control-plane/envoy/service/discovery/v3" "google.golang.org/grpc"
) // ... snapshotCache := cache.NewSnapshotCache(...) server := server.NewServer(ctx, snapshotCache, ...) grpcServer := grpc.NewServer() lis, _ := net.Listen("tcp", ":8081") discovery.RegisterAggregatedDiscoveryServiceServer(grpcServer, server) grpcServer.Serve(lis) Minimum Implementation
go-control-plane import ( cache ".../go-control-plane/pkg/cache/v3" server ".../go-control-plane/pkg/server/v3" discovery ".../go-control-plane/envoy/service/discovery/v3" "google.golang.org/grpc"
) // ... snapshotCache := cache.NewSnapshotCache(...) server := server.NewServer(ctx, snapshotCache, ...) grpcServer := grpc.NewServer() lis, _ := net.Listen("tcp", ":8081") discovery.RegisterAggregatedDiscoveryServiceServer(grpcServer, server) grpcServer.Serve(lis) Minimum Implementation
go-control-plane Package "go-control-plane/envoy" envoy/config/cluster/v3/ ├── circuit_breaker.pb.go ├── circuit_breaker.pb.validate.go ├── cluster.pb.go
├── cluster.pb.validate.go ├── filter.pb.go ├── filter.pb.validate.go ├── outlier_detection.pb.go └── outlier_detection.pb.validate.go Go files generated from .proto
go-control-plane import ( cache ".../go-control-plane/pkg/cache/v3" server ".../go-control-plane/pkg/server/v3" discovery ".../go-control-plane/envoy/service/discovery/v3" "google.golang.org/grpc"
) // ... snapshotCache := cache.NewSnapshotCache(...) server := server.NewServer(ctx, snapshotCache, ...) grpcServer := grpc.NewServer() lis, _ := net.Listen("tcp", ":8081") discovery.RegisterAggregatedDiscoveryServiceServer(grpcServer, server) grpcServer.Serve(lis) Minimum Implementation
go-control-plane Package "go-control-plane/pkg/server" Server Implementation import ( server ".../go-control-plane/pkg/server/v3" discovery
".../go-control-plane/envoy/service/discovery/v3" "google.golang.org/grpc" // ... ) // ... server := server.NewServer(ctx, snapshotCache, ...) grpcServer := grpc.NewServer() discovery.RegisterAggregatedDiscoveryServiceServer(grpcServer, server) grpcServer.Serve(lis)
go-control-plane import ( cache ".../go-control-plane/pkg/cache/v3" server ".../go-control-plane/pkg/server/v3" discovery ".../go-control-plane/envoy/service/discovery/v3" "google.golang.org/grpc"
) // ... snapshotCache := cache.NewSnapshotCache(...) server := server.NewServer(ctx, snapshotCache, ...) grpcServer := grpc.NewServer() lis, _ := net.Listen("tcp", ":8081") discovery.RegisterAggregatedDiscoveryServiceServer(grpcServer, server) grpcServer.Serve(lis) Minimum Implementation
go-control-plane Package "go-control-plane/pkg/cache" { "envoy-1": { "clusters": [ "service-1": {...},
"service-2": {...} ], "listeners": [...], "routes": [...], "endpoints": [...], }, "envoy-2": {...}, ... } Configurations Cache for each Envoys
go-control-plane Package "go-control-plane/pkg/cache" snapshot := cache.NewSnapshot( "version-xxx", endpoints, clusters, routes,
listeners, //... ) snapshotCache.SetSnapshot("envoy-1", snapshot)
go-control-plane Config Config Config Cache (pkg/cache) Aggregated Discovery Service gRPC
Server (pkg/server) Update (cache.SetSnapshot)
go-control-plane Config Config Config Cache (pkg/cache) Aggregated Discovery Service gRPC
Server (pkg/server) Update (cache.SetSnapshot)
Implementation Envoy Control Plane Kubernetes Custom Controller " How Bootes
works
Implementation Envoy Control Plane Kubernetes Custom Controller " How Bootes
works
Kubernetes Custom Controller Bootes Config Config Config kube-apiserver Aggregated Discovery
Service ! kubectl apply -f cluster.yaml
Custom Resource Definition (CRD) ɾPod ɾReplicaSet ɾDeployment ɾService ɾIngress ɾHorizontalPodAutoscaler
ɾPodDisruptionBudget ... e.g. Istio ɾVirtualService ... e.g. SMI ɾTrafficSplit ... e.g. CrossPlane ɾCloudSQLInstance ... Native Resources Custom Resources + Extends Kubernetes using CRD
Bootes uses CRD ɾPod ɾReplicaSet ɾDeployment ɾService ɾIngress ɾHorizontalPodAutoscaler ɾPodDisruptionBudget
... ɾListener ɾRoute ɾCluster ɾEndpoint Native Resources Custom Resources + Extends Kubernetes using CRD
Bootes uses CRD cluster.yaml apiVersion: bootes.io/v1 kind: Cluster metadata: name:
example-cluster namespace: foo spec: config: name: example-cluster connect_timeout: 1s type: EDS lb_policy: ROUND_ROBIN http2_protocol_options: {} eds_cluster_config: eds_config: ads: {}
Bootes uses CRD cluster.yaml apiVersion: bootes.io/v1 kind: Cluster metadata: name:
example-cluster namespace: foo spec: config: name: example-cluster connect_timeout: 1s type: EDS lb_policy: ROUND_ROBIN http2_protocol_options: {} eds_cluster_config: eds_config: ads: {}
Bootes uses CRD cluster.yaml apiVersion: bootes.io/v1 kind: Cluster metadata: name:
example-cluster namespace: foo spec: config: name: example-cluster connect_timeout: 1s type: EDS lb_policy: ROUND_ROBIN http2_protocol_options: {} eds_cluster_config: eds_config: ads: {}
Bootes uses CRD cluster.yaml Any Envoy Cluster Config apiVersion: bootes.io/v1
kind: Cluster metadata: name: example-cluster namespace: foo spec: config: name: example-cluster connect_timeout: 1s type: EDS lb_policy: ROUND_ROBIN http2_protocol_options: {} eds_cluster_config: eds_config: ads: {}
Kubernetes Custom Controller Bootes Config Config Config kube-apiserver Aggregated Discovery
Service ! kubectl apply -f cluster.yaml
Kubernetes Custom Controller We can use any Kubernetes Ecosystem Tools
$
e.g. kustomize kustomize base-cluster.yaml dev-cluster.yaml prod-cluster.yaml
e.g. kpt ! awesome-cluster.yaml kpt pkg get ... !
Implementation Envoy Control Plane Kubernetes Custom Controller " How Bootes
works
Implementation Envoy Control Plane Kubernetes Custom Controller " How Bootes
works
How Bootes Works Bootes kube-apiserver ! kubectl apply -f example-cluster.yaml
Aggregated Discovery Service
How Bootes Works ! kubectl apply -f example-cluster.yaml
How Bootes Works apiVersion: bootes.io/v1 kind: Cluster metadata: name: example-cluster
namespace: a spec: workloadSelector: labels: app: foo config: # ... example-cluster.yaml
How Bootes Works apiVersion: bootes.io/v1 kind: Cluster metadata: name: example-cluster
namespace: a spec: workloadSelector: labels: app: foo config: # ... example-cluster.yaml
How Bootes Works example-cluster.yaml config: name: example-cluster connect_timeout: 1s type:
EDS lb_policy: ROUND_ROBIN http2_protocol_options: {} eds_cluster_config: eds_config: ads: {} # ...
How Bootes Works Bootes kube-apiserver ! kubectl apply -f example-cluster.yaml
JSON
How Bootes Works proto := &cluster.Cluster{} (&protojson.UnmarshalOptions{}).Unmarshal(json, proto) JSON (Proto)
google.golang.org/protobuf/encoding/protojson
How Bootes Works Bootes kube-apiserver ! kubectl apply -f example-cluster.yaml
JSON Aggregated Discovery Service
How Bootes Works Bootes Namespace: a Namespace: b app: foo
app: bar app: foo app: bar app: foo app: bar Namespace: c Looking up target Envoy (Pod)
How Bootes Works apiVersion: bootes.io/v1 kind: Cluster metadata: name: example-cluster
namespace: a spec: workloadSelector: labels: app: foo config: # ... example-cluster.yaml
How Bootes Works Bootes Namespace: a Namespace: b app: foo
app: bar app: foo app: bar app: foo app: bar Namespace: c Looking up target Envoy (Pod)
How Bootes Works apiVersion: bootes.io/v1 kind: Cluster metadata: name: example-cluster
namespace: a spec: workloadSelector: labels: app: foo config: # ... example-cluster.yaml
How Bootes Works Bootes Namespace: a Namespace: b app: foo
app: bar app: foo app: bar app: foo app: bar Namespace: c Looking up target Envoy (Pod)
How Bootes Works Bootes Namespace: a app: foo pod-xxx-333 app:
foo pod-xxx-222 app: foo pod-xxx-111
How Bootes Works Bootes kube-apiserver ! kubectl apply -f example-cluster.yaml
JSON Aggregated Discovery Service
Agenda •What is Bootes? •Implementation •Use Case
Agenda •What is Bootes? •Implementation •Use Case
Envoy Reverse Proxy Use case Pod microservice B Service Pod
Service Pod Service Pod microservice A !
Envoy Reverse Proxy Use case Pod microservice B Service Pod
Service Pod Service Pod microservice A ! CDS CDS CDS LDS RDS RDS RDS
Custom HTTP Filter { "microservice-A": "PR-1", "microservice-B": "PR-2" } microservice-A:
PR-1 microservice-B: PR-2 Request from APP Request to Upstream JWT Payload HTTP Header ɾɾɾ ɾɾɾ
Envoy Reverse Proxy Use case Pod microservice B Service Pod
Service Pod Service Pod microservice A ! CDS CDS CDS LDS RDS RDS RDS
Agenda •What is Bootes? •Implementation •Use Case