Add docs on upgrading k3s and rotating certs.
This commit is contained in:
1 parent
a19a55318d
commit
e466328b45
2 files changed
+90
No files matched your search
@@ -0,0 +1,37 @@
|
||||
# Rotating k8s certs
|
||||
|
||||
Problem: k3s client certs, including the admin cert expire after 1 year.
|
||||
|
||||
To see cert:
|
||||
```
|
||||
cat ~/.kube/config | grep client-certificate-data | cut -f2 -d : | tr -d ' ' | base64 -d | openssl x509 -text -out -
|
||||
```
|
||||
|
||||
```
|
||||
ssh jimmy@192.168.1.103
|
||||
sudo systemctl stop k3s
|
||||
sudo k3s certificate rotate
|
||||
sudo systemctl start k3s
|
||||
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
sudo cp /etc/rancher/k3s/k3s.yaml ~/j7s-cluster.yaml
|
||||
sudo chown jimmy:jimmy ~/j7s-cluster.yaml
|
||||
exit
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
rm ~/.kube/j7s-cluster.yaml
|
||||
scp jimmy@192.168.1.103:~/j7s-cluster.yaml /home/jimmy/.kube/.
|
||||
# Use text editor to fix IP in file.
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
export KUBECONFIG=~/.kube/j7s-cluster.yaml
|
||||
kubectl get nodes
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user