本篇內(nèi)容主要講解“k8s1.14環(huán)境的搭建”,感興趣的朋友不妨來(lái)看看。本文介紹的方法操作簡(jiǎn)單快捷,實(shí)用性強(qiáng)。下面就讓小編來(lái)帶大家學(xué)習(xí)“k8s1.14環(huán)境的搭建”吧!
成都創(chuàng)新互聯(lián)主營(yíng)富蘊(yùn)網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營(yíng)網(wǎng)站建設(shè)方案,app軟件定制開(kāi)發(fā),富蘊(yùn)h5小程序開(kāi)發(fā)搭建,富蘊(yùn)網(wǎng)站營(yíng)銷(xiāo)推廣歡迎富蘊(yùn)等地區(qū)企業(yè)咨詢(xún)
1. 4臺(tái)虛擬機(jī) (CentOS Linux release 7.2.1511 (Core) )
192.168.130.211 master
192.168.130.212 node1
192.168.130.213 node2
192.168.130.214 node3
2. 設(shè)置服務(wù)器hostname
2.1 設(shè)置本機(jī) hostnamectl set-hostname master
2.2 vim /etc/hosts
192.168.130.211 master
192.168.130.212 node1
192.168.130.213 node2
192.168.130.214 node3
2.3 reboot
3.關(guān)閉防火墻、selinux和swap
systemctl stop firewalld systemctl disable firewalld setenforce 0 sed -i "s/^SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config swapoff -a sed -i 's/.*swap.*/#&/' /etc/fstab
4.配置內(nèi)核參數(shù),將橋接的IPv4流量傳遞到iptables的鏈
cat > /etc/sysctl.d/k8s.conf <5.配置國(guó)內(nèi)yum源
yum install -y wget mkdir /etc/yum.repos.d/bak && mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/bak wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.tencent.com/repo/centos7_base.repo wget -O /etc/yum.repos.d/epel.repo http://mirrors.cloud.tencent.com/repo/epel-7.repo yum clean all && yum makecache6.配置國(guó)內(nèi)Kubernetes源
cat </etc/yum.repos.d/kubernetes.repo [kubernetes] name=Kubernetes baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/ enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg EOF 6.配置 docker 源
wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker-ce.repo到此,相信大家對(duì)“k8s1.14環(huán)境的搭建”有了更深的了解,不妨來(lái)實(shí)際操作一番吧!這里是創(chuàng)新互聯(lián)網(wǎng)站,更多相關(guān)內(nèi)容可以進(jìn)入相關(guān)頻道進(jìn)行查詢(xún),關(guān)注我們,繼續(xù)學(xué)習(xí)!
文章名稱(chēng):k8s1.14環(huán)境的搭建
分享鏈接:http://weahome.cn/article/ghdjho.html