k8s閮ㄧ讲涔媦um瀹夎锛堥樋閲屼簯婧愶級
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了k8s閮ㄧ讲涔媦um瀹夎锛堥樋閲屼簯婧愶級相关的知识,希望对你有一定的参考价值。
鏍囩锛?a href='http://www.mamicode.com/so/1/iptable' title='iptable'>iptable
href led mct ali import 瑕佹眰 涓嬭浇 port瀹夎master鑺傜偣
瀹夎鍓嶇殑鍑嗗宸ヤ綔
銆€銆€鍏抽棴闃茬伀澧欏拰selinux
銆€銆€閰嶇疆hosts鏂囦欢
銆€銆€鍏抽棴swap锛?span style="color: #ff0000;">swapoff -a
绗竴姝ワ細涓嬭浇闃块噷浜戠殑kubernetes锛屼笅杞藉湴鍧€璇锋壘闃块噷浜戠殑銆傦紙濡備笅鍥撅級http://mirrors.aliyun.com/
vim /etc/yum.repos.d/kube.repo
[kubernetes]
name=kubernetes
enabled=1
baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64/
gpgcheck=1
gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg
wget https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
rpm --import rpm-package-key.gpg
yum repolist 锛堟洿鏂版湰鍦版簮锛?/p>
# 瀹夎docker-ce銆乲ubectl銆乲ubeadm銆乲ubelet銆俤ocker瀹夎鍙傝€?a href="https://developer.aliyun.com/mirror/docker-ce?spm=a2c6h.13651102.0.0.3e221b11Crrjs4">https://developer.aliyun.com/mirror/docker-ce?spm=a2c6h.13651102.0.0.3e221b11Crrjs4
锛屾垨姝eb鏈€涓嬮潰閾炬帴yum -y install kubectl kubeadm kubelet
echo "1" > /proc/sys/net/bridge/bridge-nf-call-iptables
echo "1" > /proc/sys/net/bridge/bridge-nf-call-ip6tables
vim /etc/sysconfig/kubelet
KUBELET_EXTRA_ARGS="--fail-swap-on=false"
绗簩姝ワ細鍒濆鍖栧墠璇疯繍琛宒ocker銆?/p>
systemct start docker
kubeadm init --pod-network-cidr=10.244.0.0/16 --service-cidr=10.96.0.0/12 --ignore-preflight-errors=Swap # 鍒濆鍖?/span>
姝ら敊璇槸涓绘満鐨勫悕绉颁笉绗﹀悎瑕佹眰銆傛洿鏂颁富鏈哄悕鏃㈠彲銆傚埆蹇樹簡涓绘満鍚嶄笌hosts淇濇寔涓€鑷淬€?/p>
璇蜂繚瀛樺ソ涓婇潰hash鍊肩殑鍛戒护锛屽洜涓簄odes鍔犲叆鏄鐢ㄥ埌hash鍊肩殑
瀹夎node鑺傜偣
銆愭湭瀹屽緟缁€?/p>
以上是关于k8s閮ㄧ讲涔媦um瀹夎锛堥樋閲屼簯婧愶級的主要内容,如果未能解决你的问题,请参考以下文章