openyurtio / openyurt

OpenYurt - Extending your native Kubernetes to edge(project under CNCF)

Home Page:https://openyurt.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question]How to enable YurtCoordinater?如何启用YurtCoordinater

XSR-WatchPioneer opened this issue · comments

What happened:
我想启用YurtCoordinater,官方文档说要给yurthub添加参数--enable-coordinator = true,但是配置YurtStaticSet文件或是修改yurthub.yaml都无效
I want to enable YurtCoordinater and the official documentation says to add a parameter to yurthub --enable-coordinator = true, but neither configuring the YurtStaticSet file nor modifying yurthub.yaml works.
我已经启用了nodepool,显示状态正常
I have enabled nodepool and the display is fine

NAME               TYPE   READYNODES   NOTREADYNODES   AGE
edge-nodepool-01   Edge   5            0               3d

配置YurtStaticSet文件
首先是通过配置YurtStaticSet文件,使用kubectl edit yss yurt-hub -n kube-system修改yurtstaticset,随后集群新增了一个pod,名为 yss-upgrade-worker-yurt-hub-xsr-node004-5d6b48774,状态为error
I modify the YurtStaticSet by configuring the yurtstaticset file and using the kubectl edit yss yurt- hub-n kube-system. Then a pod is added to the cluster. The name is yss-upgrade-worker-yurt-hub-xsr-node004-5d6b48774, and the status is error
该pod的日志显示
pod log shows:
Error: unknown command "static-pod-upgrade" for "node-servant"
Run 'node-servant --help' for usage.
修改yurthub.yaml
改为对每个边缘节点修改/etc/kubernetes/manifests/yurthub.yaml,添加参数--enable-coordinator = true,集群的pod并没有任何变化
我没有看到名字包含Coordinater的pod
I turn to modify/etc/kubernetes manifests/yurthub yaml of every edge node, add parameters - the enable - coordinator = true, The pod of the cluster has not changed at all
I don't see a pod whose name includes Coordinater
Environment:

  • OpenYurt version:1.4
  • Kubernetes version (use kubectl version):1.23.6
  • OS (e.g: cat /etc/os-release):ubuntu server 20.04
  • Kernel (e.g. uname -a):
  • Install tools:按照官网快速开始安装
  • Others:

help

--enable-coordinator is one of neccessary steps when using yurt-coordinator, this option makes the yurthub aware of the existence of yurt-coordinator and start to work with it.
Another important thing is to deploy the yurt-coordinator, that's why you did not see the instance in your cluster. You can deploy the yurt-coordinator with helm, and you can find relative charts here.

--enable-coordinator is one of neccessary steps when using yurt-coordinator, this option makes the yurthub aware of the existence of yurt-coordinator and start to work with it. Another important thing is to deploy the yurt-coordinator, that's why you did not see the instance in your cluster. You can deploy the yurt-coordinator with helm, and you can find relative charts here.

Thanks for reminding me, but my problem still hasn't been solved.
感谢提醒,但我的问题还是没有解决。

I first modify every edge node with /etc/kubernetes/manifests/yurthub yaml, add parameters--enable-coordinator = true then use the helm deployed yurt - the coordinator, the command is
helm upgrade --install yurt-coordinator -n kube-system openyurt/yurt-coordinator
我首先对每个边缘节点修改/etc/kubernetes/manifests/yurthub.yaml,添加参数--enable-coordinator = true,然后使用helm部署了yurt-coordinator,命令如下
helm upgrade --install yurt-coordinator -n kube-system openyurt/yurt-coordinator

I saw resource named yurtappdaemon.apps.openyurt.io/yurt-coordinator, but still don't see the yurt - coordinator related pod
我在集群中看到了名为yurtappdaemon.apps.openyurt.io/yurt-coordinator的资源,但是依然没有看到与yurt-coordinator相关的pod

Could you tell me exactly what I should do?
您能否告诉我具体应该怎么做?

My cluster has 1 cloud node and 5 edge nodes, and I created a nodepool named edge-nodepool-01 and added them all to it
我的集群有1个云节点和5个边缘节点,建立了一个名为edge-nodepool-01的节点池,并将节点都添加到里面了

This is the configuration yaml file for the node pool
这是节点池的配置yaml文件

apiVersion: apps.openyurt.io/v1beta1
kind: NodePool
metadata:
  name: edge-nodepool-01
spec:
  type: Edge
  hostNetwork: true
  annotations:
    apps.openyurt.io/example: edge-nodepool_01
  labels:
    apps.openyurt.io/example: edge-nodepool_01

This is the status of the node pool
这是节点池的状态

xsr_master@xsr-master:~$ kubectl get nodepool
NAME               TYPE   READYNODES   NOTREADYNODES   AGE
edge-nodepool-01   Edge   5            0               28d