k8s使用crio的一些问题

背景:有台opensuse 15.4 Leap系统的物理机需要接入原k8s集群

opensuse提供的kubelet默认采用crio,抛弃了dockershim,kubeadm加入集群后发现几个问题:

  1. kubeproxy的镜像拉不下来,因为内网非https镜像配置的方式和docker不一样。需要修改/etc/crio/crio.conf.d/00-default.conf中insecure_registries,加入内网镜像配置;
  2. 加入集群后get pods和get nodes看来状态正常,但是该节点的pod和其它pod网络不通,经排查为flannel操作iptables报权限不足。需要修改flannel的daemonset配置,securityContext – privileged 配置改为true,重启该节点flannel后正常工作;
        securityContext:
          capabilities:
            add:
            - NET_ADMIN
          privileged: true

3. 部分使用到ping等功能的pod工作不正常,因为docker默认有NET_RAW配置,crio中默认已移除此配置,需要修改该pod对应的securityContext,capabilities – add: NET_RAW

        securityContext:
          capabilities:
            add:
            - NET_RAW

4. 如需在节点上查看pod状态,管理镜像等操作,需要使用crictl,如crictl ps、crictl images

关于nginx proxy_pass

proxy_pass的目标地址,如果不带path,表示只代理域名,url和参数部分不会变(把请求的path拼接到proxy_pass目标域名之后作为代理的URL)

如果在目标地址后带path,则表示把请求url的path中location匹配成功的部分剪切掉之后再拼接到proxy_pass目标地址

例如:

location /iam/fakepath

  1. proxy_pass http://192.168.1.2:8080/gw/test
  2. proxy_pass http://192.168.1.2:8080

当url为http://xxx.xxx/iam/fakepath/a/b/c时,1访问的upstream url为http://192.168.1.2:8080/gw/test/a/b/c,2访问的upstream url为http://192.168.1.2:8080/iam/fakepath/a/b/c

坑在这里:当proxy_pass后面只带“/”时很容易看错,导致访问地址错误;

声声慢

分享视频 来自:九尾《陈艺鹏《声声慢(国粤双语版)》》 https://c.y.qq.com/base/fcgi-bin/u?__=1dojAw7jfbX3

别具一格

apigw开发进行中

https://tixbay.net/gw/health.api.gw/1.0

持续6h的siege测试结果
Transactions: 11872683 hits
Availability: 100.00 %
Elapsed time: 21599.13 secs
Data transferred: 249.10 MB
Response time: 0.09 secs
Transaction rate: 549.68 trans/sec
Throughput: 0.01 MB/sec
Concurrency: 49.47
Successful transactions: 11872683
Failed transactions: 0
Longest transaction: 2.61
Shortest transaction: 0.00

五年陈的 Weex,聊聊它的过去现在和未来

知乎上关于Weex的现状和发展,很中肯的一篇文章
https://zhuanlan.zhihu.com/p/373582962

密码保护:TiDB 学习要点

此内容受密码保护。如需查阅,请在下列字段中输入您的密码。

2022.02.02

瑞雪兆丰

楚天极目

10.3 周围看看

假期随便找个地方玩玩吧

祝我生日快乐!