diff --git a/magnum/drivers/common/templates/kubernetes/fragments/make-cert-client.sh b/magnum/drivers/common/templates/kubernetes/fragments/make-cert-client.sh index 414a3bcfd3..a9f478b432 100644 --- a/magnum/drivers/common/templates/kubernetes/fragments/make-cert-client.sh +++ b/magnum/drivers/common/templates/kubernetes/fragments/make-cert-client.sh @@ -73,7 +73,7 @@ distinguished_name = req_distinguished_name req_extensions = req_ext prompt = no [req_distinguished_name] -CN = kubernetes.invalid +CN = kubernetes.default.svc [req_ext] keyUsage=critical,digitalSignature,keyEncipherment extendedKeyUsage=clientAuth diff --git a/magnum/drivers/common/templates/kubernetes/fragments/make-cert.sh b/magnum/drivers/common/templates/kubernetes/fragments/make-cert.sh index d5769dbc2a..ab375d0885 100644 --- a/magnum/drivers/common/templates/kubernetes/fragments/make-cert.sh +++ b/magnum/drivers/common/templates/kubernetes/fragments/make-cert.sh @@ -55,6 +55,8 @@ KUBE_SERVICE_IP=$(echo $PORTAL_NETWORK_CIDR | awk 'BEGIN{FS="[./]"; OFS="."}{pri sans="${sans},IP:${KUBE_SERVICE_IP}" +sans="${sans},DNS:kubernetes,DNS:kubernetes.default,DNS:kubernetes.default.svc,DNS:kubernetes.default.svc.cluster.local" + cert_dir=/srv/kubernetes cert_conf_dir=${cert_dir}/conf @@ -104,7 +106,7 @@ distinguished_name = req_distinguished_name req_extensions = req_ext prompt = no [req_distinguished_name] -CN = kubernetes.invalid +CN = kubernetes.default.svc [req_ext] subjectAltName = ${sans} extendedKeyUsage = clientAuth,serverAuth