miaoyun+Rancher+K8S学习与实践


rancher 部署应用 记录

1.rancher中快速部署应用 http://blog.zhenglin.work/k8s/deploy_app_in_rancher.html https://www.cnblogs.com/ExMan/p/13719195.html

kubectl 常用的命令总结 http://blog.zhenglin.work/k8s/kubectl-user-instruction.html

2.修改pods数量 Global/user-cluster, Edit进入集群编辑页面, 点 ‘Edit as YAML’ 按钮,在YAML文件中找到111-112附近,内容如下:

111    #          # 修改节点最大 Pod 数量
112    #           max-pods: '250' 

把112这一行的注释去掉即可。

3.Kubernetes 外部 IP Service 类型(浮动IP:Floating IP + Anycast IP) https://segmentfault.com/a/1190000023567011 Rancher容器网络-Floating IP解决方案 http://www.2cto.com/net/201704/619681_2.html 浮动IP,负载平衡器或Rancher的最佳做法是什么? https://forums.rancher.com/t/floating-ips-load-balancers-or-what-would-be-the-best-practice-in-rancher/8819 https://docs.projectcalico.org/networking/add-floating-ip

单节点只能起109个容器,这个怎么改呀 https://github.com/k3s-io/k3s/issues/697 Ksd: 如果你是 curl安装的,你就添加一个 INSTALL_K3S_EXEC="--kubelet-arg=max-pods=1022" Ksd: https://docs.rancher.cn/docs/k3s/installation/install-options/how-to-flags/_index#%E7%A4%BA%E4%BE%8B-b%EF%BC%9Ainstall_k3s_exec 你在 K3S systemd 的配置文件中添加 --kubelet-arg=max-pods=1022 k3s.service的这个文件

[Service]
Type=notify
EnvironmentFile=/etc/systemd/system/k3s.service.env
KillMode=process
Delegate=yes
# Having non-zero Limit*s causes performance problems due to accounting overhead
# in the kernel. We recommend using cgroups to do container-local accounting.
LimitNOFILE=1048576
LimitNPROC=infinity
LimitCORE=infinity
TasksMax=infinity
TimeoutStartSec=0
Restart=always
RestartSec=5s
ExecStartPre=-/sbin/modprobe br_netfilter
ExecStartPre=-/sbin/modprobe overlay
ExecStart=/usr/local/bin/k3s \
    server \
 '--kubelet-arg=max-pods=1022' \

master 和agent节点都需要改是吧? 对 rke续签CA和全部服务证书报的错 答:rke cert rotate --rotate-ca

页面列表

ITEM_HTML