請先看完這篇文章 在 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
- 那我好奇,為什麼 kubeadm 會去找 default gateway 那個 IP 地址?那 IP 地址有什麼功能?或是說?會被寫在 default via <IP> 的這個 IP,通常具備哪些能力
- 為啥要提到 init 也要提到 join? 這兩個指令功能重疊了?
- kubeadm init 按下去之後,後悔怎辦?就是說,我想 Cluster 打掉,重新創建新的
- kubectl taint nodes --all node-role.kubernetes.io/control-plane-????
我記得這指令是要把某 node 加上 tains,怎麼會是移除 taint
- CRI Plugin 是其中一個 Plugin?你這話啥意思?你是說 containerd 裡面其實有超多 plugin?
啟用 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
如果成功會看到如下的輸出: