keywords
一个新节点,如何加入k8s集群
background
按照1.安装前准备安装所需要应用,然后不知道怎么加入主节点。
analyze
加入主节点,很简单,让主节点生成的token和hash码。
kubeadm join 192.168.16.138:6443 --token abcdef.0123456789abcdef \
--discovery-token-ca-cert-hash sha256:f0759e0d352c1a5de4444782b4a676460b2ea7a2876fa0accab572b8629b72c8
solve
加入主节点后在观察tidb命名空间的pods
root@kubernets-master:~# watch kubectl get pods -n tidb -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
tidb-cluster-discovery-6b7f8d9954-d7pbp 1/1 Running 3 2d21h 10.244.122.222 kubernets-node1 <none> <none>
tidb-cluster-monitor-67f5d8d845-d58l6 3/3 Running 9 2d21h 10.244.102.127 kubernets-node2 <none> <none>
tidb-cluster-pd-0 1/1 Running 4 2d21h 10.244.122.225 kubernets-node1 <none> <none>
tidb-cluster-pd-1 1/1 Running 6 2d21h 10.244.102.68 kubernets-node2 <none> <none>
tidb-cluster-pd-2 1/1 Running 6 2d21h 10.244.221.211 volumes <none> <none>
tidb-cluster-tidb-0 2/2 Running 7 2d17h 10.244.221.210 volumes <none> <none>
tidb-cluster-tidb-1 2/2 Running 7 2d17h 10.244.221.208 volumes <none> <none>
tidb-cluster-tikv-0 1/1 Running 3 2d18h 10.244.221.209 volumes <none> <none>
tidb-cluster-tikv-1 1/1 Running 2 2d18h 10.244.122.221 kubernets-node1 <none> <none>
tidb-cluster-tikv-2 1/1 Running 2 2d18h 10.244.102.126 kubernets-node2 <none> <none>
网友评论