K8S证书更新

方法更新证书kubeadm alpha certs renew all查看证书过期时间kubeadm alpha certs check-expirationkubeadm init phase kubeconfig all负值kubectl配置cp -i /etc/kubernetes/admin

#k8s  

K8S与主机间文件复制

复制文件到宿主机源参数 不能是以“/” 开头的,所以可以把需要copy的文件先拷贝到pod的工作目录下kubectl cp nginx-ingress-controller-7b9656f756-9mpgw:nginx.conf ~/Documents/nginx.conf复制宿主机文件到podku

#k8s  

K8s临时容器debug

kubectl -n slb alpha debug -it cicd-test-65fc448b8f-f5rbg --image=busybox --target=cicd-test-65fc448b8f-f5rbg

#k8s  

Rancher使用

rancher 安装helm repo add rancher-latest <http://rancher-mirror.oss-cn-beijing.aliyuncs.com/server-charts/latest>kubectl create namespace cattle-s

#k8s