instanceDoesNotExist将cloudsql-proxy升级到v1.31.0后



我使用Mac m1机器,我想升级到v 1.31.0,使云代理ARM友好。下面是我的代理文件的一个示例(它在以前的cloudsql-proxy版本中工作得很好)

apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: db-proxy
name: db-proxy
spec:
replicas: 1
selector:
matchLabels:
app: db-proxy
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
type: RollingUpdate
template:
metadata:
labels:
app: db-proxy
name: db-proxy
spec:
containers:
- command:
- /cloud_sql_proxy
- --dir=/cloudsql
- -instances= ...some instances here
- -credential_file=...file path
image: gcr.io/cloudsql-docker/gce-proxy:1.31.0
imagePullPolicy: IfNotPresent
name: cloudsql-proxy
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /credentials
name: db-proxy-credentials
readOnly: true
- mountPath: /etc/ssl/certs
name: ssl-certs
- mountPath: /cloudsql
name: cloudsql
dnsPolicy: ClusterFirst
restartPolicy: Always
terminationGracePeriodSeconds: 30
volumes:
- name: db-proxy-credentials
hostPath:
path: ...
type: Directory
- hostPath:
path: /etc/ssl/certs
type: ""
name: ssl-certs
- emptyDir: {}
name: cloudsql

这是我在启动pod时得到的错误

googleapi: Error 404: The Cloud SQL instance does not exist., instanceDoesNotExist

404错误出现,因为云SQL实例的命名错误或如果实例不存在。如果实例不存在,旧版本的Cloud SQL Auth代理不会使pod崩溃,但最新版本会导致错误。@Omar Ahmed确认问题已经通过检查实例名得到解决。

相关内容

  • 没有找到相关文章

最新更新