From the course: Google Cloud Associate Cloud Engineer Cert Prep

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Working with pods

Working with pods

- Working with pods. So when it comes to managing pods, it's very important to first of all understand very well the differences between gcloud and kubectl. So gcloud is Google Cloud's CLI utility and kubectl is Kubernetes' CLI utility. So you use kubectl to do Kubernetes things like listing pods with kubectl get pods, kubectl get pods dash l to specify a label and filter for a specific label. So when it comes to looking at and managing workloads and Kubernetes constructs and things inside Kubernetes, you use kubectl. gcloud is for Google Cloud infrastructure resources, which would include the cluster, the GKE cluster, and maybe the VPC networks where it is deployed to and other things around the cluster, but you cannot use gcloud for Kubernetes things. So understanding that difference is very important. And here's another example, kubectl command to expose pods. As a service, you can do kubectl expose deployments. You need to have a deployment first. The name of the deployment and…

Contents