栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Kubernetes

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Kubernetes

  • 最低需求:要1台master宿主机 2台node节点机
  • 配置为:2C 4G 60GB
1.修改节点名称(ip和名称匹配很重要 一开始不要出错喔~)
cat >> /etc/hosts < 
2…关闭自动挂载 
 swapoff -a
sed -i '/ swap / s/^(.*)$/#1/g' /etc/fstab
3.关闭selinux以及防火墙
sed -ri 's#(SELINUX=).*#1disabled#' /etc/selinux/config
setenforce 0
systemctl disable firewalld && systemctl stop firewalld
4.开启内核对流量的转发
cat < /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.ip_forward=1
vm.max_map_count=262144
EOF
5.
modprobe br_netfilter
sysctl -p /etc/sysctl.d/k8s.conf
6.配置docker-ce.repo
curl -o /etc/yum.repos.d/Centos-7.repo http://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/docker-ce.repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
7.配置kubernetes.repo
cat < /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=http://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=0
repo_gpgcheck=0
gpgkey=http://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg
 http://mirrors.aliyun.com/kubernetes/yum/doc/rpm package-key.gpg
EOF
8.清除缓存并且重启配置
yum clean all && yum makecache
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/395663.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号