AWS invisible special character while creating subnet group

57 views Asked by At

I am following this https://aws.amazon.com/blogs/database/deploy-amazon-rds-databases-for-applications-in-kubernetes/ to be able to connect my Spring Boot Application in EKS to MySQL in RDS.

At the step where DBInstance is supposed to be created, I get "DBSubnetGroup 'rds-subnet-grp' not found." error. That made me check the step where subnet group was created. I ran "kubectl describe DBSubnetGroup " and I see "InvalidParameterValue: The input isn't valid. Input can't contain control characters" error. Which is the root cause for subnet not found error obviously.

Here is the yaml file I am using to create the subnet group which I already scanned for special characters.

apiVersion: rds.services.k8s.aws/v1alpha1
kind: DBSubnetGroup
metadata:
  name: rds-subnet-grp
  namespace: eks-rds
spec:
  name: rds-subnet-grp
  description: rdssubnetgrp
  subnetIDs:
    - subnet-0a40ca73ca13f1fad subnet-03bcc79dfb9f3fa4e subnet-0f724fa3829751f89 subnet-0e4f1dc90deacf790
  tags: []

What am I missing? Where is the special character? I changed namespace from eks-rds to eksrds but no luck.

1

There are 1 answers

2
Caldazar On

subnetIDs should be a list. What you did was put just one dash (-) and put all the subnets in the same line. They should be in separate lines as list members like this:

apiVersion: rds.services.k8s.aws/v1alpha1
kind: DBSubnetGroup
metadata:
  name: rds-subnet-grp
  namespace: eks-rds
spec:
  name: rds-subnet-grp
  description: rdssubnetgrp
  subnetIDs:
    - subnet-0a40ca73ca13f1fad
    - subnet-03bcc79dfb9f3fa4e
    - subnet-0f724fa3829751f89
    - subnet-0e4f1dc90deacf790
  tags: []