kubeadm: change SystemPrivilegedGroup in apiserve-kubelet-client.crt

The component connection between kube-apiserver and kubelet does not
require the "O" field on the Subject to be set to the
"system:masters" privileged group. It can be a less
privileged group like "kubeadm:cluster-admins".

Change the group in the apiserve-kubelet-client
certificate specification. This cert is passed to
--kubelet-client-certificate.
This commit is contained in:
Lubomir I. Ivanov 2023-11-10 14:16:40 +02:00
parent 5ce0bd95cc
commit 2780060a78

View File

@ -291,7 +291,7 @@ func KubeadmCertKubeletClient() *KubeadmCert {
config: pkiutil.CertConfig{
Config: certutil.Config{
CommonName: kubeadmconstants.APIServerKubeletClientCertCommonName,
Organization: []string{kubeadmconstants.SystemPrivilegedGroup},
Organization: []string{kubeadmconstants.ClusterAdminsGroupAndClusterRoleBinding},
Usages: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth},
},
},