mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 06:01:50 +00:00
Fixed not registering master during cluster creation.
Fixed not registering master during cluster creation. This fixes #36167.
This commit is contained in:
@@ -776,7 +776,11 @@ function create-master() {
|
|||||||
create-static-ip "${MASTER_NAME}-ip" "${REGION}"
|
create-static-ip "${MASTER_NAME}-ip" "${REGION}"
|
||||||
MASTER_RESERVED_IP=$(gcloud compute addresses describe "${MASTER_NAME}-ip" \
|
MASTER_RESERVED_IP=$(gcloud compute addresses describe "${MASTER_NAME}-ip" \
|
||||||
--project "${PROJECT}" --region "${REGION}" -q --format='value(address)')
|
--project "${PROJECT}" --region "${REGION}" -q --format='value(address)')
|
||||||
KUBELET_APISERVER="${MASTER_RESERVED_IP}"
|
|
||||||
|
if [[ "${REGISTER_MASTER_KUBELET:-}" == "true" ]]; then
|
||||||
|
KUBELET_APISERVER="${MASTER_RESERVED_IP}"
|
||||||
|
fi
|
||||||
|
|
||||||
KUBERNETES_MASTER_NAME="${MASTER_RESERVED_IP}"
|
KUBERNETES_MASTER_NAME="${MASTER_RESERVED_IP}"
|
||||||
|
|
||||||
create-certs "${MASTER_RESERVED_IP}"
|
create-certs "${MASTER_RESERVED_IP}"
|
||||||
|
Reference in New Issue
Block a user