Hey all,
I am a newbie to Kubernetes and the community as well.
Trying my hand on implementing Kubernetes the hard way on Google Cloud.
Been stuck at creating workers for days now. The command creates only one worker instead of the (3) expected. I also have gotten this error message: Error messageResource exhausted (HTTP 429): QUOTA_EXCEEDED
Here is my code. Hope someone can guide me on how to move forward.
Hint: I’m allowed only 4 IP addresses per zone. Google support says that is sufficient for the implementation.
Welcome to Cloud Shell! Type “help” to get started.
Your Cloud Platform project in this session is set to abcd-efg-1234567.
Use “gcloud config set project [PROJECT_ID]” to change to a different
project.
user@cloudshell:~ (abcd-efg-1234567)$ gcloud compute instances
list
NAME ZONE MACHINE_TYPE PREEMPTIBLE INTERNAL_IP
EXTERNAL_IP STATUS
controller-0 europe-west1-b e2-standard-2 10.240.0.10
x.x.x.x RUNNING
controller-1 europe-west1-b e2-standard-2 10.240.0.11
x.x.x.x RUNNING
controller-2 europe-west1-b e2-standard-2 10.240.0.12
x.x.x.x RUNNING
worker-0 europe-west1-b e2-standard-2 10.240.0.20
x.x.x.x RUNNING
user@cloudshell:~ (abcd-efg-1234567)$ for i in 0 1 2; do
> gcloud compute instances create worker-${i}
> --async
> --boot-disk-size 200GB
> --can-ip-forward
> --image-family ubuntu-2004-lts
> --image-project ubuntu-os-cloud
> --machine-type e2-standard-2
> --metadata pod-cidr=10.200.${i}.0/24
> --private-network-ip 10.240.0.2${i}
> --scopes
compute-rw,storage-ro,service-management,service-control,logging-write,monitoring
> --subnet kubernetes
> --tags kubernetes-the-hard-way,worker
> done
Did you mean zone [europe-west1-b] for instance: [worker-0] (Y/n)? n
For the following instance:
- [worker-0]
choose a zone:
<<<deleted zone list>>>
Please enter your numeric choice: 35
NOTE: The users will be charged for public IPs when VMs are created.
Instance creation in progress for [worker-0]:
https://www.googleapis.com/compute/v1/projects/abcd-efg-1234567/zones/europe-west1-c/operations/operation-xxxxx-5c2afc5967e53-57305eb9-06729623
Use [gcloud compute operations describe URI] command to check the status of
the operation(s).
Did you mean zone [europe-west1-b] for instance: [worker-1] (Y/n)? n
For the following instance:
- [worker-1]
choose a zone:
<<<deleted zone list>>>
Please enter your numeric choice: 35
NOTE: The users will be charged for public IPs when VMs are created.
Instance creation in progress for [worker-1]:
https://www.googleapis.com/compute/v1/projects/abcd-efg-1234567/zones/europe-west1-c/operations/operation-xxxx-5c2afc690c30c-73dfd2fc-ecf011a7
Use [gcloud compute operations describe URI] command to check the status of
the operation(s).
Did you mean zone [europe-west1-b] for instance: [worker-2] (Y/n)? n
For the following instance:
- [worker-2]
choose a zone:
<<<deleted zone list>>>
Please enter your numeric choice: 35
NOTE: The users will be charged for public IPs when VMs are created.
Instance creation in progress for [worker-2]:
https://www.googleapis.com/compute/v1/projects/abcd-efg-1234567/zones/europe-west1-c/operations/operation-xxxx-5c2afc72d2e46-ce4f2eac-9b579f21
Use [gcloud compute operations describe URI] command to check the status of
the operation(s).
user@cloudshell:~ (abcd-efg-1234567)$ gcloud compute instances
list
NAME ZONE MACHINE_TYPE PREEMPTIBLE INTERNAL_IP
EXTERNAL_IP STATUS
controller-0 europe-west1-b e2-standard-2 10.240.0.10
x.x.x.x RUNNING
controller-1 europe-west1-b e2-standard-2 10.240.0.11
x.x.x.x RUNNING
controller-2 europe-west1-b e2-standard-2 10.240.0.12
x.x.x.x RUNNING
worker-0 europe-west1-c e2-standard-2 10.240.0.20
x.x.x.x RUNNING
user@cloudshell:~ (abcd-efg-1234567)$