Cloud Native 11 min read

Quickly Spin Up an OpenYurt Edge‑Cloud Cluster with yurtctl

This guide walks you through preparing three Ubuntu 18.04 machines, building the yurtctl tool from the OpenYurt source, and using its init and join commands to create a control‑plane node, add cloud‑node and edge‑node workers, and verify component status in a fully functional OpenYurt cluster.

Alibaba Cloud Native
Alibaba Cloud Native
Alibaba Cloud Native
Quickly Spin Up an OpenYurt Edge‑Cloud Cluster with yurtctl

OpenYurt is Alibaba's first open‑source edge‑cloud native project that extends a native Kubernetes cluster with edge‑specific addons. To lower the entry barrier for developers unfamiliar with cloud‑native concepts, the community provides the yurtctl utility, which automates cluster creation and component deployment.

Environment Preparation

Three Ubuntu 18.04 machines: one control‑plane (also cloud‑node), one cloud‑node, and one edge‑node.

Docker installed on all hosts.

Swap disabled (e.g., swapoff -a).

Clone the OpenYurt repository and build yurtctl:

git clone https://github.com/openyurtio/openyurt.git
cd openyurt
export GOOS=linux GOARCH=amd64; make build WHAT=cmd/yurtctl

The binary is placed in _output/bin/ and its version can be checked with ./yurtctl --version (v0.4.1 in the example).

Initialize the Control‑Plane Node

Run the init sub‑command on the master node to deploy both native Kubernetes control‑plane components and OpenYurt management components:

./yurtctl init --image-repository=registry.cn-hangzhou.aliyuncs.com/google_containers \
  --kubernetes-version=v1.18.8 --pod-network-cidr=10.244.0.0/16

This creates an all‑in‑one control‑plane pod ( controlplane) and installs yurt-controller-manager, yurt-app-manager, and yurt-tunnel-server. After successful initialization, follow the printed instructions to copy admin.conf to $HOME/.kube/config and join additional nodes.

Join a Cloud‑Node

Execute the generated join command on the cloud‑node host, providing the master IP, token, and node type:

./yurtctl join 111.32.157.130:6443 \
  --token vowclg.k7059m0f0qbcebpg \
  --discovery-token-ca-cert-hash sha256:30846295ea024260bc3c4988507c4408e8756ca5440221e109fe8167f636f125 \
  --node-type=cloud-node

Verify the node appears as Ready with kubectl get nodes -l openyurt.io/is-edge-worker=false.

Join an Edge‑Node

Similarly, run the join command on the edge‑node, specifying --node-type=edge-node:

./yurtctl join 111.32.157.130:6443 \
  --token vowclg.k7059m0f0qbcebpg \
  --discovery-token-ca-cert-hash sha256:30846295ea024260bc3c4988507c4408e8756ca5440221e109fe8167f636f125 \
  --node-type=edge-node

Check the edge‑node status with kubectl get nodes -l openyurt.io/is-edge-worker=true and confirm that edge‑specific components ( yurt-hub, yurt-tunnel-agent) are Running.

Component Overview

controlplane

: all‑in‑one Kubernetes control‑plane deployed as a single pod. yurt-app-manager: provides workload unitization and management. yurt-controller-manager: manages node lifecycle, works with yurt-hub for edge autonomy. yurt-tunnel-server and yurt-tunnel-agent: enable cloud‑to‑edge operations over unstable networks. yurt-hub: edge‑node autonomy component that caches API responses and forwards requests to the kube‑apiserver.

Cleanup

To remove the cluster, run ./yurtctl reset on each node.

The guide demonstrates a complete local OpenYurt deployment, highlighting the ease of use provided by yurtctl while noting that further community contributions are needed to improve usability.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

KubernetesLinuxCluster SetupOpenYurtyurtctl
Alibaba Cloud Native
Written by

Alibaba Cloud Native

We publish cloud-native tech news, curate in-depth content, host regular events and live streams, and share Alibaba product and user case studies. Join us to explore and share the cloud-native insights you need.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.