kelseyhightower / kubernetes-the-hard-way

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

Subnet kubernetes not found - Provisioning Compute Resources #653

Open mikerossiter opened 3 years ago

mikerossiter commented 3 years ago

Not sure if I'm missing something here but in Provisioning Compute Resources when creating the Compute Instances for the Kubernetes Controllers I get an error because "(gcloud.compute.instances.create) HTTPError 404: The resource 'projects/XXXXX/regions/XXXXXX/subnetworks/kubernetes' was not found"

XXXXs in place of real details obviously.

Can anyone assist further? I can't seem to find the answer anywhere.

pmmukh commented 3 years ago

Did you end up figuring this out ? Same issue, the only advice I've found is to reauthenticate with gcloud auth login which doesn't seem to solve anything.

mikerossiter commented 3 years ago

No sorry. TBH I've tried various methods of setting up K8s from scratch and I've yet to find a wholly successful method!

pmmukh commented 3 years ago

Ohk so I figured out the issue on my end. It was cause I'd created the VPC and subnet in us-west-2, but had set the compute region as us-west-1. Once I updated the latter to us-west-2, this issue went away.

mikerossiter commented 3 years ago

Ah right. I don't recall using any other region other than europe-west-2 but I'll have to give it a go. Thanks for sharing!

pmmukh commented 3 years ago

no probs!

plumbis commented 2 years ago

I encountered this because I missed the step "Create the kubernetes subnet in the kubernetes-the-hard-way VPC network:"

You can verify if you have the proper subnets created with gcloud compute networks subnets list --filter="name:kubernetes"