You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
539 B
32 lines
539 B
3 years ago
|
# kubernetes 集群证书过期处理
|
||
|
|
||
|
## 查看证书到期时间
|
||
|
|
||
|
```bash
|
||
|
kubeadm alpha certs check-expiration
|
||
|
```
|
||
|
|
||
|
## 修改时间使证书暂时有效
|
||
|
|
||
|
```bash
|
||
|
date -s '0000-00-00'
|
||
|
```
|
||
|
|
||
|
## 重新分发证书
|
||
|
|
||
|
```bash
|
||
|
kubeadm alpha certs renew all
|
||
|
```
|
||
|
|
||
|
## 重启服务,重载证书
|
||
|
|
||
|
```bash
|
||
|
docker ps | grep -v pause | grep -E "etcd|scheduler|controller|apiserver" | awk '{print $1}' | awk '{print "docker","restart",$1}' | bash
|
||
|
ntpdate pool.ntp.org
|
||
|
```
|
||
|
|
||
|
## 更新用户配置
|
||
|
|
||
|
```bash
|
||
|
cp /etc/kubernetes/admin.conf ~/.kube/config
|
||
|
```
|