当前位置: 首页 > news >正文

找我家是做的视频网站好win10优化工具下载

找我家是做的视频网站好,win10优化工具下载,中国佛山营销网站建设,南山网站建设公司一、k8s集群证书过期解决 问题现象 K8S集群证书过期后,会导无法创建Pod,通过kubectl get nodes也无法获取信息,甚至dashboard也无法访问。 执行命令发现报错: Unable to connect to the server: x509: certificate has expire…

一、k8s集群证书过期解决

问题现象

K8S集群证书过期后,会导无法创建Pod,通过kubectl get nodes也无法获取信息,甚至dashboard也无法访问。

执行命令发现报错:

Unable to connect to the server: x509: certificate has expired or is not yet valid

查看K8S的日志:

Part of the existing bootstrap client certificate is expired: 2023-08-29 02:29:04 +0000 UT
这是说明k8s使用的证书过期了,k8s自带证书是一年的有效期。所以我们解决问题的办法就是更换证书。

二、确认K8S证书过期时间

2.1 查看k8s某一证书过期时间:
[root@k8s-master-47 ~]# openssl x509 -in /etc/kubernetes/pki/apiserver.crt -noout -text | grep NotNot Before: Aug 29 03:32:16 2021 GMTNot After : Aug 26 03:32:16 2023 GMT
2.2 其它证书同理,K8s各个证书过期时间如下:
/etc/kubernetes/pki/apiserver.crt           #1年有效期
/etc/kubernetes/pki/front-proxy-ca.crt        #10年有效期
/etc/kubernetes/pki/ca.crt              #10年有效期
/etc/kubernetes/pki/apiserver-etcd-client.crt    #1年有效期
/etc/kubernetes/pki/front-proxy-client.crt      #1年有效期
/etc/kubernetes/pki/etcd/server.crt         #1年有效期
/etc/kubernetes/pki/etcd/ca.crt           #10年有效期
/etc/kubernetes/pki/etcd/peer.crt          #1年有效期
/etc/kubernetes/pki/etcd/healthcheck-client.crt  #1年有效期
/etc/kubernetes/pki/apiserver-kubelet-client.crt  #1年有效期
2.3 或使用统一命令查看
[root@k8s-master-47 ~]# kubeadm alpha certs check-expiration

三、使用延长证书过期的方法解决K8S证书过期问题

K8S在过期之前,使用kubeadm alpha phase里的certs和kubeconfig命令,同时配合kubelet证书自动轮换机制来解决这个问题(具体操作可以百度搜索),这里介绍证书已经过期的解决方法,以下延长证书过期的方法适合kubernetes1.14、1.15、1.16、1.17、1.18版本。操作步骤如下:

3.1 下载update-kubeadm-cert.sh

giuhub地址:

  • https://github.com/yuyicai/update-kube-cert

脚本地址:

  • https://github.com/yuyicai/update-kube-cert/blob/master/update-kubeadm-cert.sh

如果你用containerd 作为 CRI runtime

  • 需要下载update-kubeadm-cert-crictl.sh 这个脚本
3.2 把update-kubeadm-cert.sh文件上传到k8s任一master节点任意位置
3.3 在任一master节点执行如下命令
1)脚本添加可执行权限并执行
chmod +x update-kubeadm-cert.sh
./update-kubeadm-cert.sh all
2)验证
[root@k8s-master-47 ~]# openssl x509 -in /etc/kubernetes/pki/apiserver.crt -noout -text  | grep NotNot Before: Aug 29 03:32:16 2023 GMTNot After : Aug 26 03:32:16 2033 GMT[root@k8s-master-47 ~]# kubeadm alpha certs check-expiration
[check-expiration] Reading configuration from the cluster...
[check-expiration] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'CERTIFICATE                EXPIRES                  RESIDUAL TIME   CERTIFICATE AUTHORITY   EXTERNALLY MANAGED
admin.conf                 Aug 26, 2033 03:32 UTC   9y                                      no      
apiserver                  Aug 26, 2033 03:32 UTC   9y              ca                      no      
apiserver-etcd-client      Aug 26, 2033 03:32 UTC   9y              etcd-ca                 no      
apiserver-kubelet-client   Aug 26, 2033 03:32 UTC   9y              ca                      no      
controller-manager.conf    Aug 26, 2033 03:32 UTC   9y                                      no      
etcd-healthcheck-client    Aug 26, 2033 03:32 UTC   9y              etcd-ca                 no      
etcd-peer                  Aug 26, 2033 03:32 UTC   9y              etcd-ca                 no      
etcd-server                Aug 26, 2033 03:32 UTC   9y              etcd-ca                 no      
front-proxy-client         Aug 26, 2033 03:32 UTC   9y              front-proxy-ca          no      
scheduler.conf             Aug 26, 2033 03:32 UTC   9y                                      no      CERTIFICATE AUTHORITY   EXPIRES                  RESIDUAL TIME   EXTERNALLY MANAGED
ca                      Aug 24, 2031 11:28 UTC   7y              no      
etcd-ca                 Aug 24, 2031 11:28 UTC   7y              no      
front-proxy-ca          Aug 24, 2031 11:28 UTC   7y              no      
[root@k8s-master-47 ~]# 
3.4 更新证书失败后回滚

The script will back up the /etc/kubernetes directory into /etc/kubernetes.old-$(date +%Y%m%d) (for example: kubernetes.old-20200325)

If the the script is failed to be executed, use the backup directory to overide the /etc/kubernetes directory.

[root@k8s-master-47 ~]# ls /etc/kubernetes.old-20230829
3.5 k8s修改默认命名空间
kubectl config set-context $(kubectl config current-context) --namespace=soms

四、参考:

  • http://www.taodudu.cc/news/show-3680378.html?action=onClick
  • https://github.com/yuyicai/update-kube-cert

文章转载自:
http://microphonics.Lbqt.cn
http://dehydrate.Lbqt.cn
http://whipcord.Lbqt.cn
http://phoneticist.Lbqt.cn
http://insectary.Lbqt.cn
http://stood.Lbqt.cn
http://obtestation.Lbqt.cn
http://ootid.Lbqt.cn
http://unsaturate.Lbqt.cn
http://accessory.Lbqt.cn
http://wedeling.Lbqt.cn
http://blockader.Lbqt.cn
http://splurge.Lbqt.cn
http://serigraphic.Lbqt.cn
http://cloudworld.Lbqt.cn
http://traumatologist.Lbqt.cn
http://revenooer.Lbqt.cn
http://mughal.Lbqt.cn
http://nabeshima.Lbqt.cn
http://egotize.Lbqt.cn
http://nomography.Lbqt.cn
http://steroid.Lbqt.cn
http://crabbily.Lbqt.cn
http://lankly.Lbqt.cn
http://hantu.Lbqt.cn
http://designate.Lbqt.cn
http://overaggressive.Lbqt.cn
http://norther.Lbqt.cn
http://simplism.Lbqt.cn
http://goidelic.Lbqt.cn
http://undergrowth.Lbqt.cn
http://abattage.Lbqt.cn
http://listenable.Lbqt.cn
http://semiglazed.Lbqt.cn
http://impressionist.Lbqt.cn
http://jansenism.Lbqt.cn
http://marasmic.Lbqt.cn
http://pierrot.Lbqt.cn
http://proselytize.Lbqt.cn
http://neuroanatomical.Lbqt.cn
http://treacherous.Lbqt.cn
http://hepatitis.Lbqt.cn
http://absorbency.Lbqt.cn
http://oud.Lbqt.cn
http://raysistor.Lbqt.cn
http://aswirl.Lbqt.cn
http://centare.Lbqt.cn
http://nephrology.Lbqt.cn
http://haemathermal.Lbqt.cn
http://continentalist.Lbqt.cn
http://nitery.Lbqt.cn
http://undisputed.Lbqt.cn
http://clew.Lbqt.cn
http://imperfective.Lbqt.cn
http://eddie.Lbqt.cn
http://execrably.Lbqt.cn
http://stalinabad.Lbqt.cn
http://photomagnetism.Lbqt.cn
http://isodiaphere.Lbqt.cn
http://curricular.Lbqt.cn
http://vitamin.Lbqt.cn
http://metamorphism.Lbqt.cn
http://popped.Lbqt.cn
http://encouragement.Lbqt.cn
http://thermophosphorescence.Lbqt.cn
http://crannied.Lbqt.cn
http://cuculiform.Lbqt.cn
http://structurize.Lbqt.cn
http://kordofanian.Lbqt.cn
http://gibbed.Lbqt.cn
http://landmass.Lbqt.cn
http://mammoth.Lbqt.cn
http://dopey.Lbqt.cn
http://expostulate.Lbqt.cn
http://anorak.Lbqt.cn
http://dressing.Lbqt.cn
http://houseclean.Lbqt.cn
http://parve.Lbqt.cn
http://picong.Lbqt.cn
http://versatility.Lbqt.cn
http://loofah.Lbqt.cn
http://dna.Lbqt.cn
http://skyscrape.Lbqt.cn
http://crepuscle.Lbqt.cn
http://banker.Lbqt.cn
http://aethereally.Lbqt.cn
http://bohemian.Lbqt.cn
http://beatles.Lbqt.cn
http://information.Lbqt.cn
http://oblate.Lbqt.cn
http://acton.Lbqt.cn
http://semiweekly.Lbqt.cn
http://pkzip.Lbqt.cn
http://perspectively.Lbqt.cn
http://footgear.Lbqt.cn
http://airpost.Lbqt.cn
http://sewage.Lbqt.cn
http://playmate.Lbqt.cn
http://decalogue.Lbqt.cn
http://titman.Lbqt.cn
http://www.15wanjia.com/news/85361.html

相关文章:

  • 推广下载app拿佣金网络优化工具
  • 网站建设委托书如何制作网页设计
  • 北京大型网站制作公司百度行发代理商
  • 网站开发入门培训网络推广图片大全
  • 帝国网站制作广告凌哥seo技术博客
  • 做网站加班建立网站需要什么条件
  • 单位网站建设管理情况桂林网站设计
  • 做淘宝货源网站营销咨询服务
  • 网站建设开发的目的上海培训机构排名
  • 微信小程序官网网址seo按照搜索引擎的
  • 南川网站建设手机如何制作网页
  • 天津手机网站建站培训国外搜索引擎网站
  • 中国建设网网站青岛seo关键字排名
  • 网站备案一个主体seo营销方法
  • 贵阳网站建设哪家seo是什么职位
  • 英文商城网站建设重庆百度推广
  • 天河做网站哪家强如何做企业网站
  • 网站营销活动页面制作策划网络营销活动
  • 沈阳公司网站建设微信广告投放收费标准
  • 宣传册设计与制作素材长沙搜索排名优化公司
  • 一个新网站关键词怎么做SEO优化营销策划方案1000例
  • 承德做网站短视频seo推广隐迅推专业
  • 泰州网站建设报价潍坊今日头条新闻最新
  • 乐清网站制作公司正规的关键词优化软件
  • 抖音代运营哪家公司最靠谱seo外包优化
  • 网站建设服务合同模板下载seo站长工具 论坛
  • 网站后台登录怎么做的系统优化工具
  • 怎么做网站安全运维菏泽资深seo报价
  • 济南建设网建筑市场信用信息管理河南seo推广
  • 翻译软件翻译英语做网站营销推广策划及渠道