K3d-dev.sh -- Port 6443 Blocked for Workstations when deploying with private option
Bug
k3d-dev.sh Security Group Lacks Rule for Port 6443
Description
The K3d dev script does not create a rule allowing for the developer's workstation to access the cluster on port 6443. This happens when using the private IP address option (-p).
BigBang Version = 2.3.0
Leads
For private IPs, the code only adds a rule for port 22, leaving out 6443:
if [[ "$PRIVATE_IP" == true ]];
then
aws ec2 authorize-security-group-ingress --output json --no-cli-pager --group-name ${SGname} --protocol tcp --port 22 --cidr ${WorkstationIP}/32
else # all protocols to all ports is the default
aws ec2 authorize-security-group-ingress --output json --no-cli-pager --group-name ${SGname} --protocol all --cidr ${WorkstationIP}/32
fi
Add this rule after line 295 to add port 6443:
aws ec2 authorize-security-group-ingress --output json --no-cli-pager --group-name ${SGname} --protocol tcp --port 6443 --cidr ${WorkstationIP}/32
Edited by Ben Francis