Skip to content

Commit 405918f

Browse files
chore: start Proxy as native sidecar
1 parent 4b56798 commit 405918f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

kubernetes_engine/django_tutorial/polls.yaml

+4-5
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,13 @@ spec:
6565
key: password
6666
ports:
6767
- containerPort: 8080
68-
68+
initContainers:
6969
- image: gcr.io/cloud-sql-connectors/cloud-sql-proxy:latest
7070
name: cloud-sql-proxy
7171
args:
72+
# If connecting from a VPC-native GKE cluster, you can use the
73+
# following flag to have the proxy connect over private IP
74+
# - "--private-ip"
7275
- "--port=5432"
7376
- "--credentials-file=/secrets/cloudsql/credentials.json"
7477
- "<your-cloudsql-connection-string>"
@@ -78,17 +81,13 @@ spec:
7881
readOnly: true
7982
- name: ssl-certs
8083
mountPath: /etc/ssl/certs
81-
- name: cloudsql
82-
mountPath: /cloudsql
8384
volumes:
8485
- name: cloudsql-oauth-credentials
8586
secret:
8687
secretName: cloudsql-oauth-credentials
8788
- name: ssl-certs
8889
hostPath:
8990
path: /etc/ssl/certs
90-
- name: cloudsql
91-
emptyDir: {}
9291
# [END gke_kubernetes_deployment_yaml_python]
9392
---
9493
# [START gke_kubernetes_service_yaml_python]

0 commit comments

Comments
 (0)