当前位置:网站首页>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 .
边栏推荐
猜你喜欢
![[arcgis] City relevance analysis](/img/f4/454266e1ed586240bce9a7f36aa52e.png)
[arcgis] City relevance analysis

Some transformation thoughts of programmers after they are 35 years old

Tawang food industry insight | China's dairy market analysis, competition pattern, development trend and thinking

Does it affect children to wear Bluetooth headsets? How to protect children's ear health

【信号处理】数字信号处理Matlab设计附GUI界面和报告

InfoQ 极客传媒 15 周年庆征文|移动端开发之动态排行【MUI+Flask+MongoDB】

求你了,不要再在对外接口中使用枚举类型了!

面试造航母,入职拧螺丝,工资...

字节真的是宇宙尽头吗?

On the continuing Life of Distributed Locks - - Distributed Locks Based on redis
随机推荐
自定义Terraform-Providers(Terraform Plugin Framework)-04
如何同步openstack RDO源至本地进行离线安装
I am a graduating doctor majoring in mathematics. How should I choose an offer?
[background interaction] select to bind the data transferred in the background
Hashicopy之nomad应用编排方案08(检测Job)
Ecplise cannot connect to SQL Server
关于#php#的问题:php写的原来的部署环境是在phpstudy里面进行部署的,php+MySQL+Apache但是由于每次都得保证电脑开着
[arcgis] City relevance analysis
Terraform + Ansible实现基础设施及配置管理
微软再曝“丑闻”:在办公室看 VR 黄片,“HoloLens 之父”即将离职!
如何学会花钱
InfoQ 极客传媒 15 周年庆征文|移动端开发之动态排行【MUI+Flask+MongoDB】
想要实现在时序场景下“远超”通用数据库,需要做到哪几点?
ASCII, Unicode, and UTF-8
Simple score statistics
马斯克称自己不喜欢做CEO,更想做技术和设计;吴恩达的《机器学习》课程即将关闭注册|极客头条...
Today in history: Apple II comes out; Microsoft acquires gecad; The scientific and technological pioneer who invented the word "software engineering" was born
Deep learning and CV tutorial (14) | image segmentation (FCN, segnet, u-net, pspnet, deeplab, refinenet)
From real-time computing to streaming data warehouse, where will Flink go next?
About uni app configuration, app does not display the top title bar setting