Closed system51 closed 4 years ago
the duplication happens because you are defining them here:
certSANs:
- 10.96.0.1
- 127.0.0.1
- 10.15.1.250
- localhost
- 10.15.1.17
- 10.15.1.18
- 10.15.1.19
- k8s-m1
- k8s-m2
- k8s-m3
- kubernetes
- kubernetes.default
- kubernetes.default.svc
- kubernetes.default.svc.cluster.local
try removing the ones that are duplicated from the above list and it should work
/triage support
the duplication happens because you are defining them here:
certSANs: - 10.96.0.1 - 127.0.0.1 - 10.15.1.250 - localhost - 10.15.1.17 - 10.15.1.18 - 10.15.1.19 - k8s-m1 - k8s-m2 - k8s-m3 - kubernetes - kubernetes.default - kubernetes.default.svc - kubernetes.default.svc.cluster.local
try removing the ones that are duplicated from the above list and it should work
/triage support
Since I use haproxy+keepalived to set up the high availability, if I delete the VIP address and these IP definitions, will it affect our use of the cluster?
kubeadm already adds some of these.
kubeadm already adds some of these.
Yes, I found that it had added some, and I tried to modify the certificate section definition in my initialization, but I found that one seemed to be missing kubernetes.default.svc.cluster
。I looked at PKI certificates and requirements in the official website best practices
certSANs:
- 127.0.0.1
- localhost
- 10.15.1.18
- 10.15.1.19
- k8s-m2
- k8s-m3
^ this list looks fine.
kubernetes.default.svc.cluster
is not required to be added on the kubeadm side.
i'm not convinced that we have a kubeadm bug here. /close
@neolit123: Closing this issue.
Is this a request for help?
yup
What keywords did you search in kubeadm issues before filing this one?
I tried before
Is this a BUG REPORT or FEATURE REQUEST?
BUG
Versions
kubeadm version (use
kubeadm version
):Environment:
Kubernetes version (use
kubectl version
):Cloud provider or hardware configuration:
OS (e.g. from /etc/os-release):
CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"
[root@k8s-m1 pki]# uname -a Linux k8s-m1 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
openssl x509 -in apiserver.crt -text -noout
apiVersion: kubeadm.k8s.io/v1beta2 kind: ClusterConfiguration imageRepository: gcr.azk8s.cn/google_containers kubernetesVersion: v1.15.6 certificatesDir: /etc/kubernetes/pki clusterName: kubernetes networking: dnsDomain: cluster.local serviceSubnet: 10.96.0.0/12 podSubnet: 10.244.0.0/16 controlPlaneEndpoint: 10.15.1.250:8443 apiServer: # https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta2#APIServer timeoutForControlPlane: 4m0s extraArgs: authorization-mode: "Node,RBAC" enable-admission-plugins: "NamespaceLifecycle,LimitRanger,ServiceAccount,PersistentVolumeClaimResize,DefaultStorageClass,DefaultTolerationSeconds,NodeRestriction,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota,Priority,PodPreset" runtime-config: api/all,settings.k8s.io/v1alpha1=true storage-backend: etcd3 etcd-servers: https://10.15.1.17:2379,https://10.15.1.18:2379,https://10.15.1.19:2379 etcd-cafile: /etc/kubernetes/pki/etcd/ca.crt etcd-certfile: /etc/kubernetes/pki/apiserver-etcd-client.crt etcd-keyfile: /etc/kubernetes/pki/apiserver-etcd-client.key certSANs:
https://10.15.1.19:2379 caFile: /etc/kubernetes/pki/etcd/ca.crt certFile: /etc/kubernetes/pki/apiserver-etcd-client.crt keyFile: /etc/kubernetes/pki/apiserver-etcd-client.key
apiVersion: kubeproxy.config.k8s.io/v1alpha1 kind: KubeProxyConfiguration mode: ipvs # or iptables ipvs: excludeCIDRs: null minSyncPeriod: 0s scheduler: "rr" strictARP: false syncPeriod: 15s iptables: masqueradeAll: true masqueradeBit: 14 minSyncPeriod: 0s syncPeriod: 30s
apiVersion: kubelet.config.k8s.io/v1beta1 kind: KubeletConfiguration cgroupDriver: systemd failSwapOn: true