Yes you can do it. However, the daemon pod will no longer listen to the local host. Therefore, you must configure the cloud_sql_proxy and database connections using hostIP Node.
You must set cloud_sql_proxyto listen0.0.0.0
- command:
- /cloud_sql_proxy
- -instances=project:region:db=tcp:0.0.0.0:5432
- -credential_file=/secrets/cloudsql/credentials.json
You must also change the database connection to use hostIP
env:
- name: DB_HOST
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: status.hostIP
source
share