kelseyhightower / kubernetes-the-hard-way

Bootstrap Kubernetes the hard way. No scripts.
Apache License 2.0
40.72k stars 13.96k forks source link

Compute quota issues with GCP #749

Open ggsanta opened 11 months ago

ggsanta commented 11 months ago

Similar to this issue, the GCP Compute Engine API quota limits you to 8 CPUs in the region. The bash scripts that deploy the control plane and worker nodes try to deploy each three. I had to go back and delete one control plane node so I could have two of each. I also had to modify the scripts that generate the TLS certs. Perhaps the scripts could be updated to spin up hosts with less CPUs so all 6 fit into the default GCP quota or at least have a warning in the instructions about this and the fact Google won't let you raise that limit on new accounts. I haven't gotten far enough to know if only having 2 of each node will cause other issues with this walkthrough.

andrei-don commented 11 months ago

Most likely you will have quorum issues with your etcd cluster. If you still want high availability, you should go for 3 control plane nodes, otherwise deploying only 2 would not make any difference compared to a single node cluster, see https://cloud.redhat.com/blog/a-guide-to-etcd#:~:text=For%20example%2C%20a%20two%2Dnode,two%20nodes%20to%20remain%20operational.

ggsanta commented 11 months ago

I don't disagree, but my point here is that the pre-requisites section says you can sign up for a new account for $300 in credits: https://github.com/kelseyhightower/kubernetes-the-hard-way/blob/master/docs/01-prerequisites.md. However, when you have a new account you're locked into that 90-day $300 free trial period and per GCP's docs you can't request a quota increase so under this free trial mode it doesn't seem that this tutorial can be completed because of this limitation: https://cloud.google.com/free/docs/free-cloud-features#free-trial. The author might want to add a note about this or potentially recommend people sign-up for a paid cloud billing account on GCP if they wish to use 3 control plane nodes.