当前位置:网站首页>Kubernetes binary installation (v1.20.16) (V) verifying master deployment
Kubernetes binary installation (v1.20.16) (V) verifying master deployment
2022-06-11 13:16:00 【Look, future】
List of articles
condition
The book follows :kubernetes Binary installation (v1.20.16)( Four ) Deploy master Stopped for a day without updating , Because something happened , In the process of investigation .
Check the status of cluster components
Generate connection cluster certificate configuration
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"
}
]
}
EOFGenerate connection Certificate
[[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
....
# View generated certificates
[[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.pemGenerate kubeconfig file
cd /opt/TLS/k8s/cfg
# Set cluster parameters
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
# Set the client authentication parameters
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
# Setting context parameters
kubectl config set-context default \
--cluster=kubernetes \
--user=cluster-admin \
--kubeconfig=/opt/TLS/k8s/cfg/config
# Setting the default context
kubectl config use-context default --kubeconfig=/opt/TLS/k8s/cfg/configDistribute documents
mkdir /root/.kube
scp /opt/TLS/k8s/cfg/config /root/.kube/configCheck the cluster component status
# adopt kubectl Tool to view the current cluster component status
[[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"}
# Output the above information to explain Master The node component is working properly I added one in the process of troubleshooting apiserver Externally accessible client certificate , And then redeployed it . So if your deployment has failed so far , Send me a private message in time , There is still no problem with the tutorial .
边栏推荐
- Dbutil auxiliary class, manual commit transaction, metadata
- 【信号处理】数字信号处理Matlab设计附GUI界面和报告
- Will Apple build a search engine?
- How does Cassandra, an open source database giant, tell a "new story" in China? Face to face
- 详解C语言实参与形参的区别
- 启封easy QF PDA帮助企业提升ERP的管理水平
- QQ pulls up Alipay H5 payment function
- 想要实现在时序场景下“远超”通用数据库,需要做到哪几点?
- 常用字体介绍
- [filter] design of time-varying Wiener filter based on MATLAB [including Matlab source code 1870]
猜你喜欢
![[bug resolution] the form is paged to display the total data res.data total](/img/92/1ddde16d35465f8dd53ebf90e249b8.png)
[bug resolution] the form is paged to display the total data res.data total

How to write high-performance code (IV) optimize data access

Explain in detail the differences between real participation formal parameters in C language
![[arcgis] City relevance analysis](/img/f4/454266e1ed586240bce9a7f36aa52e.png)
[arcgis] City relevance analysis

微软再曝“丑闻”:在办公室看 VR 黄片,“HoloLens 之父”即将离职!

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

Live share experience

看不懂Kotlin源码?从Contracts 函数说起~

【信号去噪】基于稀疏性 (BEADS) 实现色谱基线估计和去噪附matlab代码和论文
![[ArcGIS]城市关联度分析](/img/f4/454266e1ed586240bce9a7f36aa52e.png)
[ArcGIS]城市关联度分析
随机推荐
Flink 从实时计算到流式数仓,下一步去往哪里?
[acwing 11. solution number of knapsack problem] 01 knapsack + 01 knapsack + understand the specific meaning of 01 knapsack
About PHP: the original deployment environment written by PHP is deployed in phpstudy, PHP + MySQL + Apache. However, the computer must be turned on every time
五年官司终败诉,万亿爬虫大军蠢蠢欲动
. 5 string
【信号处理】数字信号处理Matlab设计附GUI界面和报告
InfoQ geek media's 15th anniversary essay solicitation - dynamic ranking of mobile terminal development [mui+flask+mongodb]
Tawang food industry insight | China's dairy market analysis, competition pattern, development trend and thinking
Ecplise cannot connect to SQL Server
Go 如何减少供应链攻击?
tf.data(二) —— 并行化 tf.data.Dataset 生成器
[bug resolution] the form is paged to display the total data res.data total
关于#php#的问题:php写的原来的部署环境是在phpstudy里面进行部署的,php+MySQL+Apache但是由于每次都得保证电脑开着
ASCII, Unicode, and UTF-8
How about NFT market? Why is NFT so popular? How to build NFT platform
一个时代的终结!十年了吴恩达经典《机器学习》课程本月关闭注册,上线新课!...
面试造航母,入职拧螺丝,工资...
2022 年,捕捉这 12 个数据和分析趋势!
[background interaction] select to bind the data transferred in the background
Terraformer导入云上资源