Workflow for building, pushing, and testing Docker images inside GKE / Kubernetes

后端 未结 1 788
暗喜
暗喜 2021-01-29 00:02

I am developing a Kubernetes service for deployment in Google Container Egine (GKE). Until recently, I have built Docker images in Google Cloud Shell, but I am hitting quota lim

相关标签:
1条回答
  • 2021-01-29 00:42

    The solution consisted of adding the scope storage-rw to the instance (otherwise storage-r applies by default):

    gcloud compute images list \
      --project google-containers \
      --no-standard-images
    gcloud compute instances create tmp \
      --machine-type g1-small \
      --image container-vm-v20160321 \
      --image-project google-containers \
      --zone europe-west1-d \
      --scopes compute-rw,storage-rw
    

    In addition, I also had to install kubectl (like so) and configure it (like so), so overall this is quite a bite of a hassle. (Also the configuration will have to be updated when the cluster's endpoint changes e.g. after a recreation.)

    But I can now use use a dedicated VM instance (such as tmp) for development work on Docker images.

    UPDATE Added scope compute-rw, which is necessary e.g. for manipulating GCE addresses (as e.g. in gcloud compute addresses list).

    0 讨论(0)
提交回复
热议问题