miaoyun+Rancher+K8S学习与实践


rancher 部署应用 记录

<p>1.rancher中快速部署应用 <a href="http://blog.zhenglin.work/k8s/deploy_app_in_rancher.html">http://blog.zhenglin.work/k8s/deploy_app_in_rancher.html</a> <a href="https://www.cnblogs.com/ExMan/p/13719195.html">https://www.cnblogs.com/ExMan/p/13719195.html</a></p> <p>kubectl 常用的命令总结 <a href="http://blog.zhenglin.work/k8s/kubectl-user-instruction.html">http://blog.zhenglin.work/k8s/kubectl-user-instruction.html</a></p> <p>2.修改pods数量 Global/user-cluster, Edit进入集群编辑页面, 点 ‘Edit as YAML’ 按钮,在YAML文件中找到111-112附近,内容如下:</p> <pre><code class="language-bash">111 # # 修改节点最大 Pod 数量 112 # max-pods: '250' </code></pre> <p>把112这一行的注释去掉即可。</p> <p>3.Kubernetes 外部 IP Service 类型(浮动IP:Floating IP + Anycast IP) <a href="https://segmentfault.com/a/1190000023567011">https://segmentfault.com/a/1190000023567011</a> Rancher容器网络-Floating IP解决方案 <a href="http://www.2cto.com/net/201704/619681_2.html">http://www.2cto.com/net/201704/619681_2.html</a> 浮动IP,负载平衡器或Rancher的最佳做法是什么? <a href="https://forums.rancher.com/t/floating-ips-load-balancers-or-what-would-be-the-best-practice-in-rancher/8819">https://forums.rancher.com/t/floating-ips-load-balancers-or-what-would-be-the-best-practice-in-rancher/8819</a> <a href="https://docs.projectcalico.org/networking/add-floating-ip">https://docs.projectcalico.org/networking/add-floating-ip</a></p> <p>单节点只能起109个容器,这个怎么改呀 <a href="https://github.com/k3s-io/k3s/issues/697">https://github.com/k3s-io/k3s/issues/697</a> Ksd: 如果你是 curl安装的,你就添加一个 INSTALL_K3S_EXEC=&quot;--kubelet-arg=max-pods=1022&quot; Ksd: <a href="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">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</a> 你在 K3S systemd 的配置文件中添加 --kubelet-arg=max-pods=1022 k3s.service的这个文件</p> <pre><code class="language-bash">[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' \</code></pre> <p>master 和agent节点都需要改是吧? 对 rke续签CA和全部服务证书报的错 答:rke cert rotate --rotate-ca</p>

页面列表

ITEM_HTML