Skip to content

Latest commit

 

History

History
95 lines (62 loc) · 2.14 KB

03-Practice-Test-Monitor-Cluster-Components.md

File metadata and controls

95 lines (62 loc) · 2.14 KB

Practice Test - Monitor Cluster Components

Solutions to practice test - monitor cluster components

  1. We have deployed a few PODs running workloads. Inspect it.
    kubectl get pods
    
  2. Let us deploy metrics-server to monitor the PODs and Nodes. Pull the git repository for the deployment files.
    git clone https://github.com/kodekloudhub/kubernetes-metrics-server.git
    
  3. Deploy the metrics-server by creating all the components downloaded.

    Run the 'kubectl create -f .' command from within the downloaded repository.

    cd kubernetes-metrics-server
    kubectl create -f .
    
  4. It takes a few minutes for the metrics server to start gathering data.

    Run the kubectl top node command and wait for a valid output.

    kubectl top node
    
  5. Identify the node that consumes the most CPU(cores).

    Run the kubectl top node command

    kubectl top node
    

    Examine the CPU(cores) column of the output to get the answer.

  6. Identify the node that consumes the most Memory(bytes). Run the `kubectl top node` command
    $ kubectl top node
    

    Examine the MEMORY(bytes) column of the output to get the answer.

  7. Identify the POD that consumes the most Memory(bytes).

    Run the kubectl top pod command

    kubectl top pod
    

    Examine the MEMORY(bytes) column of the output to get the answer.

  8. Identify the POD that consumes the least CPU(cores).

    Run the kubectl top pod command

    kubectl top pod
    

    Examine the CPU(cores) column of the output to get the answer.