# docker容器作为k8s node,容器里面通过containerd拉起Pod。
cat <<EOF | kind create cluster --name kube-ovn --config -
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
kubeProxyMode: ipvs
disableDefaultCNI: true
ipFamily: ipv4
apiServerAddress: 127.0.0.1
apiServerPort: 0
podSubnet: "10.16.0.0/16"
serviceSubnet: "10.96.0.0/12"
kubeadmConfigPatches:
- |
kind: ClusterConfiguration
metadata:
name: config
etcd:
local:
dataDir: "/root/etcd"
nodes:
- role: control-plane
image: kindest/node:v1.27.0
- role: worker
image: kindest/node:v1.27.0
- role: worker
image: kindest/node:v1.27.0
EOF
# 安装kube-ovn
wget https://raw.githubusercontent.com/kubeovn/kube-ovn/release-1.10/dist/images/install.sh
bash install.sh
# 集群内导入ubuntu镜像,可用于部署业务容器。
kind load docker-image ubuntu:23.10 --name kube-ovn
标签:容器,kind,kube,集群,k8s,ovn From: https://www.cnblogs.com/WJQ2017/p/18173227