3 Answers
Came across the same problem. Assuming you are using a sandbox account that creates a temporary project (e.g. playground-project), you need to enable and then create your k8s cluster.
You can do it via the GCP console or from the command line.
Here’s an example of the command line you need to run
gcloud beta container –project "playground-project" clusters create-auto "autopilot-cluster-1" –region "us-central1" –release-channel "regular" –network "projects/playground-project/global/networks/default" –subnetwork "projects/playground-project/regions/us-central1/subnetworks/default" –cluster-ipv4-cidr "/17" –services-ipv4-cidr "/22"
Then make a coffee and when you come back and return kubectl get pods…you should get a response.
The K8s courses are more theoritical, and the demos are not well explained. I really get loss when i switched from the gcp certificate course to the k8s one. May be it is not design for beginners;
I have learned nothing honestly from that.
I agree, great presentation, but really confusing.
These demos run fine on Docker Desktop. Although there is only one node, it emulates multiple nodes. Must be the Docker on Docker architecture I’ve seen referred to. Anyhow, it is possible to reproduce 99% of the demo without extra steps
WARNING: Starting with version 1.18, clusters will have shielded GKE nodes by default. WARNING: The Pod address range limits the maximum size of the cluster. Please refer to https://cloud.google.com/kubernetes-engine/docs/how-to/flexible-pod-cidr to learn how to optimize IP address allocation. WARNING: Starting with version 1.19, newly created clusters and node-pools will have COS_CONTAINERD as the default node image when no image type is specified. ERROR: (gcloud.beta.container.clusters.create-auto) ResponseError: code=403, message=Required "container.clusters.create" permission(s) for "projects/969223769637".
Does not work