From c96e24ac04517ee6c95986fa3ad6670607d99e2a Mon Sep 17 00:00:00 2001 From: hyp4293 <429302517@qq.com> Date: Wed, 22 May 2024 17:59:16 +0800 Subject: [PATCH] =?UTF-8?q?kubeedge=E9=83=A8=E7=BD=B2=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E4=BC=98=E5=8C=96=EF=BC=9A=E8=BE=B9=E7=BC=98?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E8=B5=84=E6=BA=90=E7=B4=A7=E5=BC=A0=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=AD=A3=E5=B8=B8=E9=83=A8=E7=BD=B2=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: hyp4293 <429302517@qq.com> --- docs/setup/install-with-keadm.md | 17 +++++++++++++++++ .../current/setup/install-with-keadm.md | 18 ++++++++++++++++++ 2 files changed, 35 insertions(+) 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` 进行云端组件安装。