Deploying with binary

Deploying KubeEdge with binary is used to test, never use this way in production environment.

Limitation

  • Need super user rights (or root rights) to run.

Setup Cloud Side (KubeEdge Master Node)

Create CRDs

  1. kubectl apply -f https://raw.githubusercontent.com/kubeedge/kubeedge/master/build/crds/devices/devices_v1alpha2_device.yaml
  2. kubectl apply -f https://raw.githubusercontent.com/kubeedge/kubeedge/master/build/crds/devices/devices_v1alpha2_devicemodel.yaml
  3. kubectl apply -f https://raw.githubusercontent.com/kubeedge/kubeedge/master/build/crds/reliablesyncs/cluster_objectsync_v1alpha1.yaml
  4. kubectl apply -f https://raw.githubusercontent.com/kubeedge/kubeedge/master/build/crds/reliablesyncs/objectsync_v1alpha1.yaml
  5. kubectl apply -f https://raw.githubusercontent.com/kubeedge/kubeedge/master/build/crds/router/router_v1_ruleEndpoint.yaml
  6. kubectl apply -f https://raw.githubusercontent.com/kubeedge/kubeedge/master/build/crds/router/router_v1_rule.yaml

Prepare config file

  1. # cloudcore --minconfig > cloudcore.yaml

please refer to configuration for cloud for details.

Run

  1. # cloudcore --config cloudcore.yaml

Run cloudcore -h to get help info and add options if needed.

Setup Edge Side (KubeEdge Worker Node)

Prepare config file

  • generate config file

    1. # edgecore --minconfig > edgecore.yaml
  • get token value at cloud side:

    1. # kubectl get secret -nkubeedge tokensecret -o=jsonpath='{.data.tokendata}' | base64 -d
  • update token value in edgecore config file:

    1. # sed -i -e "s|token: .*|token: ${token}|g" edgecore.yaml

The token is what above step get.

please refer to configuration for edge for details.

Run

If you want to run cloudcore and edgecore at the same host, run following command first:

  1. # export CHECK_EDGECORE_ENVIRONMENT="false"

Start edgecore:

  1. # edgecore --config edgecore.yaml

Run edgecore -h to get help info and add options if needed.

最近更新于 Jan 11, 2022