1、安装hybridnet
helm repo add hybridnet https://alibaba.github.io/hybridnet/
helm repo update
helm install hybridnet hybridnet/hybridnet -n kube-system --set init.cidr=10.244.0.0/16
2、master节点
添加标签,根据hybridnet-manager这个deploy添加
kubectl label nodes master1 node-role.kubernetes.io/master=""
kubectl label nodes master2 node-role.kubernetes.io/master=""
kubectl label nodes master3 node-role.kubernetes.io/master=""
2、创建network
参考文件:https://github.com/alibaba/hybridnet/wiki/VLAN-%E7%BD%91%E7%BB%9C
apiVersion: networking.alibaba.com/v1
kind: Network
metadata:
name: underlay-network1
spec:
netID: 0
type: Underlay
nodeSelector:
network: "underlay-nethost"
3、创建subnet
apiVersion: networking.alibaba.com/v1
kind: Subnet
metadata:
name: underlay-network1
spec:
network: underlay-network1
netID: 0
range:
version: "4"
cidr: "12.12.164.0/23"
gateway: "12.12.165.254" # 外部网关地址
start: "12.12.164.20"
end: "12.12.165.253"
4、node节点添加标签
根据第二步中的nodeSelector添加标签
kubectl label nodes node1 network=“underlay-nethost"
标签:kubectl,hybridnet,network,配置,label,io,underlay From: https://www.cnblogs.com/52shaidan/p/17346825.html