Skip to content

Commit 9006bfc

Browse files
authored
Merge pull request #1801 from chancez/patch-1
docs: Update v1 to v2 migration guide to include example command for updating SG rules
2 parents c993d86 + 377a1c7 commit 9006bfc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/deploy/upgrade/migrate_v1_v2.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ It supports existing AWS resources provisioned by AWSALBIngressController(>=v1.1
2525
* The AWSALBIngressController didn't add any description for that inbound rule.
2626
* The AWSLoadBalancerController will use `elbv2.k8s.aws/targetGroupBinding=shared` for that inbound rule
2727
* You'll need to manually add `elbv2.k8s.aws/targetGroupBinding=shared` description to that inbound rule so that AWSLoadBalancerController can delete such rule when you delete your Ingress.
28+
* The following shell pipeline can be used to update the rules automatically. Replace `$REGION` and `$SG_ID` with your own values. After running it change `DryRun: true` to `DryRun: false` to have it actually update your security group:
29+
```
30+
aws --region $REGION ec2 update-security-group-rule-descriptions-ingress --cli-input-json "$(aws --region $REGION ec2 describe-security-groups --group-ids $SG_ID | jq '.SecurityGroups[0] | {DryRun: true, GroupId: .GroupId ,IpPermissions: (.IpPermissions | map(select(.FromPort==0 and .ToPort==65535) | .UserIdGroupPairs |= map(.Description="elbv2.k8s.aws/targetGroupBinding=shared"))) }' -M)"
31+
```
2832

2933
!!!tip "sample"
3034
inbound rule on worker node securityGroups that allow traffic from the managed LB securityGroup before migration:

0 commit comments

Comments
 (0)