請先看完這篇文章 在 macbook 上安裝與使用 kubeadm

現在我們要使用 kubeadm 來建立一個 Cluster

Creating a cluster with kubeadm

If you join a node with a different architecture to your cluster, make sure that your deployed DaemonSets have container image support for this architecture.

Q&A

啟用 CRI Plugin

請見:附錄 - Troubleshooting - failed to create new CRI runtime service: validate service connection: validate CRI v1 runtime API for endpoint "unix:///var/run/containerd/containerd.sock": rpc error: code = Unimplemented desc = unknown service runtime.v1.RuntimeService

建立 Control Plane

sudo kubeadm init --pod-network-cidr=10.13.0.0/16 --control-plane-endpoint=my-instance:6443

如果成功會看到如下的輸出: