1. How Many Nodes are in the Cluster?
To determine the total number of nodes in the Kubernetes cluster, use the following command:The command output indicates that the cluster consists of both control and worker nodes.
2. What is the Networking Solution Used by the Cluster?
The networking solution is identified by inspecting the CNI (Container Network Interface) configuration files. First, navigate to the directory containing these configuration files:3. How Many Weave Agents are Deployed in the Cluster?
To find out how many Weave agents (pods) are running in the cluster, list all pods in thekube-system namespace:
4. On Which Nodes are the Weave Pods Running?
To check on which nodes the Weave agents are running, include the-o wide option when listing pods:
5. What is the Name of the Bridge Network Interface Created by Weave on Each Node?
To verify the network interfaces on a node, run:6. What is the Pod IP Address Range Configured by Weave?
The assigned IP address range for pods can be observed from the network interface details of the “weave” bridge:Verifying both interface settings and pod logs can help ensure the accuracy of the IP allocation range.
7. What is the Default Gateway for Pods Deployed on Node “node01”?
To determine the default gateway for pods running on “node01,” follow these steps:Step 1: Create a Busybox Pod Manifest
Generate a YAML configuration for a simple Busybox pod using the following command:busybox.yaml file to ensure the pod is scheduled on “node01” by adding the nodeName field within the spec:
Step 2: Deploy the Busybox Pod
Apply the configuration file:Step 3: Inspect the Routing Table Inside the Pod
Once the Busybox pod is running, execute this command to view its routing table:Ensure that the Busybox pod is scheduled on the intended node by verifying the
nodeName field in your YAML configuration.Summary
In this lab, we verified several important network configurations:
For additional information on Kubernetes networking, you can explore the Kubernetes Documentation.
Happy networking!