Kubernetes CKA sample exam question 64 with answer

Question
Create a new namespace called cka-master.
Write the names of all namespaced Kubernetes resources (like Pod, Secret, ConfigMap ...) into /etc/course/16/resources.txt.
Find the project-* Namespace with the highest number of Roles defined in it and write it's name and amount of Roles into /etc/course/16/crowded-namespace.txt.

Answer
First task is pretty easy:

kubectl create ns cka-master
Second task progress:
kubectl api-resources
kubectl api-resources --namespaced=true -o name
kubectl api-resources --namespaced=true -o name > /etc/course/16/resources.txt
Third task progress:
kubectl get ns
kubectl -n project-c13 get roles --no-headers | wc -l
kubectl -n project-c14 get roles --no-headers | wc -l
kubectl -n project-hamster get roles --no-headers | wc -l
kubectl -n project-snake get roles --no-headers | wc -l
kubectl -n project-tiger get roles --no-headers | wc -l
echo "project-c14 300" > /etc/course/16/crowded-namespace.txt