[root@k8s-m1 kubernetes]# vim ./cmd/kubeadm/app/constants/constants.go
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
const ( // KubernetesDir is the directory Kubernetes owns for storing various configuration files KubernetesDir = "/etc/kubernetes" // ManifestsSubDirName defines directory name to store manifests ManifestsSubDirName = "manifests" // TempDirForKubeadm defines temporary directory for kubeadm // should be joined with KubernetesDir. TempDirForKubeadm = "tmp"
// CertificateValidity defines the validity for all the signed certificates generated by kubeadm CertificateValidity = time.Hour * 24 * 365 * 100 # 修改CertificateValidity字段
// CACertAndKeyBaseName defines certificate authority base name CACertAndKeyBaseName = "ca" // CACertName defines certificate name CACertName = "ca.crt" // CAKeyName defines certificate name CAKeyName = "ca.key"
进入容器内开始编译
1 2 3 4 5 6 7
[root@k8s-m1 kubernetes]# docker run -it --rm -v /root/kubernetes:/go/src/k8s.io/kubernetes k8s.gcr.io/kube-cross:v1.12.12-1 /bin/sh # cd /go/src/k8s.io/kubernetes
CERTIFICATE EXPIRES RESIDUAL TIME EXTERNALLY MANAGED admin.conf May 15, 202013:03 UTC 364d false apiserver May 15, 202013:00 UTC 364d false apiserver-etcd-client May 15, 202013:00 UTC 364d false apiserver-kubelet-client May 15, 202013:00 UTC 364d false controller-manager.conf May 15, 202013:03 UTC 364d false etcd-healthcheck-client May 15, 202013:00 UTC 364d false etcd-peer May 15, 202013:00 UTC 364d false etcd-server May 15, 202013:00 UTC 364d false front-proxy-client May 15, 202013:00 UTC 364d false scheduler.conf May 15, 202013:03 UTC 364d false