Kubernetes Deep Dive Room

Sign Up Free or Log In to participate!

Hands on lap: Creating and deploying Kubernetes cluster

In the video of this lab, we created the Cluster using cloud(nodes), but I do not see any command to create the pods in these nodes. Can someone help clarify , do we or did we create any pods in any of the command?  There was no deployment yaml file too.

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.

Brian Whelan

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".

Brian Whelan

Does not work

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.

Brian Whelan

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

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?