标签:clab directrouting IPIP 10.244 ff ipip Flannel DR flannel
Flannel IPIP DR 模式
一、环境信息
主机 |
IP |
ubuntu |
172.16.94.141 |
软件 |
版本 |
docker |
26.1.4 |
helm |
v3.15.0-rc.2 |
kind |
0.18.0 |
clab |
0.54.2 |
kubernetes |
1.23.4 |
ubuntu os |
Ubuntu 20.04.6 LTS |
kernel |
5.11.5 内核升级文档 |
二、安装服务
kind
配置文件信息
$ cat install.sh
#!/bin/bash
date
set -v
# 1.prep noCNI env
cat <<EOF | kind create cluster --name=clab-flannel-ipip-directrouting --image=kindest/node:v1.23.4 --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
disableDefaultCNI: true
podSubnet: "10.244.0.0/16"
nodes:
- role: control-plane
- role: worker
- role: worker
- role: worker
containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".registry.mirrors."harbor.dayuan1997.com"]
endpoint = ["https://harbor.dayuan1997.com"]
EOF
# 2.remove taints
controller_node=`kubectl get nodes --no-headers -o custom-columns=NAME:.metadata.name| grep control-plane`
kubectl taint nodes $controller_node node-role.kubernetes.io/master:NoSchedule-
kubectl get nodes -o wide
# 3.install necessary tools
# cd /opt/
# curl -o calicoctl -O -L "https://gh.api.99988866.xyz/https://github.com/containernetworking/plugins/releases/download/v0.9.0/cni-plugins-linux-amd64-v0.9.0.tgz"
# tar -zxvf cni-plugins-linux-amd64-v0.9.0.tgz
for i in $(docker ps -a --format "table {{.Names}}" | grep flannel)
do
echo $i
docker cp /opt/bridge $i:/opt/cni/bin/
docker cp /usr/bin/ping $i:/usr/bin/ping
docker exec -it $i bash -c "sed -i -e 's/jp.archive.ubuntu.com\|archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list"
docker exec -it $i bash -c "apt-get -y update >/dev/null && apt-get -y install net-tools tcpdump lrzsz bridge-utils >/dev/null 2>&1"
done
root@kind:~# ./install.sh
Creating cluster "clab-flannel-ipip-directrouting" ...
✓ Ensuring node image (kindest/node:v1.23.4)
标签:clab,directrouting,IPIP,10.244,ff,ipip,Flannel,DR,flannel
From: https://www.cnblogs.com/evescn/p/18371815