K8s API 核心对象 —— client-go
· ☕ 3 分钟
API 入口
Client Sets
接收变更通知和缓存(Informers and Caching)
Client Sets
可以 watch 变更,但一般我们用更高级的 Informers
,因为它有缓存、索引等功能。
- Lister :被应用调用,返回缓存中的数据列表
- Informer:监听器
Informer 有两个功能
Client Sets
Client Sets
可以 watch 变更,但一般我们用更高级的 Informers
,因为它有缓存、索引等功能。
Informer 有两个功能
you can also create a chart with dependencies to other charts (a.k.a. umbrella chart) which are completely external using the requirements.yaml
file.
https://codefresh.io/docs/docs/new-helm/helm-best-practices/
最近由于工作需要,重新系统回顾 Kubernetes 的编程。发现《Programming Kubernetes》这书写得比较系统。于是边学,边记录一些重点。
本文状态:草稿
|
|
desiredReplicas = ceil[currentReplicas * ( currentMetricValue / desiredMetricValue )]
currentMetricValue 为相关 pod 的 metric 平均数。
VirtualService:
|
|
DestinationRule :
|
|
使用 sourceLabels
规则,可以根据源 pod 的 label 进行路由。这里用了 version
这个 label。即根据pod的应用版本进行路由。
这样的路由规则实际是使用于发起调用方的 sidecar。