mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 01:06:27 +00:00
Create a firewall rule for kubemark master allowing connections on port 443
This commit is contained in:
parent
1bcdd56cf3
commit
3137ecbf3b
@ -51,7 +51,7 @@ gcloud compute disks create "${MASTER_NAME}-pd" \
|
|||||||
--type "${MASTER_DISK_TYPE}" \
|
--type "${MASTER_DISK_TYPE}" \
|
||||||
--size "${MASTER_DISK_SIZE}"
|
--size "${MASTER_DISK_SIZE}"
|
||||||
|
|
||||||
gcloud compute instances create ${MASTER_NAME} \
|
gcloud compute instances create "${MASTER_NAME}" \
|
||||||
--project "${PROJECT}" \
|
--project "${PROJECT}" \
|
||||||
--zone "${ZONE}" \
|
--zone "${ZONE}" \
|
||||||
--machine-type "${MASTER_SIZE}" \
|
--machine-type "${MASTER_SIZE}" \
|
||||||
@ -62,6 +62,13 @@ gcloud compute instances create ${MASTER_NAME} \
|
|||||||
--scopes "storage-ro,compute-rw,logging-write" \
|
--scopes "storage-ro,compute-rw,logging-write" \
|
||||||
--disk "name=${MASTER_NAME}-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no"
|
--disk "name=${MASTER_NAME}-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no"
|
||||||
|
|
||||||
|
gcloud compute firewall-rules create "kubemark-master-https" \
|
||||||
|
--project "${PROJECT}" \
|
||||||
|
--network "${NETWORK}" \
|
||||||
|
--source-ranges "0.0.0.0/0" \
|
||||||
|
--target-tags "${MASTER_NAME}" \
|
||||||
|
--allow "tcp:443" || true
|
||||||
|
|
||||||
MASTER_IP=$(gcloud compute instances describe hollow-cluster-master \
|
MASTER_IP=$(gcloud compute instances describe hollow-cluster-master \
|
||||||
--zone="${ZONE}" --project="${PROJECT}" | grep natIP: | cut -f2 -d":" | sed "s/ //g")
|
--zone="${ZONE}" --project="${PROJECT}" | grep natIP: | cut -f2 -d":" | sed "s/ //g")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user