You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(eks): restricted public access breaks cluster functionality (aws#10103)
Currently, we attach the VPC to the `KubectlProvider` only when public access is not enabled. The idea was that if public access is enabled, the provider could always connect to the cluster via the internet.
The problem is that public access can be restricted to specific CIDR's via the `onlyFrom` method.
Solution is to switch up the logic and attach the VPC to the provider when private access is enabled. This would enable configuring `PUBLIC_AND_PRIVATE.onlyFrom(...)`.
Also, using `PUBLIC.onlyFrom` is now unsupported because it will most likely break the provider since private access is disabled, and public access is restricted.
Bottom line, these are the configurations that should work:
- Public (with or without private subnets)
- Private (with private subnets)
- Private and **unrestricted** public (with or without private subents)
- Private and **restricted** public (with private subnets)
I also moved the `KubectlSecurityGroup` to be created only if needed.
Fixesaws#9866
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
thrownewError('Private endpoint access requires the VPC to have DNS support and DNS hostnames enabled. Use `enableDnsHostnames: true` and `enableDnsSupport: true` when creating the VPC.');
thrownewError('Private endpoint access requires the VPC to have DNS support and DNS hostnames enabled. Use `enableDnsHostnames: true` and `enableDnsSupport: true` when creating the VPC.');
913
+
}
898
914
899
-
// the security group and vpc must exist in order to properly delete the cluster (since we run `kubectl delete`).
0 commit comments