当前位置:网站首页>kubernetes 二进制安装(v1.20.16)(五)验证 master 部署
kubernetes 二进制安装(v1.20.16)(五)验证 master 部署
2022-06-11 12:53:00 【看、未来】
文章目录
状况
书接上文:kubernetes 二进制安装(v1.20.16)(四)部署 master 停了一天没有更新,因为出了点状况,在排查。
检查集群组件状态
生成连接集群证书配置
cd /opt/TLS/k8s/ssl
cat > admin-csr.json <<EOF
{
"CN": "admin",
"hosts": [],
"key": {
"algo": "rsa",
"size": 2048
},
"names": [
{
"C": "CN",
"L": "BeiJing",
"ST": "BeiJing",
"O": "system:masters",
"OU": "System"
}
]
}
EOF生成连接证书
[[email protected] ssl]# cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=ca-config.json -profile=kubernetes admin-csr.json | cfssljson -bare admin
....
#查看已生成的证书
[[email protected] ssl]# ll admin*
-rw-r--r-- 1 root root 1009 Apr 3 14:52 admin.csr
-rw-r--r-- 1 root root 229 Apr 3 14:52 admin-csr.json
-rw------- 1 root root 1679 Apr 3 14:52 admin-key.pem
-rw-r--r-- 1 root root 1399 Apr 3 14:52 admin.pem生成kubeconfig文件
cd /opt/TLS/k8s/cfg
# 设置集群参数
kubectl config set-cluster kubernetes \
--certificate-authority=/opt/kubernetes/ssl/ca.pem \
--embed-certs=true \
--server=https://192.168.190.147:6443 \
--kubeconfig=/opt/TLS/k8s/cfg/config
# 设置客户端认证参数
kubectl config set-credentials cluster-admin \
--client-certificate=/opt/TLS/k8s/ssl/admin.pem \
--client-key=/opt/TLS/k8s/ssl/admin-key.pem \
--embed-certs=true \
--kubeconfig=/opt/TLS/k8s/cfg/config
#设置上下文参数
kubectl config set-context default \
--cluster=kubernetes \
--user=cluster-admin \
--kubeconfig=/opt/TLS/k8s/cfg/config
#设置默认上下文
kubectl config use-context default --kubeconfig=/opt/TLS/k8s/cfg/config分发文件
mkdir /root/.kube
scp /opt/TLS/k8s/cfg/config /root/.kube/config查看集群组件状态
#通过kubectl工具查看当前集群组件状态
[[email protected] cfg]# kubectl get cs
Warning: v1 ComponentStatus is deprecated in v1.19+
NAME STATUS MESSAGE ERROR
scheduler Healthy ok
etcd-0 Healthy {"health":"true"}
controller-manager Healthy ok
etcd-2 Healthy {"health":"true"}
etcd-1 Healthy {"health":"true"}
#输出以上信息说明Master节点组件运行正常我在排查的过程中添加了一个 apiserver 向外部访问的 client 证书,然后重新部署了一遍。 所以如果说你们部署到现在出现了失败,及时私信我,教程到这里还是没有问题的。
边栏推荐
- 马斯克称自己不喜欢做CEO,更想做技术和设计;吴恩达的《机器学习》课程即将关闭注册|极客头条...
- 如何同步openstack RDO源至本地进行离线安装
- 不谈赛道,不聊风口,开源数据库巨头Cassandra如何在国内讲好“新故事” | C位面对面
- I am a graduating doctor majoring in mathematics. How should I choose an offer?
- Application of "knowing things by learning" behavior time series modeling in the identification of social drainage black production
- kubernetes 二进制安装(v1.20.15)(七)加塞一个工作节点
- 苹果将造搜索引擎?
- @How to resolve controller and requestmapping
- The end of an era! After ten years, Wu Enda's classic machine learning course closed its registration this month and launched a new course
- Stone technology: R & D strength and excellent quality help upgrade the sweeping robot industry
猜你喜欢
![[background interaction] select to bind the data transferred in the background](/img/4d/ef3517a2b3f28f14ad87f16780e246.png)
[background interaction] select to bind the data transferred in the background

【滤波器】基于matlab时变维纳滤波器设计【含Matlab源码 1870期】

Seckill multi-level cache ----- product details page

4K投影儀哪款性價比最高,當貝X3 Pro高亮128G存儲618值得看

Adobe Premiere foundation - batch material import sequence - variable speed and rewind (recall) - continuous action shot switching - subtitle requirements (13)

31W contest question bonus! When AI for Science collides with the "pilot Cup", what sparks will be generated?
![[interface] view the interface path and check the interface](/img/b2/8c7645c8f915a9c8cec21bf2937298.png)
[interface] view the interface path and check the interface

PADS使用之绘制原理图

Condition debug of pycharm

【后台交互】select 绑定后台传递的数据
随机推荐
App manual signature of openharmony standard system
31W contest question bonus! When AI for Science collides with the "pilot Cup", what sparks will be generated?
Search without data after paged browsing
火山引擎云数据库 veDB 在字节内部的业务实践
经营养生理疗馆要注意什么问题?
美容院管理系统如何解决门店运营的三大难题?
TeaTalk·Online 演讲实录 | 圆满完结!安全上云,选对数据迁移策略很重要
两件小事,感受到了和大神的差距
tf. Data (II) -- parallelization tf data. Dataset generator
Netstat command details
【信号去噪】基于稀疏性 (BEADS) 实现色谱基线估计和去噪附matlab代码和论文
长连接简介
启封easy QF PDA帮助企业提升ERP的管理水平
How to optimize SEO on the mobile terminal? Do you need to optimize GoogleSEO on the mobile terminal for a separate m domain name?
母婴店的利润来源有哪些?
求你了,不要再在对外接口中使用枚举类型了!
QQ pulls up Alipay H5 payment function
Dbutil auxiliary class, manual commit transaction, metadata
What are the profit sources of mother and baby stores?
Ways to double the summer performance of natatoriums