经验首页 前端设计 程序设计 Java相关 移动开发 数据库/运维 软件/图像 大数据/云计算 其他经验
当前位置:技术经验 » 数据库/运维 » Kubernetes » 查看文章
部署kubernetes(v1.16.2)集群—环境准备
来源:cnblogs  作者:李泉龙  时间:2019/10/29 10:14:04  对本文有异议

2019-10-28

1、安装epel源

  1. yum -y install epel-release

 

2、安装常用工具

  1. yum -y install wget nmap lsof iotop lrzsz ntpdate tree

 

3、修改服务器时区,时间同步

  1. rm -rf /etc/localtime
  2. cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
  1. ntpdate time1.aliyun.com
  2. crontab -e
  3. */3 * * * * /usr/sbin/ntpdate time1.aliyun.com >/dev/null 2>&1

4、关闭防火墙、selinux

 

  1. systemctl disable firewalld.service
  2. systemctl stop firewalld.service
  3. sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config && setenforce 0

 

5、关闭swap

  1. swapoff -a
  2. sed -i 's/^.*swap/#&/g' /etc/fstab

6、内核参数优化

 

  1. vim /etc/sysctl.conf
  2. net.ipv4.tcp_keepalive_time = 1200
  3. net.ipv4.ip_local_port_range = 1024 65000
  4. net.ipv4.tcp_max_syn_backlog = 8192
  5. net.ipv4.tcp_max_tw_buckets = 5000
  6. net.ipv4.tcp_tw_reuse = 1
  7. net.ipv4.tcp_tw_recycle = 1
  8. net.ipv4.tcp_fin_timeout = 30
  9. vm.max_map_count = 262144
  10. fs.file-max = 655350
  11. net.core.somaxconn=20480
  12. net.ipv4.ip_forward = 1
  13. sysctl -p

 

7、调整文件描述符和进程数量的限制

  1. vim /etc/security/limits.conf
  2. * soft nofile 655350
  3. * hard nofile 655350
  4. * soft nproc 655350
  5. * hard nproc 655350

8、重启服务器

 

原文链接:http://www.cnblogs.com/istio/p/11748466.html

 友情链接:直通硅谷  点职佳  北美留学生论坛

本站QQ群:前端 618073944 | Java 606181507 | Python 626812652 | C/C++ 612253063 | 微信 634508462 | 苹果 692586424 | C#/.net 182808419 | PHP 305140648 | 运维 608723728

W3xue 的所有内容仅供测试,对任何法律问题及风险不承担任何责任。通过使用本站内容随之而来的风险与本站无关。
关于我们  |  意见建议  |  捐助我们  |  报错有奖  |  广告合作、友情链接(目前9元/月)请联系QQ:27243702 沸活量
皖ICP备17017327号-2 皖公网安备34020702000426号