随笔分类 -  Kubernetes

摘要:原文链接:https://www.cnblogs.com/gaorong/p/16939111.html informer cache中的数据是只读的, 任何修改都先deepcopy informer cache中的数据是只读的, 任何修改都应该先deepcopy出来,然后提交apiserver, 阅读全文
posted @ 2023-10-15 10:49 salami_china 阅读(371) 评论(0) 推荐(0) 编辑
摘要:参考文档:https://zhuanlan.zhihu.com/p/450140876 简单总结一下 CNI 相关。 k8s 的 kubelet 在启动一个容器之前,会先做一些预先检查以及 csi 的操作 然后 kubelet 调用 CRI 的接口,通过 grpc 的方式和 CRI runtime 阅读全文
posted @ 2022-12-29 18:00 salami_china 阅读(128) 评论(0) 推荐(0) 编辑
摘要:查看pod使用的内存: #kubectl top pod -nkube-system | grep manager manager-7c5849fbc-bhmmn 5m 155Mi manager-7c5849fbc-bsv77 5m 161Mi POD内RSS查看: bash-4.4# cat / 阅读全文
posted @ 2021-11-26 16:45 salami_china 阅读(5571) 评论(0) 推荐(0) 编辑
摘要:原文链接: https://www.cnblogs.com/xuxinkun/p/11785521.html https://blog.csdn.net/qq_32641153/article/details/100614499 liveness主要用来确定何时重启容器。liveness探测的结果会 阅读全文
posted @ 2021-11-01 11:47 salami_china 阅读(250) 评论(0) 推荐(0) 编辑
摘要:官方文档:https://kubernetes.io/zh/docs/concepts/services-networking/ingress/ Ingress 是什么? Ingress 公开了从集群外部到集群内服务的 HTTP 和 HTTPS 路由。 流量路由由 Ingress 资源上定义的规则控 阅读全文
posted @ 2021-10-28 10:32 salami_china 阅读(77) 评论(0) 推荐(0) 编辑
摘要:仓库: https://github.com/heptiolabs/healthcheck.git https://pkg.go.dev/github.com/heptiolabs/healthcheck#section-readme healthcheck 实现了一个开箱即用的Kubernetes 阅读全文
posted @ 2021-10-19 10:42 salami_china 阅读(427) 评论(0) 推荐(0) 编辑
摘要:kubernetes 官网链接: https://v1-18.docs.kubernetes.io/zh/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/ 项目参考: https://github.com/NVID 阅读全文
posted @ 2021-09-29 12:16 salami_china 阅读(148) 评论(0) 推荐(0) 编辑
摘要:参考链接:https://www.cnblogs.com/charlieroro/p/11112526.html 1.实现了对golang map的key的处理,如计算交集,并集等。 package main import ( "fmt" "k8s.io/apimachinery/pkg/util/ 阅读全文
posted @ 2021-09-28 19:58 salami_china 阅读(312) 评论(0) 推荐(0) 编辑
摘要:源码路径:https://github.com/kubernetes/client-go/blob/master/examples/leader-election/main.go /* Copyright 2018 The Kubernetes Authors. Licensed under the 阅读全文
posted @ 2021-08-23 20:23 salami_china 阅读(78) 评论(0) 推荐(0) 编辑
摘要:参考链接:https://github.com/kubernetes/sample-controller/blob/master/docs/controller-client-go.md 阅读全文
posted @ 2021-08-19 19:54 salami_china 阅读(57) 评论(0) 推荐(0) 编辑
摘要:一:Informer 作用 Kubernetes设计了Informer这个机制,用来作为控制器跟apiserver交互的桥梁,它主要有两方面的作用: 1)依赖Etcd的List&Watch机制,在本地维护了一份所关心的API对象的缓存。Etcd的Watch机制能够使客户端及时获知这些对象的状态变化, 阅读全文
posted @ 2021-08-19 16:24 salami_china 阅读(444) 评论(0) 推荐(0) 编辑
摘要:参考链接:https://blog.csdn.net/anqixiang/article/details/114435934 curl https://127.0.0.1:6443/api/v1/nodes \ --cacert /etc/kubernetes/pki/ca.crt \ --cert 阅读全文
posted @ 2021-08-06 15:02 salami_china 阅读(451) 评论(0) 推荐(0) 编辑
摘要:参考链接: https://www.cnblogs.com/centos-python/articles/10886525.html https://blog.csdn.net/tiger435/article/details/78489369 https://www.ziji.work/kuber 阅读全文
posted @ 2021-07-29 19:28 salami_china 阅读(69) 评论(0) 推荐(0) 编辑
摘要:四个POD流量分流,iptables 规则如下 -A KUBE-SVC-W6WAXM5BH6NL6XVI -m comment --comment "default/stilton:http" -m statistic --mode random --probability 0.2500000000 阅读全文
posted @ 2021-07-19 14:59 salami_china 阅读(287) 评论(0) 推荐(0) 编辑
摘要:字段定义如下: // NetworkPolicySpec provides the specification of a NetworkPolicy type NetworkPolicySpec struct { // Selects the pods to which this NetworkPo 阅读全文
posted @ 2021-07-16 15:16 salami_china 阅读(125) 评论(0) 推荐(0) 编辑
摘要:问题现象: The node was low on resource: ephemeral-storage. Container rama-manager was using 104Ki, which exceeds its request of 0. 原因磁盘空间占用过多。 解决思路参考链接: h 阅读全文
posted @ 2021-07-16 10:26 salami_china 阅读(2308) 评论(0) 推荐(0) 编辑
摘要:问题:default-scheduler 0/1 nodes are available: 1 node(s) had taint {node-role.kubernetes.io/master: }, that the pod didn't tolerate. 解决:kubectl taint n 阅读全文
posted @ 2021-07-01 20:13 salami_china 阅读(1445) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示