kind部署k8s集群和kube-ovn

# 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

 

posted on 2024-05-05 09:29  王景迁  阅读(73)  评论(0编辑  收藏  举报

导航