Commit 8452f778 by ChongmingDu

update doc

parent 68ba0a67
1. 安装阿里云k8s yum源
1. 安装阿里云k8s yum源(全部机器)
1. 安装阿里云k8s yum源
1. 安装阿里云k8s yum源(全部机器)
```
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
......@@ -18,15 +18,16 @@ yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes
systemctl enable --now kubelet
```
2. 调整kernel参数(二层的网桥在转发包时也会被iptables的FORWARD规则所过滤)
2. 调整kernel参数(二层的网桥在转发包时也会被iptables的FORWARD规则所过滤)(全部机器)
```
cat <<EOF > /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-iptables=1
EOF
sysctl --system
```
3. 启动kubelet
3. 启动kubelet(全部机器)
```
systemctl daemon-reload
systemctl restart kubelet
......@@ -44,4 +45,8 @@ sudo chown $(id -u):$(id -g) $HOME/.kube/config
6. 之后会在命令行里返回如下命令。复制,粘贴到跑agent的服务器运行,即可完成
```
kubeadm join <master-ip>:<master-port> --token <token> --discovery-token-ca-cert-hash sha256:<hash>
```
7. 运行网络组件(全部机器)
```
kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/a70459be0084506e4ec919aa1c114638878db11b/Documentation/kube-flannel.yml
```
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment