逐灵&木苏-阿里巴巴 K8S 超大规模实践经验客户端和服务端的同步机制 List & Watch优化 ETCD Cache Pod A V1 Pod A V2 Pod A V3 Reflector APIServer Watch Cache List & Watch Informer Reflector Store List & Watch• 网络抖动造成informer重新List & Watch List & Watch优化 网络抖动造成informer重新List & Watch List & Watch优化 Cache APIServer 5 9 11 13 Watch Cache Informer Store Kubelets Watch (rv=11 node=x) Too old version err rv=3 Bookmark rv=11• List & Get的通讯机制 Cache Read & Index APIServer Client List / Get ETCD rv=nil Page read Filter by condition• APIServer 缓存一致性读 • 索引支持动态新增 • Cache Ready Cache Read & Index APIServer Client list/get @t0 ETCD rv=nil 1. Get0 码力 | 33 页 | 8.67 MB | 6 月前3
k8s操作手册 2.3family="ipv4" source address="10.244.0.0/16" accept' # firewall-cmd --run�me-to-permanent # firewall-cmd --list-all ★如果有硬件交换机做ACL或基于云的安全组做访问控制,则可关闭服务器上的 防火墙软件 ⑨加载ipvs模块 # cat > /etc/modules-load.d/k8s-ipvs ③k8s集群初始化 # kubeadm version #先查看k8s版本 # GitVersion:"v1.19.4" # kubeadm config images list #查看k8s其他组件的docker镜像名,默认用 k8s.gcr.io/的镜像源地址 k8s.gcr.io/kube-apiserver:v1.19.4 k8s.gcr.io/kub KubeletConfigura�on cgroupDriver: systemd failSwapOn: False #保存,(修改蓝色字体的参数值及新增最后5行) # kubeadm config images list --config /etc/kubeadm-init.yaml #查看需要的镜 像 cof-lee.com:5443/k8s/kube-apiserver:v1.19.4 cof-lee0 码力 | 126 页 | 4.33 MB | 1 年前3
K8S安装部署开放服务yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo # 查看 docker-ce 安装包 yum list | grep docker-ce # 安装 docker-ce yum install docker-ce-19.03.12-3.el7 -y systemctl start docker 部署 k8s node 节点 Step1: k8s master 上查看/创建 token、生成证书摘要 kubeadm token list kubeadmin token create --ttl 0 kubeadm token list openssl x509 -pubkey -in /etc/kubernetes/pki/ca.crt | openssl rsa ["services","endpoints","secrets"] verbs: ["get","list","watch"] - apiGroups: ["extensions"] resources: ["ingresses"] verbs: ["get","list","watch"] - apiGroups: ["extensions"] resources:0 码力 | 54 页 | 1.23 MB | 1 年前3
Operator Pattern 用 Go 扩展 Kubernetes 的最佳实践如何获取到本地(内存中) Informer 启动后会通过 reflector 的 list & watch 机制获取某种资源的 全量 objects。list 可以简单理解为一个 HTTP GET 请求,watch 为一 个 HTTP/2 长连接 Cache 如何保持与 API Server 一致性 list & watch 机制中,list 获取 API Server 中数据的一份快照,并记 录 ResourceVersion 存消耗。 另一方面 informer 提供了同类型对象的共享机制,降低内存开销 近距离感受 list & watch 机制 Cache 本质及开发建议 相信 Cache 相信 cache 最终能提供所有的你想要的数据版 本,不会丢、也不会错 时刻记着 cache 是最终一致 在做任何读(get、list)操作时,不能假设读到 的是最新版本,也不能假设一次 reconcile 中始 终会读到同一个版本 终会读到同一个版本 避免写后读 同一个 controller,在一次 reconcile 中,避免写 (create、update、delete)完一个对象后马上去 读(get、list)最新版本,等controller-runtime 触发下一次 reconcile 遵循惯例开发模式 即 controller 用读 cache,UT 中不用 cache 附加题:Stale Cache 情况下0 码力 | 21 页 | 3.06 MB | 9 月前3
vmware组Kubernetes on vSphere Deep Dive KubeCon China VMware SIGout impossible worker nodes a. Filters are called predicates - extensible in code with a default list 7 Kubenetes scheduling What does the scheduler do: As pod are created, they are place in a queue predicates - extensible in code with a default list 2. Rank remaining nodes a. ranking is driven by priorities - this is extensible and configurable with a default list (e.g. zones) 8 Kubenetes scheduling predicates - extensible in code with a default list 2. Rank remaining nodes a. ranking is driven by priorities - this is extensible and configurable with a default list (e.g. zones) 9 Scheduling modifiers0 码力 | 25 页 | 2.22 MB | 1 年前3
VMware SIG Deep Dive into Kubernetes Schedulingout impossible worker nodes a. Filters are called predicates - extensible in code with a default list 7 Kubenetes scheduling What does the scheduler do: As pod are created, they are place in a queue - extensible in code with a default list 2. Rank remaining nodes a. ranking is driven by priorities - this is extensible and configurable with a default list (e.g. zones) 8 Kubenetes scheduling - extensible in code with a default list 2. Rank remaining nodes a. ranking is driven by priorities - this is extensible and configurable with a default list (e.g. zones) 9 Scheduling modifiers0 码力 | 28 页 | 1.85 MB | 1 年前3
KubeCon2020/微服务技术与实践论坛/Spring Cloud Alibaba 在 Kubernetes 下的微服务治理最佳实践-方剑class BaseLoadBalancer { … @Override public ListgetReachableServers() { return Collections. unmodifiableList(upServerList); } @Override public List getAllServers() { return Collections Collections. unmodifiableList(allServerList); } } public List getReachableServers() try { String tag = TrafficManagement.getTag(); List newServers = new ArrayList<>(); for(Server s : upServerList) 0 码力 | 27 页 | 7.10 MB | 1 年前3
Kubernetes Use it, Contribute to it, and Enjoy it!Working Group https://github.com/kubernetes/community/blob/master/sig-list.md SIGs/WGs Communication Github Slack Mailing list Zoom Discussion board Kubecons /meetups YouTube channel Communication ty https://discuss.kubernetes.io We are already here ! Github Slack YouTube channel Mailing list Zoom Discussion board Kubecons/meetups Roles https://github.com/kubernetes/community/blob/ma0 码力 | 45 页 | 3.11 MB | 1 年前3
Go Programming Pattern in Kubernetes Philosophyapi-server Etcd bind pod, node list pod GenericRuntime SyncPod CRI grpc dockershim remote (no-op) Sandbox Create Delete List Container Create Start Exec Image Pull List shim client api dockerd0 码力 | 29 页 | 2.12 MB | 1 年前3
深度解析CNCF社区⾸个基于Kubernetes的边缘计算平台KubeEdgecloud� Update pod� Kubectl get� Get result� 应⽤用场景:智能家居应⽤用⽣生命周期管理理� 后续规划� Release V1.0 Function List:(May 2019)� ➔ 云端和边缘端的开源实现。� ➔ 使⽤用 kubectl 从云端向边缘节点部署应⽤用。� ➔ 使⽤用 kubectl 从云端对边缘节点的应⽤用进⾏行行配置管理理和 ➔ 边缘节点在脱机时⾃自动恢复,并重新连接云端。� ➔ ⽀支持IoT设备通过Device twin 和 MQTT 协议与边缘节点 通信。� Release V2.0+ Function List:(TBD)� ➔ 使⽤用 KubeEdge 和 Istio 构建服务⽹网格。� ➔ 提⾼高 Kubedge 基础设施的性能和可靠性。� ➔ 在边缘端提供函数即服务(Function as 社区贡献� ➔ Official Website:https://kubeedge.io� ➔ Slack:https://kubeedge.slack.com/� ➔ Mailing List: https://groups.google.com/forum/#!forum/kubeedge� ➔ Github Repository:https://github.com/kubeedge/kubeedge�0 码力 | 20 页 | 2.08 MB | 1 年前3
共 26 条
- 1
- 2
- 3













