首页 > 其他分享 >kubeadm续期k8s集群证书

kubeadm续期k8s集群证书

时间:2023-12-09 12:33:07浏览次数:21  
标签:renewed certificate 09 etcd kubeadm k8s 续期

1、备份

mkdir /opt/2023-12-09-k8s-backup
cp -a /etc/kubernetes  /opt/2023-12-09-k8s-backup
cp -a /var/lib/etcd  /opt/2023-12-09-k8s-backup
cp -a /root/.kube/config /opt/2023-12-09-k8s-backup

2、更新证书

[root@k8s-master01 2023-12-09-k8s-backup]# kubeadm certs renew all
[renew] Reading configuration from the cluster...
[renew] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -o yaml'
[renew] Error reading configuration from the Cluster. Falling back to default configuration

certificate embedded in the kubeconfig file for the admin to use and for kubeadm itself renewed
certificate for serving the Kubernetes API renewed
certificate the apiserver uses to access etcd renewed
certificate for the API server to connect to kubelet renewed
certificate embedded in the kubeconfig file for the controller manager to use renewed
certificate for liveness probes to healthcheck etcd renewed
certificate for etcd nodes to communicate with each other renewed
certificate for serving etcd renewed
certificate for the front proxy client renewed
certificate embedded in the kubeconfig file for the scheduler manager to use renewed

Done renewing certificates. You must restart the kube-apiserver, kube-controller-manager, kube-scheduler and etcd, so that they can use the new certificates.

3、重启服务使证书生效

 

标签:renewed,certificate,09,etcd,kubeadm,k8s,续期
From: https://www.cnblogs.com/linjiangCN/p/17890765.html

相关文章

  • k8s:通过 kubectl 插件 Kubepug 实现集群升级检查(废弃API资源检查)
    背景:k8s的版本迭代很快,虽然主要版本一直没有变化,但是次要版本一直在迭代,2022年一年就发布了三个次要版本,同时不同的次要版本之间API资源一直在变化,有新加入的,也有废弃删除的。不同版本的api资源版本也有不同,往往不是向下兼容的,比如在低版本中API资源版本为v1beta1,而高版......
  • k8s证书过期处理方案
    gitclonehttps://github.com/yuyicai/update-kube-cert.gitcdupdate-kube-certchmod755update-kubeadm-cert.sh./update-kubeadm-cert.shall#查看证书有效期opensslx509-in/etc/kubernetes/pki/apiserver.crt-noout-text|grepNot#重装网络插件kubectl......
  • 通过kubeadm方式安装k8s
    虚拟机最少是2core,master内存最小3G,node内存最小2G.要求的Docker版本是18.03,如果不是安装的dockerce,版本是过旧的,可以选择删除后重新安装;也可以重新创建一个虚拟机执行以下命令。简单方法:使用master指定到第15步之后,克隆出两台node,在node上继续执行后面的步骤.更改ip......
  • k8s~envoy的部署
    参考文档https://blog.51cto.com/wangguishe/5789239https://blog.csdn.net/qq_29974229/article/details/127190476https://blog.51cto.com/wangguishe/5789239envoy与后端应用关系图当在Kubernetes中使用Envoy作为边缘代理时,通常会将Envoy部署为一个Sidecar容器,与后端服......
  • 当创建statefulset资源后,k8s组件如何协作
    本文分享自华为云社区《当创建StatefulSet后,k8s会发生什么?》,作者:可以交个朋友。一、StatefulSet介绍StatefulSet是用来管理有状态应用的工作负载对象,StatefulSet管理基于相同容器规约的一组Pod,使用持久标识符为工作负载Pod提供持久存储。和Deployment类似,也属于副本控制器,......
  • 修改k8s节点上的pod数
    测试环境是k8s1.25查看kubelet配置文件 查看/etc/systemd/system/kubelet.service.d/10-kubeadm.conf 本次测试是在/var/lib/kubelet/kubeadm-flags.env中添加了参数--max-pods=200,然后重启kubelet 验证使用命令kubectldescribenodenode1|greppod查看pod数下次......
  • k8s持久化存储
    1、存储卷介绍存储卷的分类#kubectlexplainpod.spec.volumes存储卷的选择文件存储,如nfs、glusterfs、cephfs等,数据共享,但是性能较差块存储,如iscsi、rbd等,性能较好,不能实现数据共享(部分)对象存储,如ceph对象存储,性能好,数据共享,但是使用方式特殊,支持较少。2、本地......
  • K8S怎么设置NodePort端口
    K8S创建service使用NodePort模式时端口是随机的,如需要固定可以修改yaml配置文件一个完整的service的yaml配置文件如下#catzentao-deployment.yamlapiVersion:v1kind:Servicemetadata:creationTimestamp:nulllabels:run:zentaoname:zentao-servicespec:......
  • 聊聊部署在不同K8S集群上的服务如何利用nginx-ingress进行灰度发布
    前言之前有篇文章聊聊如何利用springcloudgateway实现简易版灰度路由,里面的主人公又有一个需求,他们有个服务是没经过网关的,而是直接通过nginx-ingress暴露出去,现在这个服务也想做灰度,他知道在同个集群如何利用nginx-ingress进行灰度发布,但是现在这个服务是部署在新的集群,他查了......
  • 云原生周刊:K8s 的 YAML 技巧 | 2023.12.4
    开源项目推荐HelmfileHelmfile是用于部署HelmChart的声明性规范。其功能有:保留图表值文件的目录并维护版本控制中的更改。将CI/CD应用于配置更改。定期同步以避免环境偏差。Docketeer一款Docker和Kubernetes开发人员工具,用于管理容器并可视化集群和容器指标。......