kubernetes upgrade

phomlish@a6:~/kubernetes/dashboard$ find /etc/kubernetes/pki/ -type f -name “*.crt” -print|egrep -v ‘ca.crt$’|xargs -L 1 -t -i bash -c ‘openssl x509 -noout -text -in {}|grep After’
xargs: warning: options –max-lines and –replace/-I/-i are mutually exclusive, ignoring previous –max-lines value
bash -c ‘openssl x509 -noout -text -in /etc/kubernetes/pki/apiserver-etcd-client.crt|grep After’
Not After : Sep 6 11:43:38 2024 GMT
bash -c ‘openssl x509 -noout -text -in /etc/kubernetes/pki/apiserver-kubelet-client.crt|grep After’
Not After : Sep 6 11:43:37 2024 GMT
bash -c ‘openssl x509 -noout -text -in /etc/kubernetes/pki/front-proxy-client.crt|grep After’
Not After : Sep 6 11:43:38 2024 GMT
bash -c ‘openssl x509 -noout -text -in /etc/kubernetes/pki/etcd/peer.crt|grep After’
Not After : Sep 6 11:43:38 2024 GMT
bash -c ‘openssl x509 -noout -text -in /etc/kubernetes/pki/etcd/server.crt|grep After’
Not After : Sep 6 11:43:38 2024 GMT
bash -c ‘openssl x509 -noout -text -in /etc/kubernetes/pki/etcd/healthcheck-client.crt|grep After’
Not After : Sep 6 11:43:38 2024 GMT
bash -c ‘openssl x509 -noout -text -in /etc/kubernetes/pki/apiserver.crt|grep After’
Not After : Sep 6 11:43:37 2024 GMT
phomlish@a6:~/kubernetes/dashboard$

as root:
cd /etc/kubernetes/
mv {admin.conf,controller-manager.conf,kubelet.conf,scheduler.conf} ~/
kubeadm init phase kubeconfig all
reboot
as phomlish:
cp -i /etc/kubernetes/admin.conf $HOME/.kube/config

 

phomlish@a6:~/kubernetes/dashboard$ ./genK8sToken.sh
error: failed to create token: Unauthorized