当前位置:网站首页>记录——kubeadm集群node节点加入
记录——kubeadm集群node节点加入
2022-06-23 16:15:00 【沾血的黄瓜丶】
记录——kubeadm集群node节点加入
1. node节点关闭防火墙安全机制,映射等
2. 查看master的docker版本并安装与其相同版本。
docker version
列出docker版本
yum list docker-ce --showduplicates|sort -r
加速器配置
cat << EOF >> /etc/docker/daemon.json { "registry-mirrors": ["https://q6e6fnms.mirror.aliyuncs.com"] } EOF
systemctl restart docke
3. 拉取组件
可在其他node查看镜像组件名称及标签。
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
registry.aliyuncs.com/google_containers/kube-proxy v1.15.0 d235b23c3570 23 months ago 82.4MB
registry.aliyuncs.com/google_containers/kube-apiserver v1.15.0 201c7a840312 23 months ago 207MB
registry.aliyuncs.com/google_containers/kube-controller-manager v1.15.0 8328bb49b652 23 months ago 159MB
registry.aliyuncs.com/google_containers/kube-scheduler v1.15.0 2d3813851e87 23 months ago 81.1MB
quay.io/coreos/flannel v0.11.0-amd64 ff281650a721 2 years ago 52.6MB
registry.aliyuncs.com/google_containers/coredns 1.3.1 eb516548c180 2 years ago 40.3MB
registry.aliyuncs.com/google_containers/pause 3.1 da86e6ba6ca1 3 years ago 742kB
registry.aliyuncs.com/google_containers/etcd 3.3.10 2c4adeb21b4f 2 years ago 258MB
默认是从k8s.gcr.io拉取镜像的,因为地址在国外,所以拉取不下来,可以为镜像打标签。
只需要吧阿里云的名字换成k8s.gcr.io即可
如:docker tag registry.aliyuncs.com/google_containers/pause:3.1 k8s.gcr.io/pause:3.1
- 安装kubelet、kubeadm
cat <<EOF > /etc/yum.repos.d/kubernetes.repo [kubernetes] name=Kubernetes baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64 enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg EOF
需要与其他节点版本一致,其他节点为1.15
kubelet --version
Kubernetes v1.15.0
新node执行
yum install -y kubelet-1.15.0-0 kubeadm-1.15.0 kubectl-1.15.0
systemctl daemon-reload && systemctl enable kubelet && systemctl restart kubelet
- master获取加入集群命令
kubeadm token create --print-join-command
回显
kubeadm join 192.168.100.110:6443 --token 0foltd.hk8asl73ovd6x0x7 --discovery-token-ca-cert-hash sha256:908dcdd4e76018da88d150d2fe442fbad20b13931e9c1dbe5b3f5d984e0ce35c
- node加入集群
执行master回显命令即可
kubeadm join 192.168.100.110:6443 --token 0foltd.hk8asl73ovd6x0x7 --discovery-token-ca-cert-hash sha256:908dcdd4e76018da88d150d2fe442fbad20b13931e9c1dbe5b3f5d984e0ce35c
- 在master 查看新加入的节点
kubectl get nodes
NAME STATUS ROLES AGE VERSION
master Ready master 8d v1.15.0
node1 Ready <none> 8d v1.15.0
node2 Ready <none> 8d v1.15.0
node3 Ready <none> 45m v1.15.0
问题
如果出现node状态为“Notready”,可以使用如下命令查看组件情况。
kubectl get pods -n kube-system
进一步排查
kubectl describe pods -n “加上名字”
边栏推荐
- Image reading: image open(ImgPath)
- 华为手机通过adb安装APK提示“签名不一致,该应用可能已被修改”
- Reading and writing JSON files by golang
- 图扑软件数字孪生挖掘机实现远程操控
- 二分查找法思路分析
- A number of individual stocks in Hong Kong stocks performed actively, triggering investors' speculation and concern about the recovery of the Hong Kong stock market
- The Google play academy team PK competition is in full swing!
- 亚朵更新招股书:继续推进纳斯达克上市,已提前“套现”2060万元
- [today in history] June 23: Turing's birthday; The birth of the founder of the Internet; Reddit goes online
- Thinking analysis of binary search method
猜你喜欢

查数据库中每张表的大小

元宇宙带来的社会结构和资本制度演变

Jetpack compose and material you FAQs

Code implementation of golang binary search method

Can the asemi fast recovery diodes RS1M, us1m and US1G be replaced with each other

Counter attack by flour dregs: MySQL 66 question! Suggested collection
NLP paper reading | improving semantic representation of intention recognition: isotropic regularization method in supervised pre training

NPM install problem solving (NVM installation and use)

Another breakthrough! Alibaba cloud enters the Gartner cloud AI developer service Challenger quadrant

Matlab: how to know from some data which data are added to get a known number
随机推荐
使用Jmeter进行性能测试及性能监控平台搭建
I successfully joined the company with 27K ByteDance. This interview notes on software testing has benefited me for life
Coatnet: marrying revolution and attention for all data sizes
How to select securities companies? Is it safe to open a mobile account?
Zhongda face sketch FERET database (cufsf)
三分钟学会如何找回mysql密码
根据年份获取第一天和最后一天
VGg download (.Net file and imagenet-vgg-verydeep-19)
出现Identify and stop the process that‘s listening on port 8080 or configure this application等解决方法
After the model is created, initialize the variables in con2d, convtranspose2d, and normalized batchnorm2d functions
官方零基础入门 Jetpack Compose 的中文课程来啦
JMeter stress testing tutorial
Can the asemi fast recovery diodes RS1M, us1m and US1G be replaced with each other
JS常见的报错及异常捕获
ABAP随笔-程序优化笔记
手机开户股票开户需要多久?在线开户安全么?
[today in history] June 23: Turing's birthday; The birth of the founder of the Internet; Reddit goes online
ELK日志收集系统部署
Jetpack compose and material you FAQs
如何选择示波器?这10点一定要考虑!