問題タブ [cloud-sql-proxy]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
kubernetes - CloudSQL プロキシ認証情報: 無効な Json ファイル
GCP Kubernetes の Cloud SQL ストレージへのコンテナで CloudSQL プロキシを使用しようとしています。yaml をデプロイするとすぐに、ポッドのエラー「CrashLoopBackOff」が表示され、「kubectl logs cloudsql-proxy」で credentials.json が見つからないというエラーが表示されます。私は、Kubernetes クラスターにアクセスしている場所から、クラウドトップのホーム ディレクトリにそれを持っています。実際には永続データにボリュームを使用していませんが、https://cloud.google.com/sql/docs/mysql/connect-kubernetes-engine のステップ 6.4 で説明されているように、「ボリューム:」定義を引き続き使用する必要があります。間違いはありますか?
どうもありがとう
python - Start CloudSQL Proxy on Python Dataflow / Apache Beam
I am currently working on a ETL Dataflow job (using the Apache Beam Python SDK) which queries data from CloudSQL (with psycopg2
and a custom ParDo
) and writes it to BigQuery. My goal is to create a Dataflow template which I can start from a AppEngine using a Cron job.
I have a version which works locally using the DirectRunner. For that I use the CloudSQL (Postgres) proxy client so that I can connect to the database on 127.0.0.1 .
When using the DataflowRunner with custom commands to start the proxy within a setup.py script, the job won't execute. It stucks with repeating this log-message:
Setting node annotation to enable volume controller attach/detach
A part of my setup.py looks the following:
#xA;I added the last line as separate subprocess.Popen()
within run()
after reading this issue on Github from sthomp and this discussion on Stackoverflo. I also tried to play around with some parameters of subprocess.Popen
.
Another mentioned solution from brodin was to allow access from every IP address and to connect via username and password. In my understanding he does not claim this as best practice.
Thank you in advance for you help.
!!! Workaround solution at bottom of this post !!!
Update - Logfiles
These are the logs on error level which occur during a job:
#xA;Here you can find are all logs after the start of my custom setup.py (log-level: any; all logs):
Update logfiles 2
Job logs (I manually canceled the job after not stucking for a while):
#xA;Stack Traces:
#xA;