Ultimate CKA Mock Exam 4 Question 7

Good day,

I feel like there may be something off with how this is graded. Please help me figure out what the problem might be:
Question:

Solve this question on: ssh cluster2-controlplane


Identify the CPU and memory resource capacity on 
cluster2-node01 node and save the results in 
/root/cluster2-node01-cpu.txt and /root/cluster2-node01-memory.txt, 
respectively, on the cluster2-controlplane.

Store the values in the following format:

<Resource-name>: <Value>

Please see my terminal output:

cluster2-controlplane ~ ➜  k get nodes cluster2-node01 -o yaml | grep -i capacity -A6
  capacity:
    cpu: "32"
    ephemeral-storage: 1546531076Ki
    hugepages-1Gi: "0"
    hugepages-2Mi: "0"
    memory: 128899Mi
    pods: "110"

cluster2-controlplane ~ ➜  cat cluster2-node01-memory.txt 
memory: 128899Mi

cluster2-controlplane ~ ➜  

but still I was determined to be wrong on the following metric:
:x: Is the memory value stored?

proposed solution:

kubectl describe node cluster2-node01 

You will see output similar to the following:

...
Capacity:
  cpu:                16
  ephemeral-storage:  772706776Ki
  hugepages-1Gi:      0
  hugepages-2Mi:      0
  memory:             65838280Ki
  pods:               110
...

Record the Resource Values
To store the official Nginx repository URL, execute the following commands:

echo "cpu: 16" > cluster2-node01-cpu.txt
echo "memory: 65838280Ki" > cluster2-node01-memory.txt

I suppose you are expected to use kubectl top ... and save the result in the specified .txt file

HI @Srikanth_Reddy

Thanks for your response.

I posted the examiner’s proposed solution above. it uses the describe command. not the top command. While reviewing, I realised I did not do anything different. I posted what I did first (under terminal output).

Either way, top/describe, I doubt that the result would be fundamentally different. Maybe in the formatting of the output but I suppose it’d give me the same ball-park answer.

Hi @Santosh_KodeKloud @rob_kodekloud @Alistair_KodeKloud

So I have tried this lab multiple times and all the times I tried, I noticed some sorta consistency.

every time my kubectl describe node cluster1-node01 | grep -i capacity -A7 command shows the memory in the format

I always end up being marked wrong.

however if it shows the response as Ki and I input the information into the file, then I am marked as being correct.

It’s probably just a small glitch, if it isn’t please help me figure what I am doing wrong, so that I can figure out why I am wrong some times and right other times.

Thank you.