Open kevin-wangzefeng opened 2 years ago
Initial idea -- we can wrap Kind for implementing this tool:
/cc @fisherxu @gy95
Technically feasible, by test,
# bin/kind create cluster --config example.yaml --image kindest/node:latest
output is like below
Creating cluster "kind" ...
â Ensuring node image (kindest/node:latest) đŧ
â Preparing nodes đĻ đĻ đĻ
â Writing configuration đ
â Starting control-plane đšī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸ī¸
â Installing CNI đ
â Installing StorageClass đž
â Joining worker nodes đ
Set kubectl context to "kind-kind"
You can now use your cluster with:
kubectl cluster-info --context kind-kind
Have a nice day! đ
â Starting KubeEdge đ
â Joining edge nodes đ
# kubectl get node -owide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
kind-control-plane Ready control-plane,master 71s v1.23.4 172.18.0.2 <none> Ubuntu 21.04 4.15.0-169-generic containerd://1.5.2
kind-edge-node Ready agent,edge 49s v1.22.6-kubeedge-v1.11.0-beta.0.102+138bc34e64e008 172.18.0.3 <none> Ubuntu 21.04 4.15.0-169-generic remote://1.5.2
kind-worker Ready <none> 48s v1.23.4 172.18.0.4 <none> Ubuntu 21.04 4.15.0-169-generic containerd://1.5.2
example.yaml is like below
# cat example.yaml
# this config file contains all config fields with comments
# NOTE: this is not a particularly useful config file
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
# patch the generated kubeadm config with some extra settings
kubeadmConfigPatches:
- |
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
evictionHard:
nodefs.available: "0%"
# patch it further using a JSON 6902 patch
kubeadmConfigPatchesJSON6902:
- group: kubeadm.k8s.io
version: v1beta2
kind: ClusterConfiguration
patch: |
- op: add
path: /apiServer/certSANs/-
value: my-hostname
# 1 control plane node and 1 worker and 1 edge-node
nodes:
# the control plane node config
- role: control-plane
# the workers
- role: worker
# the edge nodes
- role: edge-node
updated the above description
source codes ref: https://github.com/gy95/kind/tree/release-v0.11
What would you like to be added/modified: A tool that easily spin up a multi-node KubeEdge environment (and better on just one machine).
Why is this needed:
For app development cases, developers need an easy way to get a multi-node KubeEdge environment, so that they can focus on the application or other upper-layer platform development.
Differenct to EdgeMark which uses hollow edge node, all the components need to be really running and serving.
Local-up-cluster.sh
is more a script for kubeedge/kubeedge develops to dev/test the KubeEdge core platform itself.