mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-09 13:12:20 +00:00
Allow IP restrictions for SSH and HTTPS API access on AWS.
Closes #26661
This commit is contained in:
@@ -1006,14 +1006,12 @@ function kube-up {
|
||||
authorize-security-group-ingress "${MASTER_SG_ID}" "--source-group ${NODE_SG_ID} --protocol all"
|
||||
authorize-security-group-ingress "${NODE_SG_ID}" "--source-group ${MASTER_SG_ID} --protocol all"
|
||||
|
||||
# TODO(justinsb): Would be fairly easy to replace 0.0.0.0/0 in these rules
|
||||
|
||||
# SSH is open to the world
|
||||
authorize-security-group-ingress "${MASTER_SG_ID}" "--protocol tcp --port 22 --cidr 0.0.0.0/0"
|
||||
authorize-security-group-ingress "${NODE_SG_ID}" "--protocol tcp --port 22 --cidr 0.0.0.0/0"
|
||||
authorize-security-group-ingress "${MASTER_SG_ID}" "--protocol tcp --port 22 --cidr ${SSH_CIDR}"
|
||||
authorize-security-group-ingress "${NODE_SG_ID}" "--protocol tcp --port 22 --cidr ${SSH_CIDR}"
|
||||
|
||||
# HTTPS to the master is allowed (for API access)
|
||||
authorize-security-group-ingress "${MASTER_SG_ID}" "--protocol tcp --port 443 --cidr 0.0.0.0/0"
|
||||
authorize-security-group-ingress "${MASTER_SG_ID}" "--protocol tcp --port 443 --cidr ${HTTP_API_CIDR}"
|
||||
|
||||
# KUBE_USE_EXISTING_MASTER is used to add minions to an existing master
|
||||
if [[ "${KUBE_USE_EXISTING_MASTER:-}" == "true" ]]; then
|
||||
|
Reference in New Issue
Block a user