- 检查AWS Fargate EKS Pod的Iam Role是否有访问postgre RDS的权限
resources:
- eks:DescribeNodegroup
- eks:DescribeAcl
# Allow pods to communicate with RDS
- rds:Connect
- rds:DescribeDBInstances
- rds:DescribeDBClusterEndpoints
- rds:DescribeDBClusters
effect: "Allow"
- 确认数据库连接字符串是否正确设置
v1:
kind: Secret
metadata:
name: sonarqube-postgres
type: Opaque
stringData:
postgres-user: "{{ .Values.sonarqube.postgres.username }}"
postgres-password: "{{ .Values.sonarqube.postgres.password }}"
postgres-host: "{{ .Values.sonarqube.postgres.host }}"
postgres-port: "{{ .Values.sonarqube.postgres.port }}"
postgres-dbname: "{{ .Values.sonarqube.postgres.dbname }}"
- 通过以下命令调试是否能够连接到RDS数据库
$ kubectl exec -it sonarqube-postgresql-0 -- /bin/bash
$ psql -h -d -U -W