忙于出差和项目,时间比较零碎,缺少时间输出更多的东西,但是学习不会拉下,目前主要从事的是私有云相关工作,和 Kubernetes 和 Istio 相关,相关看的和想的都是和这 2 者相关,当然也会记录其他内容,生活不止技术。
Compilation of public failure/horror stories related to Kubernetes
公开发表的关于 K8s 使用的失败经历的文章集合。
- 这篇文章 December 4 - NRE Labs Outage Post-Mortem 提到的:
- apiserver 链接不上,重启 kubelet 解决;重启很多次,是不是因为 node 版本不同导致的?
- etcd 问题, ,由于自动化安装工具 kubeadm 给 etcd 设置了 livenessprobe 导致 etcd 启动不了。
基于上述的文章,我的问题是:如何去运维一个 K8s 生产环境?要组建一个什么样的团队?要建设的着力点在于:
- 人!人!人!
- 自动化很重要
- 监控告警一定要跟上
- 运维体系和手册,例如:定期巡检,升级策略
Part 1: Zero Downtime Server Updates for Your Kubernetes Cluster
Part 2: Gracefully Shutting Down Pods in a Kubernetes Cluster
Part 3: Delaying Shutdown to Wait for Pod Deletion Propagation
Part 4:
零宕机升级 K8s 机器系列文章,利用:
- kubectl drain node
- Pod lifecycle hook: preStop hook + delay
- PodDisruptionBudgets:
相关的 K8s 工作机制:
一个 Pod 是如何被移除:
- The kubelet running the pod starts the shutdown sequence described in the previous post: kubelet 启动关闭 pod 过程
- The kube-proxy daemon running on all the nodes will remove the pod’s ip address from iptables: kube-proxy 从每个节点的 iptables 移除 pod ip
- The endpoints controller will remove the pod from the list of valid endponts, in turn removing the pod from the Service: endpoint controller 从 endpoints 移除 pod,从而从 service 移除 pod
案例分析:YC 主席 Sam Altman 给出十三条成功的建议:1. 复利化自己,2. 无比自信,3. 独立思考,4. 学会‘卖’,5. 轻松面对冒险,6. 专注,7. 努力,8. 胆大,9. 充满期望,10. 变得难以竞争,11. 建立人际网络,12. 拥有事物,13. 自我驱动
- Compound yourself 制造复利
- Have almost too much self-belief 乐观豁达 (optimistic leadership)
- Learn to think independently 独立思考 (inside out)
- Get good at “sales” 建立品牌,学会兜售
- Make it easy to take risks 我觉得说的其实是 take calculated risks 合理冒险
- Focus 专注
- Work hard 努力 (superpumped)
- Be bold 心存志远 (big bold bets)
- Be willful 敢想敢为
- Be hard to compete with 制造竞争壁垒
- Build a network 人脉
- You get rich by owning things 当业主,不打工
- Be internally driven 内在驱动
Canary Deployments on Kubernetes without Service Mesh
不用 Service Mesh,如何在 K8s 上实现金丝雀发布?基于新发布的 ingress controller 版本 0.21.0 支持金丝雀部署,通过提供如下 annotation:
- nginx.ingress.kubernetes.io/canary: "true"
- nginx.ingress.kubernetes.io/canary-by-header
- nginx.ingress.kubernetes.io/canary-by-cookie
- nginx.ingress.kubernetes.io/canary-weight
网友评论