本篇內(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 <<EOF net.bridge.bridge-nf-call-ip6tables = 1 net.bridge.bridge-nf-call-iptables = 1 EOF sysctl --system
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 makecache
6.配置國(guó)內(nèi)Kubernetes源
cat <<EOF > /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í)!
本文標(biāo)題:k8s1.14環(huán)境的搭建
本文路徑:http://www.ekvhdxd.cn/article40/ghdjho.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供軟件開(kāi)發(fā)、外貿(mào)建站、營(yíng)銷(xiāo)型網(wǎng)站建設(shè)、網(wǎng)站策劃、品牌網(wǎng)站建設(shè)、ChatGPT
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)