I have a frontend application running in a Kubernetes cluster in AWS. It communicates with a Postgres RDS instance running in the same VPC. The RDS and the k8s worker nodes are both attached to the same private subnets.
The RDS security group allows all access from the Kubernetes nodes (EC2 instances) to the database. The connection from the nodes is fine, because running telnet <rds-endpoint> 5432 returns Connected to <rds-endpoint>.
However when the application is deployed to the pods, it is unable to access the RDS instance. The pods are running on the nodes private IP address <private-ip-address>:8080. The worker node security group also allows all outbound traffic.
I think it may be a port forwarding issue but I do not have much visibility on the connectivity issues. Any assistance appreciated.