飞天使-k8s知识点6-kubernetes证书更新

文章目录

        • 查看证书有效期
        • 注释haproxy 的,然后进行重启haproxy

查看证书有效期
kubeadm alpha certs check-expiration 查看证书信息CERTIFICATE                EXPIRES                  RESIDUAL TIME   CERTIFICATE AUTHORITY   EXTERNALLY MANAGED
admin.conf                 Dec 20, 2024 07:37 UTC   364d                                    no
apiserver                  Dec 20, 2024 07:37 UTC   364d            ca                      no
apiserver-etcd-client      Dec 20, 2024 07:37 UTC   364d            etcd-ca                 no
apiserver-kubelet-client   Dec 20, 2024 07:37 UTC   364d            ca                      no
controller-manager.conf    Dec 20, 2024 07:37 UTC   364d                                    no
etcd-healthcheck-client    Dec 20, 2024 07:37 UTC   364d            etcd-ca                 no
etcd-peer                  Dec 20, 2024 07:37 UTC   364d            etcd-ca                 no
etcd-server                Dec 20, 2024 07:37 UTC   364d            etcd-ca                 no
front-proxy-client         Dec 20, 2024 07:37 UTC   364d            front-proxy-ca          no
scheduler.conf             Dec 20, 2024 07:37 UTC   364d                                    noCERTIFICATE AUTHORITY   EXPIRES                  RESIDUAL TIME   EXTERNALLY MANAGED
ca                      Dec 17, 2033 13:41 UTC   9y              no
etcd-ca                 Dec 17, 2033 13:41 UTC   9y              no
front-proxy-ca          Dec 17, 2033 13:41 UTC   9y              no执行这个进行更新证书kubeadm alpha certs renew all[root@kubeadm-master1 m43]#  kubeadm alpha certs renew all
Command "all" is deprecated, please use the same command under "kubeadm certs"
[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'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 renewedDone renewing certificates. You must restart the kube-apiserver, kube-controller-manager, kube-scheduler and etcd, so that they can use the new certificates.然后证书会更新了
CERTIFICATE                EXPIRES                  RESIDUAL TIME   CERTIFICATE AUTHORITY   EXTERNALLY MANAGED
admin.conf                 Dec 20, 2024 14:56 UTC   364d                                    no
apiserver                  Dec 20, 2024 14:56 UTC   364d            ca                      no
apiserver-etcd-client      Dec 20, 2024 14:56 UTC   364d            etcd-ca                 no
apiserver-kubelet-client   Dec 20, 2024 14:56 UTC   364d            ca                      no
controller-manager.conf    Dec 20, 2024 14:56 UTC   364d                                    no
etcd-healthcheck-client    Dec 20, 2024 14:56 UTC   364d            etcd-ca                 no
etcd-peer                  Dec 20, 2024 14:56 UTC   364d            etcd-ca                 no
etcd-server                Dec 20, 2024 14:56 UTC   364d            etcd-ca                 no
front-proxy-client         Dec 20, 2024 14:56 UTC   364d            front-proxy-ca          no
scheduler.conf             Dec 20, 2024 14:56 UTC   364d                                    noCERTIFICATE AUTHORITY   EXPIRES                  RESIDUAL TIME   EXTERNALLY MANAGED
ca                      Dec 17, 2033 13:41 UTC   9y              no
etcd-ca                 Dec 17, 2033 13:41 UTC   9y              no
front-proxy-ca          Dec 17, 2033 13:41 UTC   9y              no
注释haproxy 的,然后进行重启haproxy
[root@ha1 ~]# systemctl restart haproxy
[root@ha1 ~]# cat /etc/haproxy/haproxy.cfg
listen statsmode httpbind 0.0.0.0:9999stats enablelog globalstats uri /haproxy-statusstats auth haadmin:faeefa123eflisten k8s-6443bind 192.168.1.240:6443mode tcpbalance roundrobinserver 192.168.1.209 192.168.1.209:6443 check inter 2s fall 3 rise 5server 192.168.1.210 192.168.1.210:6443 check inter 2s fall 3 rise 5#server 192.168.1.212 192.168.1.212:6443 check inter 2s fall 3 rise 5listen k8s-nginx-80bind 192.168.1.240:80mode tcpserver 192.168.1.209 192.168.1.209:30004 check inter 2s fall 3 rise 5server 192.168.1.210 192.168.1.210:30004 check inter 2s fall 3 rise 5server 192.168.1.212 192.168.1.212:30004 check inter 2s fall 3 rise 5

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/295826.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

前端-如何用echarts绘制含有多个分层的波形图

一、效果图展示 先展示一下实际的效果图 用户选择完需要的波形参数字段之后,页面开始渲染图表,有几个参数就要渲染几个grid,也就是几行波形。 二、绘制逻辑 拿到所选的参数数据之后 1.首先是给横坐标轴的里程-数据注入 2.修改tooltip&am…

5.OpenResty系列之深入理解(一)

本文基于Centos8进行实践,请读者自行安装OpenResty。 1. 内部调用 进入默认安装路径 cd /usr/local/openresty/nginx/conf vim nginx.conflocation /sum {# 只允许内部调用internal;content_by_lua_block {local args ngx.req.get_uri_args()ngx.print(tonumber…

显卡之争!英伟达和AMD下场互掐!GPU霸主地位是否能保?

大家好,我是二狗。 英伟达和AMD这两家芯片巨头掐起来啦! 事情的起因是,两周前AMD董事会主席兼CEO苏姿丰在一场活动中发布了用于生成式AI和数据中心的新一代Intinct MI300X GPU芯片加速卡。 单单发布显卡没啥问题,但是AMD声称MI300…

1857_什么是AEC-Q100认证

Grey 全部学习内容汇总: GitHub - GreyZhang/g_hardware_basic: You should learn some hardware design knowledge in case hardware engineer would ask you to prove your software is right when their hardware design is wrong! 1857_什么是AEC-Q100认证 经…

生成式AI大爆发,2024年人工智能3大发展趋势预测

人工智能(AI)多年来一直是技术界讨论的热门话题,但在2023年,它完全抓住了大众的注意力和想象力。ChatGPT和类似的技术让外行人也能接触到人工智能,生成式AI以前所未有的速度从小众走向主流。在大家都普遍认为AI存在着能力局限性的情况下&…

天文与计算机:技术的星辰大海

天文与计算机:技术的星辰大海 一、引言 在人类的历史长河中,天文学与计算机技术这两个领域似乎相隔甚远,然而在科技的推动下,它们却逐渐走到了一起,为人类对宇宙的探索开辟了新的道路。天文观测的复杂度与数据量随着…

推荐算法架构7:特征工程(吊打面试官,史上最全!)

系列文章,请多关注 推荐算法架构1:召回 推荐算法架构2:粗排 推荐算法架构3:精排 推荐算法架构4:重排 推荐算法架构5:全链路专项优化 推荐算法架构6:数据样本 推荐算法架构7:特…

中级软件设计师-note-2

一个逆向思维的例子是 “当遇到一个问题时,通常人们会想办法解决这个问题。但逆向思维是指反过来考虑,即想办法制造更多的问题。 举个例子,假设有一个团队正在开发一款新的智能手机。传统的思维方式可能是专注于如何增加手机的功能&#xf…

Log4net 教程

一、Log4net 教程 在CodeProject上找到一篇关于Log4net的教程:log4net Tutorial,这篇博客的作者是:Tim Corey ,对应源代码地址为: https://github.com/TimCorey/Log4netTutorial,视频地址为:Ap…

安装Kubernetes1.23、kubesphere3.4、若依项目自动打包部署到K8S记录

1.安装kubernetes1.23详细教程 kubernetes(k8s)集群超级详细超全安装部署手册 - 知乎 2.安装rancher动态存储 kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml3.安装kubesphere3.4 准备工作 您…

matlab时间转换

采集的GNSS数据是10hz的。 data(选取其中一部分)如下: (1)char类型 formatOut yyyy-mm-dd HH:MM:SS; str datestr(data,formatOut); str如下: (2)double类型 DateVector dat…

小白入门之安装NodeJS

重生之我在大四学JAVA 第五章 安装NodeJS 如果你在购买我闲鱼的程序,请尽量使用node14版本 修改安装路径 接着傻瓜式NEXT 测试是否安装成功 如果上面没提示版本号,就按照前两章配置环境变量步骤配置下环境变量 设置镜像地址 npm config set re…