mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-08-10 16:37:34 +00:00
fix(content): harden copy-paste safety examples
This commit is contained in:
@@ -186,8 +186,8 @@ $ sudo kubeadm init \
|
||||
```bash
|
||||
...
|
||||
[addons] Applied essential addon: CoreDNS
|
||||
I1116 12:35:13.270407 86677 request.go:538] Throttling request took 181.409184ms, request: POST:https://192.168.199.100:6443/api/v1/namespaces/kube-system/serviceaccounts
|
||||
I1116 12:35:13.470292 86677 request.go:538] Throttling request took 186.088112ms, request: POST:https://192.168.199.100:6443/api/v1/namespaces/kube-system/configmaps
|
||||
I1116 12:35:13.270407 86677 request.go:538] Throttling request took 181.409184ms, request: POST:https://<CONTROL_PLANE_HOST>:6443/api/v1/namespaces/kube-system/serviceaccounts
|
||||
I1116 12:35:13.470292 86677 request.go:538] Throttling request took 186.088112ms, request: POST:https://<CONTROL_PLANE_HOST>:6443/api/v1/namespaces/kube-system/configmaps
|
||||
[addons] Applied essential addon: kube-proxy
|
||||
|
||||
Your Kubernetes control-plane has initialized successfully!
|
||||
@@ -204,8 +204,8 @@ Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
|
||||
|
||||
Then you can join any number of worker nodes by running the following on each as root:
|
||||
|
||||
kubeadm join 192.168.199.100:6443 --token cz81zt.orsy9gm9v649e5lf \
|
||||
--discovery-token-ca-cert-hash sha256:5edb316fd0d8ea2792cba15cdf1c899a366f147aa03cba52d4e5c5884ad836fe
|
||||
kubeadm join <CONTROL_PLANE_HOST>:6443 --token <TOKEN> \
|
||||
--discovery-token-ca-cert-hash sha256:<DISCOVERY_TOKEN_CA_CERT_HASH>
|
||||
```
|
||||
|
||||
#### node 工作节点
|
||||
@@ -217,12 +217,14 @@ $ systemctl enable containerd
|
||||
|
||||
$ systemctl start containerd
|
||||
|
||||
$ kubeadm join 192.168.199.100:6443 \
|
||||
--token cz81zt.orsy9gm9v649e5lf \
|
||||
--discovery-token-ca-cert-hash sha256:5edb316fd0d8ea2792cba15cdf1c899a366f147aa03cba52d4e5c5884ad836fe \
|
||||
$ kubeadm join <CONTROL_PLANE_HOST>:6443 \
|
||||
--token <TOKEN> \
|
||||
--discovery-token-ca-cert-hash sha256:<DISCOVERY_TOKEN_CA_CERT_HASH> \
|
||||
--cri-socket unix:///run/containerd/containerd.sock
|
||||
```
|
||||
|
||||
其中 `<CONTROL_PLANE_HOST>`、`<TOKEN>` 和 `<DISCOVERY_TOKEN_CA_CERT_HASH>` 应使用你自己的 `kubeadm init` 输出,不要复用示例值。
|
||||
|
||||
### 14.1.7 查看服务
|
||||
|
||||
所有服务启动后,通过 `crictl` 查看本地实际运行的容器。这些服务大概分为三类:主节点服务、工作节点服务和其它服务。
|
||||
|
||||
Reference in New Issue
Block a user