diff --git a/docs/setup/install-with-keadm.md b/docs/setup/install-with-keadm.md index f69e90e316..0119583c5d 100644 --- a/docs/setup/install-with-keadm.md +++ b/docs/setup/install-with-keadm.md @@ -97,6 +97,23 @@ keadm init --set server.advertiseAddress="THE-EXPOSED-IP" --set server.nodeName= If you are familiar with the helm chart installation, please refer to [KubeEdge Helm Charts](https://github.com/kubeedge/kubeedge/tree/master/manifests/charts). +**SPECIAL SCENARIO:** +In the case of insufficient qualifications for edge nodes, we need to label them to prevent some applications from extending to edge nodes. + +``` +kubectl get daemonset -n kube-system |grep -v NAME |awk '{print $1}' | xargs -n 1 kubectl patch daemonset -n kube-system --type='json' -p='[{"op": "replace","path": "/spec/template/spec/affinity","value":{"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"node-role.kubernetes.io/edge","operator":"DoesNotExist"}]}]}}}}]' + +``` + + +``` +kubectl get daemonset -n metallb-system |grep -v NAME |awk '{print $1}' | xargs -n 1 kubectl patch daemonset -n metallb-system --type='json' -p='[{"op": "replace","path": "/spec/template/spec/affinity","value":{"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"node-role.kubernetes.io/edge","operator":"DoesNotExist"}]}]}}}}]' + +``` + +Any daemonset cannot occupy the hardware resources of edge nodes. + + ### keadm manifest generate You can also get the manifests with `keadm manifest generate`. diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/setup/install-with-keadm.md b/i18n/zh/docusaurus-plugin-content-docs/current/setup/install-with-keadm.md index 13e3e7499e..65ac00517a 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/setup/install-with-keadm.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/setup/install-with-keadm.md @@ -50,6 +50,24 @@ KubeEdge cloudcore is running, For logs visit: /var/log/kubeedge/cloudcore.log 当您看到以上信息,说明 KubeEdge 的云端组件 cloudcore 已经成功运行。 +**特殊场景:** +边缘计算的硬件条件不好的情况,这里我们需要打上标签,让一些应用不扩展到edge节点上去。 + + +``` +kubectl get daemonset -n kube-system |grep -v NAME |awk '{print $1}' | xargs -n 1 kubectl patch daemonset -n kube-system --type='json' -p='[{"op": "replace","path": "/spec/template/spec/affinity","value":{"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"node-role.kubernetes.io/edge","operator":"DoesNotExist"}]}]}}}}]' + +``` + + +``` +kubectl get daemonset -n metallb-system |grep -v NAME |awk '{print $1}' | xargs -n 1 kubectl patch daemonset -n metallb-system --type='json' -p='[{"op": "replace","path": "/spec/template/spec/affinity","value":{"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"node-role.kubernetes.io/edge","operator":"DoesNotExist"}]}]}}}}]' + +``` + +凡是daemonset的都不可以去占用edge节点的硬件资源。 + + ### keadm beta init 如果您想要使用容器化方式部署云端组件 cloudcore ,您可以使用 `keadm beta init` 进行云端组件安装。