k8s证书过期kubeadm编译解决方法,k8s集群v1.18.8证书过期修改方法
VIP会员须知:
1, 请勿分享或出售VIP账号和VIP资源, 已启用自动检测技术, 如有发现此类行为将会被取消VIP会员权限, 不予退款.
2, 购买后有任何问题,包你学会,可以联系QQ7529997或Email:7529997@qq.com.
谢谢您的理解!
请联系QQ7529997,或加安全专题VIP群,QQ群号547288432
# modified: cmd/kubeadm/app/util/pkiutil/pki_helpers.go
# modified: hack/lib/version.sh
# modified: staging/src/k8s.io/client-go/util/cert/cert.go
[root@test20180906 kubernetes]# diff /opt/soft/k8s22/pki_helpers.go /opt/soft/k8s11/pki_helpers.go
578c578
< NotAfter: time.Now().Add(duration365d).UTC(), — > NotAfter: time.Now().Add(duration365d * 20).UTC(),
[root@test20180906 kubernetes]#
[root@test20180906 kubernetes]# diff /opt/soft/k8s22/version.sh /opt/soft/k8s11/version.sh
61c61
< KUBE_GIT_TREE_STATE=”dirty” — > KUBE_GIT_TREE_STATE=”my”
81c81
< if [[ “${KUBE_GIT_TREE_STATE}” == “dirty” ]]; then — > if [[ “${KUBE_GIT_TREE_STATE}” == “my” ]]; then
85c85
< KUBE_GIT_VERSION+=”-dirty” — > KUBE_GIT_VERSION+=”-my”
[root@test20180906 kubernetes]# diff /opt/soft/k8s22/cert.go /opt/soft/k8s11/cert.go
66c66
< NotAfter: now.Add(duration365d * 10).UTC(), — > NotAfter: now.Add(duration365d * 20).UTC(),
96c96
< maxAge := time.Hour * 24 * 365 // one year self-signed certs — > maxAge := time.Hour * 24 * 365 * 20 // one year self-signed certs
# 编译kubeadm, 这里主要编译kubeadm 即可
make all WHAT=cmd/kubeadm GOFLAGS=-v
# 编译kubelet
make all WHAT=cmd/kubelet GOFLAGS=-v
# 编译kubectl
make all WHAT=cmd/kubectl GOFLAGS=-v
/root/ddd/kubernetes/_output/bin