Removal of Pods utilizes the kubectl command. Before we start with the removal of a single Pod, we need to list existing Pods. To list all Pods, we can use the kubectl get pods command: Figure 6.50 – Listing of existing Pods with kubectl command To delete a single Pod, we can issue the kubectl…
Author: examcert
Command line – Google Cloud Cert Guide
To modify deployed Pods, we have several possibilities, but it will depend on how the Pods are deployed. Let’s try to modify the ReplicaSet deployment used in the previous section of the chapter. We have a deployment with the name frontend with three replicas and we would like to change the number of replicas to…
Command line – Google Cloud Cert Guide
The most popular option to create Pods using the command line is to use two main commands. The first option is to use the kubectl apply -f filename.yaml command, where the YAML file contains all details of the Pod. If you don’t know how to create a Pod YAML file, you can use an example…
Command line – Google Cloud Cert Guide
Now, after switching to the CLI, we will view the Pods’ details using the kubectl utility. To view all Pods in all namespaces, we need to use the following command:kubectl get pods -A However, the command output will show us all cluster resources alongside our deployed Pods. To view Pods deployed into the default namespace,…
DaemonSet – Google Cloud Cert Guide
If we need to ensure that Pods will be scheduled on all or some GKE nodes, we can use the DaemonSet deployment type. When a new node is added to the cluster, Pods are scheduled on them. The most typical use cases of a DaemonSet are outlined here: Jobs A Job deployment type is used…
Namespace – Google Cloud Cert Guide
By default, GKE creates several namespaces such as kube-node-lease, kube-public, and kube-system. When creating a GKE Autopilot cluster, the default namespace is created for our workloads. GKE Standard mode allows us to specify a node pool’s newly created namespace manually. Namespaces are used to isolate groups of resources within a single cluster. The name of…
Pod lifecycle – Google Cloud Cert Guide
Pods go through a specific sequence of stages throughout their lifecycle. It begins with the Pending phase, progresses to the Running phase if at least one of its primary containers starts successfully, and ultimately transitions to either the Succeeded or Failed phase based on whether any container within the Pod terminates with a failure. Pods…
Modifying node pools – Google Cloud Exam Guide
Command line The creation of a minimalistic deployment pool (bare minimum without any extra settings) can be achieved by executing the following command:gcloud container node-pools create POOL_NAME –cluster CLUSTER_NAME –region=REGION_NAME Execution of this command results in default settings configured for the node pool—three nodes with e2-medium as the machine type: Figure 6.21 – Default and…
Command line – Google Cloud Exam Guide
To delete a GKE cluster, we need to use the following command:gcloud container clusters delete CLUSTER_NAME –-zone=zone_name In the next screenshot, we see the progress and output of the command that leads to cluster deletion: Figure 6.13 – Cluster deletion using CLI By performing cluster operations, we have delved deeper into GKE management. Let’s move…
Command line – Google Cloud Exam Guide
The procedure doesn’t differ from the Cloud console procedure. The step we didn’t have in Cloud console is retrieving available versions. Proceed as follows: This results in the following output: Figure 6.8 – Available GKE versions from different release channels This results in the following output: Figure 6.9 – Command to upgrade the GKE cluster…