我可以在minikube上运行SQL Cloud Proxy容器吗?

时间:2018-12-11 11:46:05

标签: kubernetes minikube

我有statefulset服务,我正在尝试在minikube和GCP上本地运行。在GCP上,一切正常。在我的本地minikube实例上,我遇到SQL Cloud Proxy容器处于等待状态的问题。

   (...)
  terminationGracePeriodSeconds: 120
  containers:
    - name: cloudsql-proxy
      image: b.gcr.io/cloudsql-docker/gce-proxy:1.13
      command: ["/cloud_sql_proxy",
                "-instances=(changed):us-central1:my-db=tcp:5432",
                "-credential_file=/secrets/cloudsql/credentials.json"]
      securityContext:
        runAsUser: 2
        allowPrivilegeEscalation: false
      volumeMounts:
        - name: cloudsql-instance-credentials
          mountPath: /secrets/cloudsql
          readOnly: true
        - name: ssl-certs
          mountPath: /etc/ssl/certs
    - name: web
   (...)

我正在尝试在minikube上的配置上运行它。但是cloudsql代理容器处于等待状态。 Kubectl描述:

Containers:
  cloudsql-proxy:
    Container ID:
    Image:         b.gcr.io/cloudsql-docker/gce-proxy:1.13
    Image ID:
    Port:          <none>
    Host Port:     <none>
    Command:
      /cloud_sql_proxy
      -instances=(changed):us-central1:my-db=tcp:5432
      -credential_file=/secrets/cloudsql/credentials.json
    State:          Waiting
      Reason:       ContainerCreating
    Ready:          False
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /etc/ssl/certs from ssl-certs (rw)
      /secrets/cloudsql from cloudsql-instance-credentials (ro)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-kn27j (ro)

  Normal  SuccessfulMountVolume  11m   kubelet, minikube  MountVolume.SetUp succeeded for volume "default-token-kn27j"
  Normal  Pulled                 11m   kubelet, minikube  Container image "b.gcr.io/cloudsql-docker/gce-proxy:1.13" already present on machine
  Normal  Created                11m   kubelet, minikube  Created container
  Normal  Started                11m   kubelet, minikube  Started container

kubectl日志:

Error from server (BadRequest): container "web" in pod "web-0" is waiting to start: ContainerCreating

我在做什么错了?

0 个答案:

没有答案